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

Re: [XEN PATCH 5/5] x86: make parameter names of function declarations consistent


  • To: Federico Serafini <federico.serafini@xxxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Fri, 30 Jun 2023 15:21:11 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.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=KUzQGhQA160ilr/+zbIMHz+WFjdOYWOPGjhySzVRxBc=; b=M/Q1tj9Tp5X9d0s9CFufW4fwS65/nGxrmzR0ZWeQ6j4zR5BdcLWNMOGURvtpqc6+kXqf4s51rDGOxQ5BG+ivcx7X93zxSMECJTpdNl3kQiwVCCSMl7TsvPKSYarSrREWTJbM3wtsjFxlXXv60Yy5jdcU2mjDIqVih5BG4DMvEQoZN0EtcgUCfaEiW/hAzcGjZ6UuuzKYxmkYIbkbbbOchbaSP6h4dSDoV0X/vuqNGzarDTcE5hXQ03w6TFgz8PuJ0Nd6kr7SaTKMS22YX5JkiGJJDLy2Ei6h9GcgrxVG1RzkkQS2pftQMN0mIVVBWs4OXdM5QWPgb9oskpMKbpt7eA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aeV1nM/KPu+Q3xN3CtwHP6HgJJIY95OHpm/i90J30zBk1pYVUM4iO/nOdcEOEFnB+/7KYlniENs52lUwUzcgotcUNQAiQ525I1JskKS1HpCBllbpbdpScQkGxZ5mmNS0tTTlaHM4jWm6RCbncvH/3l6J57vuuip8SoBeNEQcyvCuzVjdzv8n9WK3Dj4MOW7FAdAZwuZieZzR7tuFOy9TJ+XMa1FBBVWAY+7UnJn0ddq7SG5EN8/e/GWbIfl3Jw9ynNXHFnCAwnOgnpYfUgqUNHJIfIuEWFLB/0N+CW0P5zU6aB4zz6c0mrzJUY8+mPoH+dCW2tfDBIbg3X+xD7V13A==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: xen-devel@xxxxxxxxxxxxxxxxxxxx, consulting@xxxxxxxxxxx, Jan Beulich <jbeulich@xxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Paul Durrant <paul@xxxxxxx>, Tamas K Lengyel <tamas@xxxxxxxxxxxxx>, Alexandru Isaila <aisaila@xxxxxxxxxxxxxxx>, Petre Pircalabu <ppircalabu@xxxxxxxxxxxxxxx>, Jun Nakajima <jun.nakajima@xxxxxxxxx>, Kevin Tian <kevin.tian@xxxxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Xenia Ragiadakou <xenia.ragiadakou@xxxxxxx>, Ayan Kumar Halder <ayan.kumar.halder@xxxxxxx>
  • Delivery-date: Fri, 30 Jun 2023 14:22:19 +0000
  • Ironport-data: A9a23:Y9rX3qB2V+c7whVW/+bjw5YqxClBgxIJ4kV8jS/XYbTApDh312MEx jRLWWGHPq6PYGbxfYgiPIq18xsP7cfXn9NqQQY4rX1jcSlH+JHPbTi7wuUcHAvJd5GeExg3h yk6QoOdRCzhZiaE/n9BCpC48T8nk/nOHuGmYAL9EngZbRd+Tys8gg5Ulec8g4p56fC0GArIs t7pyyHlEAbNNwVcbCRMsspvlDs15K6p4G1D5gRkDRx2lAS2e0c9Xcp3yZ6ZdxMUcqEMdsamS uDKyq2O/2+x13/B3fv8z94X2mVTKlLjFVDmZkh+AsBOsTAbzsAG6Y4pNeJ0VKtio27hc+ada jl6ncfYpQ8BZsUgkQmGOvVSO3kW0aZuoNcrLZUj2CA6IoKvn3bEmp1T4E8K0YIw/utmIlNJ2 qYjOiEDdUC7rcixg6ifVbw57igjBJGD0II3nFhFlGicIdN4BJfJTuPN+MNS2yo2ioZWB/HCa sEFaD1pKhPdfxlIPVRRA5U79AuqriCnL3sE9xTI+uxuvDW7IA9ZidABNPL8fNCQSNoTtUGfv m/cpEzyAw0ANczZwj2Amp6prraWwHqlCdxKRNVU8NZW2mPP701CCCE4THjmo6KwrxW5A9d2f hl8Fi0G6PJaGFaQZtfwUxCioXWD+AURQdNeEus7wAuQxbHZ5QnfDW8BJhZac8AvvsIyQT0s1 3eKksnvCDgpt6eaIVqN+7HRoT6sNCw9KW4ZeTRCXQYD+8Pkoow4klTIVNkLOKWyiMboHS3xx T+ipjUxnLgVgogA0KDT1VLNji+op5PJZhUo/QiRVWWghitmYKa1aoru7kLUhd5YJZudZkmMu j4Dgcf2xPwHCJiWvDCOROgLE6Ck47CONzi0qVduBJAg8z2F8X+/cY1e7TdyKV0vOcEBERfxe E7JsgpV7ZVOFHGrcaN6bY+3B8kwi6PnELzNVO3SKNxHYZFzdQqO1CBoeUOUmWvqlSAEkqwhO JHdbcelC14bD7hqyHy9QOJ1+boqzSA3wSXUX4L2yzyu1LbYb3mQIZ8VPV2PZ6Yj5ayFqQnc8 NFCH8KPx1NUV+iWSiDG+IhVLk0PJGJ9BZnyp8FNXueGLkxtH2RJNhPK6bYoeoggk6ELkO7Np yi5QhUBlwe5gmDbIwKXbHwlcKnoQZt0sXM8O2orIEqs3H8gJ42o6c/zaqcKQFXuz8Q7pdYcc hXPU5zZWpyjlhyvF+whUKTA
  • Ironport-hdrordr: A9a23:TVN+9aglwUCD5FMHyRCiOevlKnBQXtQji2hC6mlwRA09TyX4ra yTdZEgviMc5wx/ZJhNo7690cu7IU80hKQV3WB5B97LNmTbUQCTXeJfBOXZsljdMhy72ulB1b pxN4hSYeeAaWSSVPyKgjWFLw==
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 30/06/2023 8:36 am, Federico Serafini wrote:
> Hello Stefano,
>
> On 29/06/23 21:47, Stefano Stabellini wrote:
>> On Thu, 29 Jun 2023, Federico Serafini wrote:
>>> Change the parameter names of function declarations to be consistent
>>> with the names used in the corresponding function definitions
>>> so as to fix violations of MISRA C:2012 Rule 8.3.
>>>
>>> Signed-off-by: Federico Serafini <federico.serafini@xxxxxxxxxxx>
>>> ---
>>>   diff --git a/xen/arch/x86/include/asm/hvm/vmx/vmcs.h
>>> b/xen/arch/x86/include/asm/hvm/vmx/vmcs.h
>>> index d07fcb2bc9..24bf409d8f 100644
>>> --- a/xen/arch/x86/include/asm/hvm/vmx/vmcs.h
>>> +++ b/xen/arch/x86/include/asm/hvm/vmx/vmcs.h
>>> @@ -656,10 +656,10 @@ bool vmx_msr_is_intercepted(struct
>>> vmx_msr_bitmap *msr_bitmap,
>>>                               unsigned int msr, bool is_write)
>>> __nonnull(1);
>>>   void virtual_vmcs_enter(const struct vcpu *);
>>>   void virtual_vmcs_exit(const struct vcpu *);
>>> -u64 virtual_vmcs_vmread(const struct vcpu *, u32 encoding);
>>> +u64 virtual_vmcs_vmread(const struct vcpu *, u32 vmcs_encoding);
>>
>> Shouldn't the first parameter be "v" to match the definition?
>>
>> Or is that a different MISRA C rule?
>
> This is a violation of MISRA C:2012 Rule 8.2:
> "function types shall be in prototype form with named parameters".
> However, I can propose a new patch version to fix it as well.

As a general note - if you need to make multiple changes like this, it's
far better to do them as a single patch.

The end result tends to be easier to review, and it reduces the textural
dependencies between the various patches floating about on list.

~Andrew



 


Rackspace

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