[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Zv7Yw1iJehLW73Fq@smile.fi.intel.com>
Date: Thu, 3 Oct 2024 20:47:47 +0300
From: Andy Shevchenko <andriy.shevchenko@...el.com>
To: Przemek Kitszel <przemyslaw.kitszel@...el.com>
Cc: linux-kernel@...r.kernel.org, amadeuszx.slawinski@...ux.intel.com,
Tony Nguyen <anthony.l.nguyen@...el.com>,
nex.sw.ncis.osdt.itp.upstreaming@...el.com, netdev@...r.kernel.org,
Markus Elfring <Markus.Elfring@....de>, Kees Cook <kees@...nel.org>,
Dmitry Torokhov <dmitry.torokhov@...il.com>,
Dan Carpenter <dan.carpenter@...aro.org>,
Peter Zijlstra <peterz@...radead.org>
Subject: Re: [PATCH v1] cleanup: adjust scoped_guard() to avoid potential
warning
On Thu, Oct 03, 2024 at 03:38:45PM +0200, Przemek Kitszel wrote:
> On 10/3/24 14:46, Andy Shevchenko wrote:
> > 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;
>
> I guess you are now opposed to just part of the patch, should I add:
> # for enabling "scoped_guard(...) return ...;" shortcut
> or keep it unqualified?
As you put a reference to the whole list the detailed elaboration
is not needed.
> > 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?
>
> 0/1 vs false/true and whitespaces, especially for RFC, are not big deal
+ the above now.
I assume every contribution should be credited, no?
Otherwise it sounds like a bit of disrespect.
> anyway, I will reword v2 to give you credits for your valuable
> contribution during internal review :)
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists