All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexandre Belloni <alexandre.belloni@bootlin.com>
To: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Cc: Alessandro Zummo <a.zummo@towertech.it>,
	linux-rtc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/6] rtc: isl12022: simplify some expressions
Date: Wed, 21 Sep 2022 09:12:08 +0200	[thread overview]
Message-ID: <Yyq5SEDjaimLpy/B@mail.local> (raw)
In-Reply-To: <4fdd52c9-2de7-b86b-f081-cb59a8f72c5a@rasmusvillemoes.dk>

On 21/09/2022 09:08:52+0200, Rasmus Villemoes wrote:
> On 14/09/2022 17.08, Alexandre Belloni wrote:
> > Hi,
> > 
> > On 30/08/2022 12:01:48+0200, Rasmus Villemoes wrote:
> >> These instances of '&client->dev' might as well be spelled 'dev', since
> >> 'client' has been computed from 'dev' via 'client =
> >> to_i2c_client(dev)'.
> >>
> >> Later patches will get rid of that local variable 'client', so remove
> >> these unnecessary references so those later patches become easier to
> >> read.
> >>
> >> Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
> >> ---
> >>  drivers/rtc/rtc-isl12022.c | 11 +++++------
> >>  1 file changed, 5 insertions(+), 6 deletions(-)
> >>
> >> diff --git a/drivers/rtc/rtc-isl12022.c b/drivers/rtc/rtc-isl12022.c
> >> index 2dc19061cf5f..5e6bb9153c89 100644
> >> --- a/drivers/rtc/rtc-isl12022.c
> >> +++ b/drivers/rtc/rtc-isl12022.c
> >> @@ -112,13 +112,13 @@ static int isl12022_rtc_read_time(struct device *dev, struct rtc_time *tm)
> >>  		return ret;
> >>  
> >>  	if (buf[ISL12022_REG_SR] & (ISL12022_SR_LBAT85 | ISL12022_SR_LBAT75)) {
> >> -		dev_warn(&client->dev,
> >> +		dev_warn(dev,
> > 
> > While at it, I would prefer that one to also become a dev_dbg
> 
> Well, I prefer to keep it, because my customer actually wants to use
> this information. Grepping it out from dmesg is of course not the best
> interface, but if it gets demoted to a dev_dbg() it doesn't even get there.
> 

There is a proper userspace interface, look for RTC_VL_READ.

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

  reply	other threads:[~2022-09-21  7:12 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-30 10:01 [PATCH 0/6] rtc: isl12022: cleanups and hwmon support Rasmus Villemoes
2022-08-30 10:01 ` [PATCH 1/6] rtc: isl12022: stop using deprecated devm_rtc_device_register() Rasmus Villemoes
2022-08-30 10:01 ` [PATCH 2/6] rtc: isl12022: simplify some expressions Rasmus Villemoes
2022-09-14 15:08   ` Alexandre Belloni
2022-09-21  7:08     ` Rasmus Villemoes
2022-09-21  7:12       ` Alexandre Belloni [this message]
2022-08-30 10:01 ` [PATCH 3/6] rtc: isl12022: use dev_set_drvdata() instead of i2c_set_clientdata() Rasmus Villemoes
2022-08-30 10:01 ` [PATCH 4/6] rtc: isl12022: drop redundant write to HR register Rasmus Villemoes
2022-08-30 10:01 ` [PATCH 5/6] rtc: isl12022: switch to using regmap API Rasmus Villemoes
2022-08-30 10:01 ` [PATCH 6/6] rtc: isl12022: add support for temperature sensor Rasmus Villemoes
2022-08-30 13:13   ` Guenter Roeck
2022-09-14 15:12   ` Alexandre Belloni
2022-09-21  7:58     ` Rasmus Villemoes
2022-09-21  9:10       ` Alexandre Belloni
2022-09-09  8:15 ` [PATCH 0/6] rtc: isl12022: cleanups and hwmon support Rasmus Villemoes
2022-09-14 15:16   ` Alexandre Belloni
2022-09-21 11:46 ` [PATCH v2 0/9] " Rasmus Villemoes
2022-09-21 11:46   ` [PATCH v2 1/9] rtc: isl12022: stop using deprecated devm_rtc_device_register() Rasmus Villemoes
2022-09-21 11:46   ` [PATCH v2 2/9] rtc: isl12022: specify range_min and range_max Rasmus Villemoes
2022-09-21 11:46   ` [PATCH v2 3/9] rtc: isl12022: drop a dev_info() Rasmus Villemoes
2022-09-21 11:46   ` [PATCH v2 4/9] rtc: isl12022: simplify some expressions Rasmus Villemoes
2022-09-21 11:46   ` [PATCH v2 5/9] rtc: isl12022: use %ptR Rasmus Villemoes
2022-09-21 11:46   ` [PATCH v2 6/9] rtc: isl12022: use dev_set_drvdata() instead of i2c_set_clientdata() Rasmus Villemoes
2022-09-21 11:46   ` [PATCH v2 7/9] rtc: isl12022: drop redundant write to HR register Rasmus Villemoes
2022-09-21 11:46   ` [PATCH v2 8/9] rtc: isl12022: switch to using regmap API Rasmus Villemoes
2022-09-21 11:46   ` [PATCH v2 9/9] rtc: isl12022: add support for temperature sensor Rasmus Villemoes
2022-09-21 14:13     ` Guenter Roeck
2022-09-23  8:40       ` Rasmus Villemoes
2022-09-23 13:51         ` Guenter Roeck
2022-10-26 13:38     ` [PATCH v3 " Rasmus Villemoes
2022-10-26 14:46       ` Guenter Roeck
2022-11-04 11:02       ` [PATCH v4] " Rasmus Villemoes
2022-11-14 21:41         ` Alexandre Belloni
2022-10-07 13:51   ` [PATCH v2 0/9] rtc: isl12022: cleanups and hwmon support Rasmus Villemoes
2022-10-13 21:31   ` Alexandre Belloni

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=Yyq5SEDjaimLpy/B@mail.local \
    --to=alexandre.belloni@bootlin.com \
    --cc=a.zummo@towertech.it \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rtc@vger.kernel.org \
    --cc=linux@rasmusvillemoes.dk \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.