lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9635eaa4ccc1141fb0dd8c3687f46da7149206ad.camel@perches.com>
Date:   Wed, 26 Aug 2020 08:44:30 -0700
From:   Joe Perches <joe@...ches.com>
To:     Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        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 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@...ux.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(...);


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ