[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20231211120714.GB2894@thinkpad>
Date: Mon, 11 Dec 2023 17:37:14 +0530
From: Manivannan Sadhasivam <mani@...nel.org>
To: Bean Huo <beanhuo@...pp.de>
Cc: avri.altman@....com, bvanassche@....org, alim.akhtar@...sung.com,
jejb@...ux.ibm.com, martin.petersen@...cle.com,
quic_cang@...cinc.com, quic_asutoshd@...cinc.com,
beanhuo@...ron.com, thomas@...ch.de, linux-scsi@...r.kernel.org,
linux-kernel@...r.kernel.org, mikebi@...ron.com, lporzio@...ron.com
Subject: Re: [PATCH v4 2/3] scsi: ufs: core: Add UFS RTC support
On Sun, Dec 10, 2023 at 08:28:21PM +0100, Bean Huo wrote:
> On Fri, 2023-12-08 at 22:36 +0530, Manivannan Sadhasivam wrote:
> > Except that the warning will be issued to users after each 10s for 40
> > years.
> > Atleast get rid of that.
>
> how about using dev_warn_once(), instead of dev_warn, using
> dev_warn_once() ensures the warning is issued only once.
>
Sounds good to me.
- Mani
>
> diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c
> index 953d50cc4256..b2287d2f9bf3 100644
> --- a/drivers/ufs/core/ufshcd.c
> +++ b/drivers/ufs/core/ufshcd.c
> @@ -8205,7 +8205,7 @@ static void ufshcd_update_rtc(struct ufs_hba
> *hba)
> ktime_get_real_ts64(&ts64);
>
> if (ts64.tv_sec < hba->dev_info.rtc_time_baseline) {
> - dev_warn(hba->dev, "%s: Current time precedes previous
> setting!\n", __func__);
> + dev_warn_once(hba->dev, "%s: Current time precedes
> previous setting!\n", __func__);
>
>
>
> Kind regards,
> Bean
--
மணிவண்ணன் சதாசிவம்
Powered by blists - more mailing lists