All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexandre Belloni <alexandre.belloni@bootlin.com>
To: Wolfram Sang <wsa+renesas@sang-engineering.com>,
	linux-renesas-soc@vger.kernel.org,
	Miquel Raynal <miquel.raynal@bootlin.com>,
	linux-rtc@vger.kernel.org
Subject: Re: [RFC PATCH 1/2] rtc: rzn1: drop superfluous wday calculation
Date: Sat, 23 Nov 2024 11:25:58 +0100	[thread overview]
Message-ID: <2024112310255821e4b03e@mail.local> (raw)
In-Reply-To: <Z0GLz6OJWhnhpIVB@ninjato>

On 23/11/2024 09:01:19+0100, Wolfram Sang wrote:
> 
> > >  	struct rzn1_rtc *rtc = dev_get_drvdata(dev);
> > > @@ -109,7 +96,6 @@ static int rzn1_rtc_read_time(struct device *dev, struct rtc_time *tm)
> > >  	tm->tm_sec = bcd2bin(tm->tm_sec);
> > >  	tm->tm_min = bcd2bin(tm->tm_min);
> > >  	tm->tm_hour = bcd2bin(tm->tm_hour);
> > > -	tm->tm_wday = bcd2bin(tm->tm_wday);
> > 
> > With this, you're not even using wday anymore. This is fine as there are
> > probably no userspace users of the value but the commit message claims
> > it is now using it without conversion.
> 
> But it is still read form and written to the register. And the values of
> the register go from 0 to 6, same as tm_wday. So not even BCD conversion
> is necessary. So, I think it is still used. Am I missing something?
> 

You didn't, I misread the diff.



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

  reply	other threads:[~2024-11-23 10:26 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-22 10:14 [RFC PATCH 0/2] rtc: rzn1: simplify driver Wolfram Sang
2024-11-22 10:14 ` [RFC PATCH 1/2] rtc: rzn1: drop superfluous wday calculation Wolfram Sang
2024-11-22 23:26   ` Alexandre Belloni
2024-11-23  8:01     ` Wolfram Sang
2024-11-23 10:25       ` Alexandre Belloni [this message]
2024-11-24 15:51         ` Wolfram Sang
2024-11-22 10:14 ` [RFC PATCH 2/2] rtc: rzn1: reduce register access Wolfram Sang
2024-11-22 10:39   ` Miquel Raynal
2024-11-25 22:33 ` [RFC PATCH 0/2] rtc: rzn1: simplify driver 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=2024112310255821e4b03e@mail.local \
    --to=alexandre.belloni@bootlin.com \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=linux-rtc@vger.kernel.org \
    --cc=miquel.raynal@bootlin.com \
    --cc=wsa+renesas@sang-engineering.com \
    /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.