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] [day] [month] [year] [list]
Message-ID: <YJxHHWvzppGHUbCW@piout.net>
Date:   Wed, 12 May 2021 23:22:37 +0200
From:   Alexandre Belloni <alexandre.belloni@...tlin.com>
To:     Christophe JAILLET <christophe.jaillet@...adoo.fr>
Cc:     Krzysztof Kozlowski <krzysztof.kozlowski@...onical.com>,
        Edmundo Carmona Antoranz <eantoranz@...il.com>,
        cw00.choi@...sung.com, b.zolnierkie@...sung.com,
        a.zummo@...ertech.it, linux-rtc@...r.kernel.org,
        linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: Re: [PATCH] rtc: max77686: Remove some dead code

On 12/05/2021 22:02:17+0200, Christophe JAILLET wrote:
> > The only error path that will not print a message by default (it is
> > dev_dbg) is when rtc-ops is NULL which I don't expect would regress
> > anyway.
> > 
> > A better way to remove the dead code would be to switch to
> > devm_rtc_allocate_device/devm_rtc_register_device.
> 
> I don't follow you here.
> Isn't devm_rtc_device_register = devm_rtc_allocate_device +
> devm_rtc_register_device?
> 
> What would be the benefit for switch to the latter?
> 

The immediate benefit is that this solve a possible but very unlikely
race condition around the character device removal when probe ultimately
fails. The other benefit is that I won't have to do it later to handle
the modern features.

> 
> > And even better would
> > be to take that opportunity to set range_min and range_max ;)
> 
> Maybe, but this goes beyond my knowledge.
> I'll let someone else propose a patch for it.
> 
> CJ
> 

-- 
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ