From: Joe Perches <joe@perches.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Andrzej Hajda <a.hajda@samsung.com>,
linux-kernel@vger.kernel.org,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"Rafael J . Wysocki" <rafael@kernel.org>
Subject: Re: [PATCH v1] driver core: Annotate dev_err_probe() with __must_check
Date: Wed, 26 Aug 2020 08:44:30 -0700 [thread overview]
Message-ID: <9635eaa4ccc1141fb0dd8c3687f46da7149206ad.camel@perches.com> (raw)
In-Reply-To: <20200826104459.81979-1-andriy.shevchenko@linux.intel.com>
On Wed, 2020-08-26 at 13:44 +0300, Andy Shevchenko wrote:
> We have got already new users of this API which interpret it differently
> and miss the opportunity to optimize their code.
>
> In order to avoid similar cases in the future, annotate dev_err_probe()
> with __must_check.
>
> Fixes: a787e5400a1c ("driver core: add device probe log helper")
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
> include/linux/device.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/linux/device.h b/include/linux/device.h
> index ca18da4768e3..f9d2e5703bbf 100644
> --- a/include/linux/device.h
> +++ b/include/linux/device.h
> @@ -978,7 +978,7 @@ void device_links_supplier_sync_state_pause(void);
> void device_links_supplier_sync_state_resume(void);
>
> extern __printf(3, 4)
> -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(...);
next prev parent reply other threads:[~2020-08-26 15:44 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20200826104505eucas1p2e6ac15abfb6104fdbc4229fc148cbe02@eucas1p2.samsung.com>
2020-08-26 10:44 ` Andy Shevchenko
2020-08-26 11:23 ` Andrzej Hajda
2020-08-26 14:16 ` Andy Shevchenko
2020-08-26 15:44 ` Joe Perches [this message]
2020-08-26 15:55 ` Andy Shevchenko
2020-08-26 16:14 ` Joe Perches
2020-09-09 6:29 ` Krzysztof Kozlowski
2020-09-09 7:02 ` Greg Kroah-Hartman
2020-09-09 7:08 ` Krzysztof Kozlowski
2020-09-09 7:37 ` Greg Kroah-Hartman
2020-09-09 8:46 ` Andy Shevchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9635eaa4ccc1141fb0dd8c3687f46da7149206ad.camel@perches.com \
--to=joe@perches.com \
--cc=a.hajda@samsung.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rafael@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®