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

Re: [XEN PATCH 2/5] x86: change parameter names of nestedhvm_vcpu_iomap_get() definition


  • To: Federico Serafini <federico.serafini@xxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Tue, 4 Jul 2023 15:53:50 +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=kd5boOvS+q5rVVsOKW3C9SGZ7jvv4HJO+PM0gqNKnl4=; b=GsUKpYjO5BvYsbFDTWz7YzsAZG4so9wRCgvlxxT06zTUBD6l5X5uqhYAt1kMCabMGyai0Cb/Bp1JHZaq+HZOzUf5v1hGAkBM173id0nB7fGsQpZLGVTWssSw0DCjnpWs8/g0EFKNy7HoSSa3wUlV8IgpzuF81t24deJLq4jksjH2zuOG8ZaGhxyn+n9/WQAm/CCR2CVrBUVlw2K5vTlksank+dgM8NjkDnI6Gqhpd7dO3xLrkz9Fq0xka4BiuSANAhNc6C7iOZpLY3DjHb9jIALS6cSOCSktrTW9EiFdgNOAMv2LMz4zGkyTPygtalov2Ri71o8OaZegB+3Ra1sX3w==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NvkVe/SVmonf06KVTBVQjOQu9eFhIfznAt4LpPyusr3Y8hc1JLBkivivkcxrvwk1ZTUw1uufEy2iZXS5viSCOSSuqiXIRAGNJr2VvDuzpaaQc9sCrIJnRgMoY06exgJXEbyC/v2thlCrUxeOg50qHH3jP3N3zHaDrQhvTbBuG1fS4qaYrMZgfEP7BVaW3rutIoZZuRuDMYWQ3wYWjNycKBCGo+txeK+3xtheo2/DLErqgiAUh0vYXPSLDEUp7KBaIXdKM3JjnKLbav9FDOpcAVp73ZveKDHiK06Bzq0B4yBtJ/2nsyGsQMMdhiaCAHkk/Wpe6Q/mbwt/NtiC8jcNSg==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: xen-devel@xxxxxxxxxxxxxxxxxxxx, consulting@xxxxxxxxxxx, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Xenia Ragiadakou <xenia.ragiadakou@xxxxxxx>, Ayan Kumar Halder <ayan.kumar.halder@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • Delivery-date: Tue, 04 Jul 2023 13:54:02 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 29.06.2023 21:25, Stefano Stabellini wrote:
> On Thu, 29 Jun 2023, Federico Serafini wrote:
>> Change parameter names of nestedhvm_vcpu_iomap_get() definition to
>> those used in the function declaration in order to:
>> 1) improve readability;

I see this was committed already, so ftaod no request to revert or what
not, but I disagree with this: Longer names are generally hampering
readability. What would have helped readability is if coding style was
fixed at least for all the line which were touched anyway.

Jan

>> 2) fix violations of MISRA C:2012 Rule 8.3.
>>
>> Signed-off-by: Federico Serafini <federico.serafini@xxxxxxxxxxx>
> 
> Reviewed-by: Stefano Stabellini <sstabellini@xxxxxxxxxx>
> 
> The title would be better as:
> x86/nestedhvm: change parameter names of nestedhvm_vcpu_iomap_get() definition
> 
> could be done on commit
> 
> 
>> ---
>>  xen/arch/x86/hvm/nestedhvm.c | 10 +++++-----
>>  1 file changed, 5 insertions(+), 5 deletions(-)
>>
>> diff --git a/xen/arch/x86/hvm/nestedhvm.c b/xen/arch/x86/hvm/nestedhvm.c
>> index ec68551127..64d7eec9a1 100644
>> --- a/xen/arch/x86/hvm/nestedhvm.c
>> +++ b/xen/arch/x86/hvm/nestedhvm.c
>> @@ -155,19 +155,19 @@ static int __init cf_check nestedhvm_setup(void)
>>  __initcall(nestedhvm_setup);
>>  
>>  unsigned long *
>> -nestedhvm_vcpu_iomap_get(bool_t port_80, bool_t port_ed)
>> +nestedhvm_vcpu_iomap_get(bool_t ioport_80, bool_t ioport_ed)
>>  {
>>      int i;
>>  
>>      if (!hvm_port80_allowed)
>> -        port_80 = 1;
>> +        ioport_80 = 1;
>>  
>> -    if (port_80 == 0) {
>> -        if (port_ed == 0)
>> +    if (ioport_80 == 0) {
>> +        if (ioport_ed == 0)
>>              return hvm_io_bitmap;
>>          i = 0;
>>      } else {
>> -        if (port_ed == 0)
>> +        if (ioport_ed == 0)
>>              i = 1;
>>          else
>>              i = 2;
>> -- 
>> 2.34.1
>>




 


Rackspace

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