lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <fe5eacf2016622f4f3335a1d39063ec523999184.camel@iokpp.de>
Date:   Sun, 10 Dec 2023 20:28:21 +0100
From:   Bean Huo <beanhuo@...pp.de>
To:     Manivannan Sadhasivam <mani@...nel.org>
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 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.


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

Powered by Openwall GNU/*/Linux Powered by OpenVZ