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

Re: MISRA violations in hypercall-defs


  • To: Federico Serafini <federico.serafini@xxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Tue, 8 Aug 2023 11:19:55 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • 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=2kX3Jb1H36shYj6GK+7YjzVzxy2ryONoD+u91GGcdpM=; b=djFiDYo7/lbPmP9JX1WhtnLG3xpgP/MO7zaoyaCCQOhEFp++5JgiMAnkPSCslnsCUqYPIz4lsNEmYahBJZxZXolqjQ7PEa0LhFTMvSjyOPGCsvt+o9SNymQO8526dr0KVaUfab8vj+YKu2zPQseDFLH+TNVfKCOHyVIr9gR7RR762samogvYsjHolpzNyF5YVfCaRbLViQcoPUVUsDDmWzXxhs/py+/1nM3c6Aow3vy3SJJPHebqd1Kyk4ZwsRKSK7HyqxtK8H56feSjCWVj8GCY3wnmLqIF3/g5vbyS1zowHGiqrZzszbEjq2CF2FlcRooMfKs8Xlb0YJapGP+Ptg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mzRSsHT3A88ZYnQzzid4kJZR61AJt04pxrTLD+XLdHR37eFkUsKSGB+ctPTmgqwrE3fpbp7vqawJXfqA1nd1is7CNF3ZIuUqrdqsHsTGZqSixXplZ1A1l6CFvH4YlUMo92TL9/O4EH7nUCdw63udjzKI50kJzR0BC0maz+akn+NiFONfpD4jWMECLLXjcANKuka+QkNvq3WIqP9ZeGl6VeCwwMXu7lh3jxT+uadDW1I2Juva16uNqK2AuuflJ3KrU56jj9yGY+msVQk2CfFe59zo7IziG5JZwimZdCAKKGBAtRPbek+hKyevKtpn4EZwic1BnsqIEH2sNvFw7lm8Gw==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: jgross@xxxxxxxx, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, "consulting@xxxxxxxxxxx" <consulting@xxxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Tue, 08 Aug 2023 09:20:04 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 08.08.2023 10:47, Federico Serafini wrote:
> Hello everyone.
> 
> I would like to to ask your opinion about the auto-generated file
> xen/include/xen/hypercall-defs.h which contains some violations of
> MISRA C:2012 Rule 8.3:
> "All declarations of an object or function shall use the same names and
> type qualifiers".
> 
> Such violations can be seen at the following links
> (copy and paste the link on you browser, including also the characters
> after the '#'):
> 
> - arm
> https://saas.eclairit.com:3787/fs/var/local/eclair/XEN.ecdf/ECLAIR_normal/origin/staging/ARM64-Set1/218/PROJECT.ecd;/by_service/MC3R1.R8.3.html#{"select":true,"selection":{"hiddenAreaKinds":[],"hiddenSubareaKinds":[],"show":true,"selector":{"enabled":true,"negated":false,"kind":2,"children":[{"enabled":true,"negated":false,"kind":0,"domain":"file","inputs":[{"enabled":true,"text":"xen/include/xen/hypercall-defs.h"}]}]}}}
> 
> - x86
> https://saas.eclairit.com:3787/fs/var/local/eclair/XEN.ecdf/ECLAIR_normal/origin/staging/X86_64-Set1/218/PROJECT.ecd;/by_service/MC3R1.R8.3.html#{"select":true,"selection":{"hiddenAreaKinds":[],"hiddenSubareaKinds":[],"show":true,"selector":{"enabled":true,"negated":false,"kind":2,"children":[{"enabled":true,"negated":false,"kind":0,"domain":"file","inputs":[{"enabled":true,"text":"xen/include/xen/hypercall-defs.h"}]}]}}}
> 
> Some of the violations are due to mismatches on the return types
> and the use of `ret_t`.

We already said that ret_t will need deviating. For parameter names
it ought to be possible to suitably rename, like done elsewhere. Whether
that means renaming in the generator script or in the definitions likely
again needs judging on a case-by-case basis.

Jan



 


Rackspace

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