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:
 <ZQ0PR01MB1302F225EB8C1B1B75D2FD66F2662@ZQ0PR01MB1302.CHNPR01.prod.partner.outlook.cn>
Date: Thu, 29 May 2025 02:41:54 +0000
From: Changhuang Liang <changhuang.liang@...rfivetech.com>
To: "shao.mingyin@....com.cn" <shao.mingyin@....com.cn>, Walker Chen
	<walker.chen@...rfivetech.com>
CC: "ulf.hansson@...aro.org" <ulf.hansson@...aro.org>,
	"linux-pm@...r.kernel.org" <linux-pm@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"yang.yang29@....com.cn" <yang.yang29@....com.cn>, "xu.xin16@....com.cn"
	<xu.xin16@....com.cn>, "yang.tao172@....com.cn" <yang.tao172@....com.cn>,
	"ye.xingchen@....com.cn" <ye.xingchen@....com.cn>
Subject:
 回复: pmdomain: starfive: Use str_on_off() helper in jh7110_pmu_set_state()

Hi, Mingyin

Thanks for your patch.

> From: Shao Mingyin <shao.mingyin@....com.cn>
> 
> Remove hard-coded strings by using the str_on_off() helper function.
> 
> Signed-off-by: Shao Mingyin <shao.mingyin@....com.cn>
> ---
>  drivers/pmdomain/starfive/jh71xx-pmu.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/pmdomain/starfive/jh71xx-pmu.c
> b/drivers/pmdomain/starfive/jh71xx-pmu.c
> index 74720c09a6e3..30c29ac9391f 100644
> --- a/drivers/pmdomain/starfive/jh71xx-pmu.c
> +++ b/drivers/pmdomain/starfive/jh71xx-pmu.c
> @@ -12,6 +12,7 @@
>  #include <linux/of.h>
>  #include <linux/platform_device.h>
>  #include <linux/pm_domain.h>
> +#include <linux/string_choices.h>
>  #include <dt-bindings/power/starfive,jh7110-pmu.h>
> 
>  /* register offset */
> @@ -155,7 +156,7 @@ static int jh7110_pmu_set_state(struct
> jh71xx_pmu_dev *pmd, u32 mask, bool on)
> 
>  	if (ret) {
>  		dev_err(pmu->dev, "%s: failed to power %s\n",
> -			pmd->genpd.name, on ? "on" : "off");
> +			pmd->genpd.name, str_on_off(on));
>  		return -ETIMEDOUT;
>  	}
> 

Would you mind adjusting this part and send V2?

In jh71xx-pmu.c jh71xx_pmu_set_state()

	if (is_on == on) {
		dev_dbg(pmu->dev, "pm domain [%s] is already %sable status.\n",
			pmd->genpd.name, on ? "en" : "dis");
		return 0;
	}
====>
	if (is_on == on) {
		dev_dbg(pmu->dev, "pm domain [%s] is already %s status.\n",
			pmd->genpd.name, str_enable_disable(on));
		return 0;
	}

Best Regards,
Changhuang

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ