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: <0c8b01d8280b$868abc20$93a03460$@samsung.com>
Date:   Tue, 22 Feb 2022 22:14:53 +0530
From:   "Alim Akhtar" <alim.akhtar@...sung.com>
To:     "'Krzysztof Kozlowski'" <krzysztof.kozlowski@...onical.com>,
        "'Avri Altman'" <avri.altman@....com>,
        "'Rob Herring'" <robh+dt@...nel.org>,
        "'Andy Gross'" <agross@...nel.org>,
        "'Bjorn Andersson'" <bjorn.andersson@...aro.org>,
        "'Wei Xu'" <xuwei5@...ilicon.com>, "'Nishanth Menon'" <nm@...com>,
        "'Vignesh Raghavendra'" <vigneshr@...com>,
        "'Tero Kristo'" <kristo@...nel.org>,
        "'James E.J. Bottomley'" <jejb@...ux.ibm.com>,
        "'Martin K. Petersen'" <martin.petersen@...cle.com>,
        "'Jan Kotas'" <jank@...ence.com>, "'Li Wei'" <liwei213@...wei.com>,
        "'Stanley Chu'" <stanley.chu@...iatek.com>,
        "'Yaniv Gardi'" <ygardi@...eaurora.org>,
        <linux-scsi@...r.kernel.org>, <devicetree@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>, <linux-arm-msm@...r.kernel.org>,
        <linux-arm-kernel@...ts.infradead.org>,
        <linux-samsung-soc@...r.kernel.org>,
        <linux-mediatek@...ts.infradead.org>
Subject: RE: [PATCH v2 09/15] scsi: ufs: deprecate 'freq-table-hz' property

Hi Krzysztof

>-----Original Message-----
>From: Krzysztof Kozlowski [mailto:krzysztof.kozlowski@...onical.com]
>Sent: Tuesday, February 22, 2022 8:29 PM
>To: Alim Akhtar <alim.akhtar@...sung.com>; Avri Altman
><avri.altman@....com>; Rob Herring <robh+dt@...nel.org>; Krzysztof
>Kozlowski <krzysztof.kozlowski@...onical.com>; Andy Gross
><agross@...nel.org>; Bjorn Andersson <bjorn.andersson@...aro.org>; Wei
>Xu <xuwei5@...ilicon.com>; Nishanth Menon <nm@...com>; Vignesh
>Raghavendra <vigneshr@...com>; Tero Kristo <kristo@...nel.org>; James E.J.
>Bottomley <jejb@...ux.ibm.com>; Martin K. Petersen
><martin.petersen@...cle.com>; Jan Kotas <jank@...ence.com>; Li Wei
><liwei213@...wei.com>; Stanley Chu <stanley.chu@...iatek.com>; Yaniv
>Gardi <ygardi@...eaurora.org>; linux-scsi@...r.kernel.org;
>devicetree@...r.kernel.org; linux-kernel@...r.kernel.org; linux-arm-
>msm@...r.kernel.org; linux-arm-kernel@...ts.infradead.org; linux-samsung-
>soc@...r.kernel.org; linux-mediatek@...ts.infradead.org
>Subject: [PATCH v2 09/15] scsi: ufs: deprecate 'freq-table-hz' property
>
>The 'freq-table-hz' is not correct in DT schema, because '-hz' suffix
defines
>uint32 type, not an array.  Therefore deprecate 'freq-table-hz'
>and use 'freq-table' instead.
>
May be once all the dts change migrate to using 'freq-table', just remove
'freq-table-hz' from driver.

>Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@...onical.com>
>---
> drivers/scsi/ufs/ufshcd-pltfrm.c | 21 +++++++++++++--------
> 1 file changed, 13 insertions(+), 8 deletions(-)
>
>diff --git a/drivers/scsi/ufs/ufshcd-pltfrm.c
b/drivers/scsi/ufs/ufshcd-pltfrm.c
>index 87975d1a21c8..2b192477d158 100644
>--- a/drivers/scsi/ufs/ufshcd-pltfrm.c
>+++ b/drivers/scsi/ufs/ufshcd-pltfrm.c
>@@ -47,8 +47,9 @@ static int ufshcd_parse_clock_info(struct ufs_hba *hba)
> 	if (cnt <= 0)
> 		goto out;
>
>-	if (!of_get_property(np, "freq-table-hz", &len)) {
>-		dev_info(dev, "freq-table-hz property not specified\n");
>+	if (!of_get_property(np, "freq-table", &len) ||
>+	    !of_get_property(np, "freq-table-hz", &len)) {
>+		dev_info(dev, "freq-table property not specified\n");
> 		goto out;
> 	}
>
>@@ -57,7 +58,7 @@ static int ufshcd_parse_clock_info(struct ufs_hba *hba)
>
> 	sz = len / sizeof(*clkfreq);
> 	if (sz != 2 * cnt) {
>-		dev_err(dev, "%s len mismatch\n", "freq-table-hz");
>+		dev_err(dev, "%s len mismatch\n", "freq-table");
> 		ret = -EINVAL;
> 		goto out;
> 	}
>@@ -69,12 +70,16 @@ static int ufshcd_parse_clock_info(struct ufs_hba
>*hba)
> 		goto out;
> 	}
>
>-	ret = of_property_read_u32_array(np, "freq-table-hz",
>+	ret = of_property_read_u32_array(np, "freq-table",
> 			clkfreq, sz);
> 	if (ret && (ret != -EINVAL)) {
>-		dev_err(dev, "%s: error reading array %d\n",
>-				"freq-table-hz", ret);
>-		return ret;
>+		ret = of_property_read_u32_array(np, "freq-table-hz",
>+						 clkfreq, sz);
>+		if (ret && (ret != -EINVAL)) {
>+			dev_err(dev, "%s: error reading array %d\n",
>+				"freq-table", ret);
>+			return ret;
>+		}
> 	}
>
> 	for (i = 0; i < sz; i += 2) {
>@@ -99,7 +104,7 @@ static int ufshcd_parse_clock_info(struct ufs_hba *hba)
>
> 		if (!strcmp(name, "ref_clk"))
> 			clki->keep_link_active = true;
>-		dev_dbg(dev, "%s: min %u max %u name %s\n", "freq-table-
>hz",
>+		dev_dbg(dev, "%s: min %u max %u name %s\n", "freq-table",
> 				clki->min_freq, clki->max_freq, clki->name);
> 		list_add_tail(&clki->list, &hba->clk_list_head);
> 	}
>--
>2.32.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ