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