[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] xen: Add MISRA support to cppcheck make rule


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>
  • Date: Tue, 31 May 2022 14:50:02 +0000
  • Accept-language: en-GB, en-US
  • Arc-authentication-results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com])
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
  • Arc-message-signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=woTtoY/Yu0DZ7KYZFusF/MiSekw8kB15eXAdmD2W55c=; b=Swhq9vot+YrkAaY0gZOMCpnFsqzHFrmbqEXwycEgoDvkK5uz0ktbke9UBTmoQLKBuNsygQQeGNIiWmNP2lH7AYJ4pvm6uH3eZQu71wboQMmi6SahmqiAQsMxKE8HT6/NoA2LSgR+MtoiPkmoYIVunHTBfwuyYpPKf6Lkl4X/yul4LSt/ICs0CrLiNuXvvBkDbUuXaxENmyBQWBYolUlAZYFVnyA8vptT+1cUC6+eNiijouqGWMFdzIFtTHIN6YH4fOplak68C+vO2Ngp+e0/fdJJQOO9nIwp6dNlsslFMosxz3JFK9uhKyqbu2mHrdPxYhrbXBiVmaZ3RzH2Ct0Vzw==
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=woTtoY/Yu0DZ7KYZFusF/MiSekw8kB15eXAdmD2W55c=; b=LrJX+fTCfIYYuJBI3aHTh0N2iaql9uN22xP3bBpNw7zciwwPFYmqRhM35P42D1eDhK/VENzeJ+5u9VAPIHLCcR+Le0l5OlnbbbsKbX3XbJE7qZrI4+luUSR+H8l+m50KOVCYOcUdgSsug1YYpmkfhM/zgPF7IBSVR+NMotTW63CMYYM4FhvLQuxYl2T/MnHNhqwy9AtcEyKf4fCo4EwYgikb4XF2IKdtgY017CEE2uQ8ItxWKUJtnu8xtGnY+x5hTBwNTfQHUWyp14osW7ozlBEhvvi8J75g6S3YpY5mvVyMxo9nJg2/XrlwSBnEwUL+0nwWeN0AbM+uhp+UOcl16g==
  • Arc-seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=gcEuIwOHN1qJAoTv5VFUkC0t+mnU3LXBp6uZtjEhTlgTHpRbgYSLaqbQxKOnRdps34apQ2lA/oX4YrnOvEwcaJtRotkE97m5/kO4aCuEVb6qhyAJyAOMEpYLWm+T+6BRJuq2rXM5kdiQBGSc7ciosl6HTncPcYdElNSiB2aqAE71yjcRGZdCBPEUDsRXECE5FuSrnfNxvi5eUHlC79bt/sjzp0GgUROBj6WrFzrYEcgusUrNAD+rJOe9QvJQ0wxR6EFQMEuaEJt2fAydDAuWAPTsJxP3TTxIG63n2FHcLlLjzr6BW4GWSGgTjAypemqdXeZqakakb5yDEUvs8hKVxg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CVQtnMpNVZ0W5A7n4mRU2bt8UPfJdXCaWpyEDsxkjAF8jXxDsHN8TfFsmbdsC6FsMIkGG4+ZbP4cu+Wqll7XE4m/Xbak8cVzAjGyw/2gi393307z43F5g0VzZicRMo+aL0P7coAiDZJx9DwkoPaCjKw7ckxJWWDN4TqMMOYV5U0+/it8tynKy8gZ9ZcmFQOGvfGSzVQ/kZJQsz2q5DVNP7DoUS33vLmTFAwBr3hmDkBhtloEY2DWPlhg4xAEVeejFq2h1u5EvQOT9y9kslkagrbWvesePd4az/yQtd++WryyUu94KM3KxTo+X+q0Sw34aILS0UNxo/15xjHbYP6G9A==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Tue, 31 May 2022 14:50:22 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHYdPKgb8OwohyX90ebe0mOYdpVU605ANEAgAAGrYCAAAQfAIAABecA
  • Thread-topic: [PATCH] xen: Add MISRA support to cppcheck make rule

Hi,

> On 31 May 2022, at 15:28, Jan Beulich <jbeulich@xxxxxxxx> wrote:
> 
> On 31.05.2022 16:14, Bertrand Marquis wrote:
>>> On 31 May 2022, at 14:50, Jan Beulich <jbeulich@xxxxxxxx> wrote:
>>> On 31.05.2022 15:30, Bertrand Marquis wrote:
>>>> +# Replace current by goal in the dependency to generate an analysis for 
>>>> all
>>>> +# rules we would like to respect.
>>>> +cppcheck-misra.json cppcheck-misra.txt: $(XEN_ROOT)/docs/misra/rules.rst
>>>> +  $(Q)$(srctree)/tools/convert_misra_doc.py -i $< -o cppcheck-misra.txt \
>>>> +          -j cppcheck-misra.json
>>>> +
>>>> +# Prevent parallel make issues as script is generating both files
>>>> +cppcheck-misra.json: cppcheck-misra.txt
>>> 
>>> With this dependency the earlier rule should not list multiple targets
>>> (and it generally should not, for not being a pattern rule). If I'm not
>>> mistaken the way you have it the Python script would be invoked twice,
>>> and all you prevent is that it is invoked twice in parallel. And then
>>> please use $@ inside the rule. Additionally, with the script being an
>>> in-tree one, the rule should also have a dependency on that script
>>> (such that the targets would be rebuilt if the script alone changes).
>> 
>> I am a bit lost on the $@, previous patch adding cppcheck was changed
>> to use $(Q) instead. So can you justify this request ?
> 
> I'm talking of $@ (a macro expansion), not @ as a prefix to suppress
> command echoing.
> 

That make a lot more sense.

Thanks
Bertrand

> Jan
> 
> 




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.