From: sashiko-bot@kernel.org
To: "Antoni Pokusinski" <apokusinski01@gmail.com>
Cc: robh@kernel.org, devicetree@vger.kernel.org, conor+dt@kernel.org,
linux-rtc@vger.kernel.org,
"Alexandre Belloni" <alexandre.belloni@bootlin.com>
Subject: Re: [PATCH v3 5/8] rtc: abx80x: use regmap instead of I2C specific API
Date: Fri, 31 Jul 2026 19:05:58 +0000 [thread overview]
Message-ID: <20260731190559.39CCB1F00AC4@smtp.kernel.org> (raw)
In-Reply-To: <20260731184831.44037-6-apokusinski01@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Variables declared as `int` are passed by reference to `regmap_read`, which expects an `unsigned int *`.
--
--- Patch [5]: [PATCH v3 5/8] rtc: abx80x: use regmap instead of I2C specific API ---
commit 5bae78c37282c7d7693255ad432126ac7e8c51f8
Author: Antoni Pokusinski <apokusinski01@gmail.com>
rtc: abx80x: use regmap instead of I2C specific API
This commit reworks the abx80x RTC driver to use regmap API instead of
i2c_smbus functions. This prepares the driver for future ABX81X SPI support.
> diff --git a/drivers/rtc/rtc-abx80x.c b/drivers/rtc/rtc-abx80x.c
> index 4ac3ace687a1e..23823fc2f5458 100644
> --- a/drivers/rtc/rtc-abx80x.c
> +++ b/drivers/rtc/rtc-abx80x.c
[ ... ]
> @@ -221,8 +224,7 @@ static int abx80x_rtc_read_time(struct device *dev, struct rtc_time *tm)
>
> static int abx80x_rtc_set_time(struct device *dev, struct rtc_time *tm)
> {
> - struct i2c_client *client = to_i2c_client(dev);
> - struct abx80x_priv *priv = i2c_get_clientdata(client);
> + struct abx80x_priv *priv = dev_get_drvdata(dev);
> unsigned char buf[8];
> int err, flags;
>
[ ... ]
> /* Clear the OF bit of Oscillator Status Register */
> - flags = i2c_smbus_read_byte_data(client, ABX8XX_REG_OSS);
> - if (flags < 0)
> - return flags;
> + err = regmap_read(priv->regmap, ABX8XX_REG_OSS, &flags);
[Severity: Low]
Will this cause a compiler error on GCC 14+ due to incompatible pointer types?
The regmap_read() function expects an "unsigned int *" for its third argument,
but "flags" is declared as an "int" here.
It looks like this same issue with passing an "int *" to regmap_read() also
happens with the "flags" variable in abx80x_rtc_set_autocalibration() and
oscillator_store(), as well as with the "data" variable in abx80x_probe().
[ ... ]
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260731184831.44037-1-apokusinski01@gmail.com?part=5
next prev parent reply other threads:[~2026-07-31 19:05 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-31 18:48 [PATCH v3 0/8] rtc: abx80x: add support for abx81x Antoni Pokusinski
2026-07-31 18:48 ` [PATCH v3 1/8] dt-bindings: rtc: abx80x: document ABX81X RTCs Antoni Pokusinski
2026-07-31 18:57 ` sashiko-bot
2026-07-31 18:48 ` [PATCH v3 2/8] rtc: abx80x: add mutex protection for register writes Antoni Pokusinski
2026-07-31 19:02 ` sashiko-bot
2026-07-31 18:48 ` [PATCH v3 3/8] rtc: abx80x: properly handle shared IRQs Antoni Pokusinski
2026-07-31 19:05 ` sashiko-bot
2026-07-31 18:48 ` [PATCH v3 4/8] rtc: abx80x: add irq to struct abx80x_priv Antoni Pokusinski
2026-07-31 19:04 ` sashiko-bot
2026-07-31 18:48 ` [PATCH v3 5/8] rtc: abx80x: use regmap instead of I2C specific API Antoni Pokusinski
2026-07-31 19:05 ` sashiko-bot [this message]
2026-07-31 18:48 ` [PATCH v3 6/8] rtc: abx80x: replace read-modify-write pattern with regmap helpers Antoni Pokusinski
2026-07-31 19:01 ` sashiko-bot
2026-07-31 18:48 ` [PATCH v3 7/8] rtc: abx80x: create abx80x_i2c_probe() Antoni Pokusinski
2026-07-31 19:02 ` sashiko-bot
2026-07-31 18:48 ` [PATCH v3 8/8] rtc: abx80x: add support for ABX81X Antoni Pokusinski
2026-07-31 19:05 ` sashiko-bot
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=20260731190559.39CCB1F00AC4@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=alexandre.belloni@bootlin.com \
--cc=apokusinski01@gmail.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=linux-rtc@vger.kernel.org \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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