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

Re: [PATCH v2] xen/arm: gnttab: cast unused macro arguments to void


  • To: Michal Orzel <michal.orzel@xxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Thu, 28 Apr 2022 12:09:15 +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=paNOND5mRbm7gq6v/DVUXy3uVWjx5CvEVEg+RVMRvKA=; b=jhm+IQFJdNpY2LkpLnEuOXBTmXTSTL49R4vmSl4k9n1W1lthzccBGefPlDPKqz5whyYXmihmMP7VLjZSeb5EEEIngn3FYI8p2fH0YyNK2ZLwzH9KClOqCtWOYNDA9y4/NXWYjqrfSLo/AifLvLVRfS8ZLDa+LWXHJEZRfbsH93wDnPFj91cq2t1YrjF4tkbjuK8s0gdZV4gXxBmtE1FPUiUityJ1tRhoSjf9UX5KwOQzVWFgmzWDpQSdrljAVYL0LwfkUAHcloJtimkUgT1wUlzBEdG/CfcPsJX+A5zmGpeSYKeKop9DAJpCj3a8gGA8fxYjQdaWn2e/mA2ghqUCdA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JhlN4IkUPySJW5QS8V3LGNUxqlIMJ07d2bHV3g4Bw5CXyoaWGG+tCUMsT71q34KdBlSMZeBW8N+Lf19GAi/cw+9MlYXasbPq2Sf5i8LuoDZqPWzY+hVzf/6B89cYys/HKr1MtFNsUo6uhm9GNS+Fa/ensiFpsPUPdNOkuRTkVtp2dPIVQTAihjoBuLy4dpWx0YjlFoizlk5EIQXy+uoTsj4Vkk+8YL1eUDBZWUusaQM4DAB5hpxIZgazAy+aMySf1VwEwWMblCzy/FSOzIeX/kO5/ubEvfBv9yedv6x0PkQzWvGInKOKVuKcZ8hv9Ni8LwJeci4ASy2m7/ZMsPg+WQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Thu, 28 Apr 2022 10:09:27 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 28.04.2022 11:46, Michal Orzel wrote:
> @@ -89,10 +90,12 @@ int replace_grant_host_mapping(unsigned long gpaddr, 
> mfn_t mfn,
>  })
>  
>  #define gnttab_shared_gfn(d, t, i)                                       \
> -    (((i) >= nr_grant_frames(t)) ? INVALID_GFN : (t)->arch.shared_gfn[i])
> +    ((void)(d),                                                          \
> +     ((i) >= nr_grant_frames(t)) ? INVALID_GFN : (t)->arch.shared_gfn[i])
>  
> -#define gnttab_status_gfn(d, t, i)                                       \
> -    (((i) >= nr_status_frames(t)) ? INVALID_GFN : (t)->arch.status_gfn[i])
> +#define gnttab_status_gfn(d, t, i)                                        \
> +    ((void)(d),                                                           \
> +     ((i) >= nr_status_frames(t)) ? INVALID_GFN : (t)->arch.status_gfn[i])

Just as a note (I don't mind changing these too): If a macro cares to
evaluate all its arguments, I think it should also care to evaluate all
of them exactly once.

Jan




 


Rackspace

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