[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <973f4d54da796db4fcc9b643b10889cbc8839989.camel@perches.com>
Date: Wed, 26 Aug 2020 09:14:17 -0700
From: Joe Perches <joe@...ches.com>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc: Andrzej Hajda <a.hajda@...sung.com>, linux-kernel@...r.kernel.org,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"Rafael J . Wysocki" <rafael@...nel.org>
Subject: Re: [PATCH v1] driver core: Annotate dev_err_probe() with
__must_check
On Wed, 2020-08-26 at 18:55 +0300, Andy Shevchenko wrote:
> On Wed, Aug 26, 2020 at 08:44:30AM -0700, Joe Perches wrote:
> > On Wed, 2020-08-26 at 13:44 +0300, Andy Shevchenko wrote:
>
> ...
>
> > > -int dev_err_probe(const struct device *dev, int err, const char *fmt, ...);
> > > +int __must_check dev_err_probe(const struct device *dev, int err, const char *fmt, ...);
> >
> > Generally, the __must_check should go before the return type
> > and the extern isn't necessary and is also generally not used
> > in device.h, so I'd prefer:
> >
> > __printf(3, 4)
> > __must_check int dev_err_probe(...);
>
> I grepped the current code... I don't see support of your preference.
> Maybe I missed something? (I'm talking about include/*)
Hey Andy.
The __must_check location is just personal belief
as it makes grep significantly easier
<qualifiers> type function(args...)
is a much easier grep pattern than
<qualifiers> type <qualifiers> function(args...)
extern function declarations are generally unnecessary
and should be avoided.
cheers, Joe
Powered by blists - more mailing lists