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]
Date:   Fri, 11 Aug 2023 18:35:06 +0500
From:   Muhammad Usama Anjum <usama.anjum@...labora.com>
To:     Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        Hans de Goede <hdegoede@...hat.com>,
        Shyam Sundar S K <Shyam-sundar.S-k@....com>,
        platform-driver-x86@...r.kernel.org, linux-kernel@...r.kernel.org
Cc:     Muhammad Usama Anjum <usama.anjum@...labora.com>,
        Mark Gross <markgross@...nel.org>
Subject: Re: [PATCH v1 1/1] platform/x86/amd/pmf: Use str_on_off() helper

On 8/11/23 6:13 PM, Andy Shevchenko wrote:
> We have a common helper to represent a boolean value as "on"/"off"
> string. Use it for the sake of the unified style.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Reviewed-by: Muhammad Usama Anjum <usama.anjum@...labora.com>

> ---
>  drivers/platform/x86/amd/pmf/cnqf.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/platform/x86/amd/pmf/cnqf.c b/drivers/platform/x86/amd/pmf/cnqf.c
> index 539b186e9027..bc8899e15c91 100644
> --- a/drivers/platform/x86/amd/pmf/cnqf.c
> +++ b/drivers/platform/x86/amd/pmf/cnqf.c
> @@ -8,6 +8,7 @@
>   * Author: Shyam Sundar S K <Shyam-sundar.S-k@....com>
>   */
>  
> +#include <linux/string_choices.h>
>  #include <linux/workqueue.h>
>  #include "pmf.h"
>  
> @@ -399,7 +400,7 @@ static ssize_t cnqf_enable_store(struct device *dev,
>  			amd_pmf_set_sps_power_limits(pdev);
>  	}
>  
> -	dev_dbg(pdev->dev, "Received CnQF %s\n", input ? "on" : "off");
> +	dev_dbg(pdev->dev, "Received CnQF %s\n", str_on_off(input));
>  	return count;
>  }
>  
> @@ -409,7 +410,7 @@ static ssize_t cnqf_enable_show(struct device *dev,
>  {
>  	struct amd_pmf_dev *pdev = dev_get_drvdata(dev);
>  
> -	return sysfs_emit(buf, "%s\n", pdev->cnqf_enabled ? "on" : "off");
> +	return sysfs_emit(buf, "%s\n", str_on_off(pdev->cnqf_enabled));
>  }
>  
>  static DEVICE_ATTR_RW(cnqf_enable);

-- 
BR,
Muhammad Usama Anjum

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ