Subject: Re: [PATCH v1] cleanup: adjust scoped_guard() to avoid potential warning

From: Andy Shevchenko <[email-masked]>
Date: Thu, 3 Oct 2024 15:46:24 +0300

On Thu, Oct 03, 2024 at 03:43:17PM +0300, Andy Shevchenko wrote:
> On Thu, Oct 03, 2024 at 01:39:06PM +0200, Przemek Kitszel wrote:

...

> > +#define __scoped_guard_labeled(_label, _name, args...)			\
> > +	for (CLASS(_name, scope)(args);					\
> > +	     __guard_ptr(_name)(&scope) || !__is_cond_ptr(_name);	\
> > +		     ({ goto _label; }))				\
> > +		if (0)							\
> > +		_label:							\
> > +			break;						\
> > +		else
> 
> I believe the following will folow more the style we use in the kernel:
> 
> #define __scoped_guard_labeled(_label, _name, args...)			\
> 	for (CLASS(_name, scope)(args);					\
> 	     __guard_ptr(_name)(&scope) || !__is_cond_ptr(_name);	\
> 		     ({ goto _label; }))				\
> 		if (0) {						\
> _label:									\
> 			break;						\
> 		} else
> 
> ...
> 
> > -	     *done = NULL; !done; done = (void *)1) \
> > +	     *done = NULL; !done; done = (void *)1 +  	\
> 
> You have TABs/spaces mix in this line now.

And FWIW:
1) still NAKed;
2) interestingly you haven't mentioned that meanwhile I also helped you to
improve this version of the patch. Is it because I NAKed it?

-- 
With Best Regards,
Andy Shevchenko