public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Waqar Hameed <waqar.hameed@axis.com>
To: <alexandre.belloni@bootlin.com>
Cc: <linux-rtc@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/2] rtc: rx8111: demote warnings to debug level
Date: Fri, 19 Apr 2024 13:02:55 +0200	[thread overview]
Message-ID: <pndsezhmx7k.fsf@axis.com> (raw)
In-Reply-To: <20240417191937.33790-1-alexandre.belloni@bootlin.com> (alexandre belloni's message of "Wed, 17 Apr 2024 21:19:35 +0200")

On Wed, Apr 17, 2024 at 21:19 +0200 alexandre.belloni@bootlin.com wrote:

> From: Alexandre Belloni <alexandre.belloni@bootlin.com>
>
> The proper way for userspace to react on a read time error is to have a
> look at the voltage low information. There is no point in cluttering dmesg
> as it is often not even visible to the end user.
>
> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
> ---
>  drivers/rtc/rtc-rx8111.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/rtc/rtc-rx8111.c b/drivers/rtc/rtc-rx8111.c
> index 62d2352de102..4a35bd921b33 100644
> --- a/drivers/rtc/rtc-rx8111.c
> +++ b/drivers/rtc/rtc-rx8111.c
> @@ -170,14 +170,14 @@ static int rx8111_read_time(struct device *dev, struct rtc_time *tm)
>  	}
>  
>  	if (FIELD_GET(RX8111_FLAG_XST_BIT, regval)) {
> -		dev_warn(data->dev,
> -			 "Crystal oscillation stopped, time is not reliable\n");
> +		dev_dbg(data->dev,
> +			"Crystal oscillation stopped, time is not reliable\n");
>  		return -EINVAL;
>  	}
>  
>  	if (FIELD_GET(RX8111_FLAG_VLF_BIT, regval)) {
> -		dev_warn(data->dev,
> -			 "Low voltage detected, time is not reliable\n");
> +		dev_dbg(data->dev,
> +			"Low voltage detected, time is not reliable\n");
>  		return -EINVAL;
>  	}
>  
> @@ -188,7 +188,7 @@ static int rx8111_read_time(struct device *dev, struct rtc_time *tm)
>  	}
>  
>  	if (regval) {
> -		dev_warn(data->dev, "Clock stopped, time is not reliable\n");
> +		dev_dbg(data->dev, "Clock stopped, time is not reliable\n");
>  		return -EINVAL;
>  	}

There are several other drivers that uses `dev_warn()` in these cases,
and it was just followed here as well. I agree with you here though!

Reviewed-by: Waqar Hameed <waqar.hameed@axis.com>

      parent reply	other threads:[~2024-04-19 11:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-17 19:19 [PATCH 1/2] rtc: rx8111: demote warnings to debug level alexandre.belloni
2024-04-17 19:19 ` [PATCH 2/2] rtc: rx8111: handle VLOW flag alexandre.belloni
2024-04-19 11:04   ` Waqar Hameed
2024-04-19 11:02 ` Waqar Hameed [this message]

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=pndsezhmx7k.fsf@axis.com \
    --to=waqar.hameed@axis.com \
    --cc=alexandre.belloni@bootlin.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