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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 26 Aug 2020 13:23:40 +0200
From:   Andrzej Hajda <a.hajda@...sung.com>
To:     Andy Shevchenko <andriy.shevchenko@...ux.intel.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

Hi Andy,

On 26.08.2020 12:44, 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.


There are many cases where __must_check can be annoying, for example:

ret = ...;

if (ret < 0) {

     dev_err_probe(...);

     goto cleanup;

}


Or (less frequently):

ptr = ...;

if (IS_ERR(ptr)) {

     dev_err_probe(...);

     return ptr;

}


Of course in both cases one can add workarounds, but I am not sure what 
is better.


Regards

Andrzej


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ