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

Re: [PATCH 2/5] x86: Name parameters in function declarations


  • To: Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx>
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Fri, 12 Dec 2025 01:39:09 +0000
  • 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=arcselector10001; 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=JZALJNq0kxwBQQHPsocYIkfEBSpsgHPFBMF0u2aGVKQ=; b=cYMnJagWfOCKqxJi23PCGQshXy+oXfEeUnKDBU53uAFiYIBPB6ZyGkCURG1xFGJc141LyMCZ0p6OLoh6GdH8yYdqMJ9rxLd22oMoz7Gp+9jAdkl5bFs7vq2zQQER1/luatLkSX4b/tKQ8Ar69MK+LX0B2jAQojOC83jGDUuvHs6uFjw0NC1FyQJdiN+s8IFe2Jx1bGE8pHgPt4VOp++RkM7fHYA9+gJAX0R89xUSsiPPiafTlwAKP+ciXn2GUbDe9JxVJw0LYG0dvtt0Ev8tmlSjQikIepR7HusLKB9xfBQUDCYe2Rdu1eM9y35d8RUBL51FokU9lPTBPPPxPZeuSQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=EpeNwRgksZkctc9y8FIeeSfss04i4IN5hrTZAGqG6IKJ5S0wzNgxnADIvgER9ibVZ0PTu8xJyzwJNbCvJSDDEQmFBvP9WJczu8d6fKtF2j53rEoGSLbv13G4TX4Az5ZrVPONEuTfIJiweTfevW3WJlrQ7nZ0OCiqfjYGbIe3tTjxwz7Axt6HnsnED0tCJNVDnEIfFDh8GzEvtHxPDpumL1Vw3vBCcVmdlqouTgatE+fCO+w86gIEYvoBsOTZcN597+83ozaorb8eZHvcXb9zppMXtMU+k4HMwrUEEeg3gDvEuFYBIb7VgAJw/qvwx9rGGZjFHtg0vCNJRXh1XnIuvQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Jan Beulich <JBeulich@xxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, "consulting @ bugseng . com" <consulting@xxxxxxxxxxx>
  • Delivery-date: Fri, 12 Dec 2025 01:39:21 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 10/12/2025 8:15 pm, Nicola Vetrini wrote:
> On 2025-12-10 19:30, Andrew Cooper wrote:
>> With the wider testing, some more violations have been spotted.  This
>> addresses violations of Rule 8.2 (parameters must be named).
>>
>> No functional change.
>>
>> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
> Reviewed-by: Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx>

Thanks.

>
> One nit below
>
>> ---
>> CC: Jan Beulich <JBeulich@xxxxxxxx>
>> CC: Roger Pau Monné <roger.pau@xxxxxxxxxx>
>> CC: Stefano Stabellini <sstabellini@xxxxxxxxxx>
>> CC: consulting@xxxxxxxxxxx <consulting@xxxxxxxxxxx>
>> CC: Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx>
>> ---
>>  xen/arch/x86/mm/shadow/common.c | 8 ++++----
>>  xen/arch/x86/pv/emul-priv-op.c  | 2 +-
>>  xen/include/xen/livepatch.h     | 2 +-
>>  3 files changed, 6 insertions(+), 6 deletions(-)
>>
>> diff --git a/xen/arch/x86/mm/shadow/common.c
>> b/xen/arch/x86/mm/shadow/common.c
>> index 423764a32653..f2aee5be46a7 100644
>> --- a/xen/arch/x86/mm/shadow/common.c
>> +++ b/xen/arch/x86/mm/shadow/common.c
>> @@ -69,11 +69,11 @@ const uint8_t sh_type_to_size[] = {
>>
>>  DEFINE_PER_CPU(uint32_t,trace_shadow_path_flags);
>>
>> -static int cf_check sh_enable_log_dirty(struct domain *);
>> -static int cf_check sh_disable_log_dirty(struct domain *);
>> -static void cf_check sh_clean_dirty_bitmap(struct domain *);
>> +static int cf_check sh_enable_log_dirty(struct domain *d);
>> +static int cf_check sh_disable_log_dirty(struct domain *d);
>> +static void cf_check sh_clean_dirty_bitmap(struct domain *d);
>>
>> -static void cf_check shadow_update_paging_modes(struct vcpu *);
>> +static void cf_check shadow_update_paging_modes(struct vcpu *v);
>>
>>  /* Set up the shadow-specific parts of a domain struct at start of day.
>>   * Called for every domain from arch_domain_create() */
>> diff --git a/xen/arch/x86/pv/emul-priv-op.c
>> b/xen/arch/x86/pv/emul-priv-op.c
>> index 225d4cff03c1..08dec9990e39 100644
>> --- a/xen/arch/x86/pv/emul-priv-op.c
>> +++ b/xen/arch/x86/pv/emul-priv-op.c
>> @@ -40,7 +40,7 @@ struct priv_op_ctxt {
>>  };
>>
>>  /* I/O emulation helpers.  Use non-standard calling conventions. */
>> -void nocall load_guest_gprs(struct cpu_user_regs *);
>> +void nocall load_guest_gprs(struct cpu_user_regs *regs);
>>  void nocall save_guest_gprs(void);
>>
>>  typedef void io_emul_stub_t(struct cpu_user_regs *);
>> diff --git a/xen/include/xen/livepatch.h b/xen/include/xen/livepatch.h
>> index d074a5bebecc..3f5ad01f1bdd 100644
>> --- a/xen/include/xen/livepatch.h
>> +++ b/xen/include/xen/livepatch.h
>> @@ -62,7 +62,7 @@ struct livepatch_fstate {
>>      uint8_t insn_buffer[LIVEPATCH_OPAQUE_SIZE];
>>  };
>>
>> -int livepatch_op(struct xen_sysctl_livepatch_op *);
>> +int livepatch_op(struct xen_sysctl_livepatch_op *op);
>
> xen/common/livepatch.c:int livepatch_op(struct xen_sysctl_livepatch_op
> *livepatch)
>
> Shouldn't this decl also use "*op" as well? Might not be triggered in
> this configuration due to the absence of CONFIG_LIVEPATCH I think.

Yes, I've converted the main function to use op too.  It makes the patch
a bit larger, but it's a much better name to use in this context.

~Andrew



 


Rackspace

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