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

Re: [XEN PATCH] x86: I/O emulation: fix violations of MISRA C:2012 Rules 8.2 and 8.3


  • To: Federico Serafini <federico.serafini@xxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Wed, 19 Jul 2023 10:32:13 +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=n61DsqpUHiVq8H8rkX+AiHC5sfRkczDf6N1bv4EXnI8=; b=bvwg2UGfGu8U7m167eryReKdc83uxDlFYmaQhRMUcIjFfNAm4I4Oy4tyGcVBnKz0aPW6pTDACGsf1VbrBicNc3cV6lvhPSVNg+wO/TklxS90URUDyR8SOoLnYuUuqG4Tc4rax3KDmTXqMEMXMxZx+xTLZPPvtdermwJJn7p3cjValJRu1gnAABhpah2sAZq34nqz9RT8lPH7oqfk6Qdustu3+87MJQe/ZlJNtxMPNsN6lTkCfEEhim+GrTibysEJcbmPow275IZNZET8IgKphZNXLlmNtAwd5DEx0/RCGcGd4XWjlmXCxgYr90yaQ/OVxk1ksv/HeBTUbD9P5vbqhw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dKNTyQ/qEVL3l2s361cqan1kegxseI5rt0uCLC+qnWVo8UHFgeNvxU4fSCEoAtygfaCVKHI8K7DtYfMXHIWxX1Sah2pVCQVBksM9dI4D1v2d60k9ZSI4idwrnPqPD2Beelp6PW7hXrGJH5twlrSj3tYhuiL7koXd+nmaVCPR66X95Ni7lOESsw7Ye3RtvpGekNjGZfi7yrqPt3vtF3CLeURevRxGBSXzFc/zUuGayQWyPAJ4OKw7dcd31B64FVdX826Ccx0jMEp+B6rKdkQDiCJJHsehFt5IMflWz0cxzCb1lFLIrhafkgcX3c6rCj4kdjlk4QZ7ec2YvY43HhwomA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: consulting@xxxxxxxxxxx, Paul Durrant <paul@xxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Xenia Ragiadakou <xenia.ragiadakou@xxxxxxx>, Ayan Kumar Halder <ayan.kumar.halder@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Wed, 19 Jul 2023 08:32:23 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 19.07.2023 10:24, Federico Serafini wrote:
> Give a name to unnamed parameters thus fixing violations of
> MISRA C:2012 Rule 8.2 ("Function types shall be in prototype form with
> named parameters").
> Keep consistency between parameter names used in function declarations
> and names used in the corresponding function definitions thus fixing
> violations of MISRA C:2012 Rule 8.3 ("All declarations of an object or
> function shall use the same names and type qualifiers").
> 
> Signed-off-by: Federico Serafini <federico.serafini@xxxxxxxxxxx>
> ---
>  xen/arch/x86/include/asm/hvm/emulate.h |  8 ++++----
>  xen/arch/x86/include/asm/hvm/io.h      | 14 +++++++-------
>  2 files changed, 11 insertions(+), 11 deletions(-)

If it was just the 2nd file, I'd agree with the "I/O" in the title
(albeit as a minor remark and as mentioned elsewhere, personally I
think double tags in titles are undesirable, and blanks in tags
aren't nice either). So perhaps "x86/HVM/emul:" ?

The code changes themselves look okay to me (no matter that I don't
like some of them), so
Acked-by: Jan Beulich <jbeulich@xxxxxxxx>
I'd be happy to make, while committing, whatever title adjustment
that you can agree with.

One other note though (there's no good general place to put it):
I'm also a little unhappy with all of you often using "fix" in the
titles, when you don't really fix any bugs. There are certainly
cases where addressing Misra complaints also fixes bugs, but that's
more the exception than the rule. Could we settle on something
like "eliminate", "address", "avoid", or alike when changes are
merely about style or other aspect which don't really correct
functionality?

Jan



 


Rackspace

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