On Tue, May 03, 2022 at 04:37:29PM +0200, Jan Beulich wrote:
> On 03.05.2022 12:25, Roger Pau Monné wrote:
> > On Mon, Apr 25, 2022 at 10:32:10AM +0200, Jan Beulich wrote:
> >> As of 68a8aa5d7264 ("iommu: make map and unmap take a page count,
> >> similar to flush") there's no need anymore to have a loop here.
> >>
> >> Suggested-by: Roger Pau Monné <[email protected]>
> >> Signed-off-by: Jan Beulich <[email protected]>
> >
> > Reviewed-by: Roger Pau Monné <[email protected]>
>
> Thanks.
>
> > I wonder whether we should have a macro to ignore returns from
> > __must_check attributed functions. Ie:
> >
> > #define IGNORE_RETURN(exp) while ( exp ) break;
> >
> > As to avoid confusion (and having to reason) whether the usage of
> > while is correct. I always find it confusing to assert such loop
> > expressions are correct.
>
> I've been considering some form of wrapper macro (not specifically
> the one you suggest), but I'm of two minds: On one hand I agree it
> would help readers, but otoh I fear it may make it more attractive
> to actually override the __must_check (which really ought to be an
> exception).
Well, I think anyone reviewing the code would realize that the error
is being ignored, and hence check that this is actually intended.
Thanks, Roger.