The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: <Balakrishnan.S@microchip.com>
To: <amergnat@baylibre.com>
Cc: <alexandre.belloni@bootlin.com>, <baolin.wang@linux.alibaba.com>,
	<zhang.lyra@gmail.com>, <orsonzhai@gmail.com>,
	<linux-kernel@vger.kernel.org>, <linux-rtc@vger.kernel.org>
Subject: Re: [PATCH 4/4] rtc: s35390a: convert to dev_err_probe()
Date: Wed, 1 Jul 2026 07:26:29 +0000	[thread overview]
Message-ID: <7867be72-2f25-4ea7-9b08-9ee8a8037ca1@microchip.com> (raw)
In-Reply-To: <178283943069.3929176.6475131827523489401.b4-review@b4>

Hi Alexandre,

Thanks for the review/feedback.

On 30/06/26 10:40 pm, Alexandre Mergnat wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> 
> On Thu, 28 May 2026 09:16:47 +0530, Balakrishnan Sambath <balakrishnan.s@microchip.com> wrote:
>> diff --git a/drivers/rtc/rtc-s35390a.c b/drivers/rtc/rtc-s35390a.c
>> index a4678d7c6cf6..342fd2b568a3 100644
>> --- a/drivers/rtc/rtc-s35390a.c
>> +++ b/drivers/rtc/rtc-s35390a.c
>> @@ -479,10 +479,8 @@ static int s35390a_probe(struct i2c_client *client)
>>                return PTR_ERR(rtc);
>>
>>        err_read = s35390a_read_status(s35390a, &status1);
>> -     if (err_read < 0) {
>> -             dev_err(dev, "error resetting chip\n");
>> -             return err_read;
>> -     }
>> +     if (err_read < 0)
>> +             return dev_err_probe(dev, err_read, "error resetting chip\n");
> 
> The devm_i2c_new_dummy_device() loop above this hunk still uses
> dev_err()+return PTR_ERR("Address %02x unavailable"). dev_err_probe() takes
> format args, so it converts cleanly:
> 
>      return dev_err_probe(dev, PTR_ERR(s35390a->client[i]),
>                           "Address %02x unavailable\n", client->addr + i);
> 
> Worth converting for consistency with the rest of the probe.
Sure, I'll fix this too in next revision.
> 
>> @@ -493,16 +491,12 @@ static int s35390a_probe(struct i2c_client *client)
>>                /* disable alarm (and maybe test mode) */
>>                buf = 0;
>>                err = s35390a_set_reg(s35390a, S35390A_CMD_STATUS2, &buf, 1);
>> -             if (err < 0) {
>> -                     dev_err(dev, "error disabling alarm");
>> -                     return err;
>> -             }
>> +             if (err < 0)
>> +                     return dev_err_probe(dev, err, "error disabling alarm");
> 
> This message is missing its trailing newline (pre-existing). dev_err_probe()
> formats as "error %pe: %pV" and does not append "\n" itself, so the line
> runs into the next log message. Since you are touching this line, adding
> "\n" is a cheap fix even if the issue was here before your patch.
> I recommand to fix it ;)
Okay noted. Will fix it too.
> 
> --
> Alexandre Mergnat <amergnat@baylibre.com>


  reply	other threads:[~2026-07-01  7:26 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-28  3:46 [PATCH 0/4] rtc: convert several drivers to dev_err_probe() Balakrishnan Sambath
2026-05-28  3:46 ` [PATCH 1/4] rtc: palmas: convert " Balakrishnan Sambath
2026-06-30 17:10   ` Alexandre Mergnat
2026-05-28  3:46 ` [PATCH 2/4] rtc: moxart: " Balakrishnan Sambath
2026-06-30 17:10   ` Alexandre Mergnat
2026-05-28  3:46 ` [PATCH 3/4] rtc: sc27xx: " Balakrishnan Sambath
2026-06-30 17:10   ` Alexandre Mergnat
2026-05-28  3:46 ` [PATCH 4/4] rtc: s35390a: " Balakrishnan Sambath
2026-06-30 17:10   ` Alexandre Mergnat
2026-07-01  7:26     ` Balakrishnan.S [this message]
2026-07-01  8:57       ` Alexandre Belloni
2026-07-02  4:01         ` Balakrishnan.S

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=7867be72-2f25-4ea7-9b08-9ee8a8037ca1@microchip.com \
    --to=balakrishnan.s@microchip.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=amergnat@baylibre.com \
    --cc=baolin.wang@linux.alibaba.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rtc@vger.kernel.org \
    --cc=orsonzhai@gmail.com \
    --cc=zhang.lyra@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox