public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Alexandre Belloni <alexandre.belloni@bootlin.com>
To: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Cc: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>,
	Edmundo Carmona Antoranz <eantoranz@gmail.com>,
	cw00.choi@samsung.com, b.zolnierkie@samsung.com,
	a.zummo@towertech.it, linux-rtc@vger.kernel.org,
	linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] rtc: max77686: Remove some dead code
Date: Wed, 12 May 2021 23:22:37 +0200	[thread overview]
Message-ID: <YJxHHWvzppGHUbCW@piout.net> (raw)
In-Reply-To: <9535976d-1029-3668-4be4-c09068ccf84c@wanadoo.fr>

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

  reply	other threads:[~2021-05-12 22:19 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-08  5:43 [PATCH] rtc: max77686: Remove some dead code Christophe JAILLET
2021-05-08 14:38 ` Edmundo Carmona Antoranz
2021-05-08 16:59   ` Christophe JAILLET
2021-05-09  0:06     ` Edmundo Carmona Antoranz
2021-05-09 21:06       ` Alexandre Belloni
2021-05-10 12:20         ` Krzysztof Kozlowski
2021-05-12 16:13           ` Alexandre Belloni
2021-05-12 16:24             ` Krzysztof Kozlowski
2021-05-12 16:54               ` Alexandre Belloni
2021-05-12 20:02             ` Christophe JAILLET
2021-05-12 21:22               ` Alexandre Belloni [this message]
2021-05-10 12:18 ` Krzysztof Kozlowski

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=YJxHHWvzppGHUbCW@piout.net \
    --to=alexandre.belloni@bootlin.com \
    --cc=a.zummo@towertech.it \
    --cc=b.zolnierkie@samsung.com \
    --cc=christophe.jaillet@wanadoo.fr \
    --cc=cw00.choi@samsung.com \
    --cc=eantoranz@gmail.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=krzysztof.kozlowski@canonical.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rtc@vger.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