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é <roger....@citrix.com> >> Signed-off-by: Jan Beulich <jbeul...@suse.com> > > Reviewed-by: Roger Pau Monné <roger....@citrix.com>
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). Jan