From: Muhammad Usama Anjum <usama.anjum@collabora.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Hans de Goede <hdegoede@redhat.com>,
Shyam Sundar S K <Shyam-sundar.S-k@amd.com>,
platform-driver-x86@vger.kernel.org,
linux-kernel@vger.kernel.org
Cc: Muhammad Usama Anjum <usama.anjum@collabora.com>,
Mark Gross <markgross@kernel.org>
Subject: Re: [PATCH v1 1/1] platform/x86/amd/pmf: Use str_on_off() helper
Date: Fri, 11 Aug 2023 18:35:06 +0500 [thread overview]
Message-ID: <1690b97a-e19a-18fc-7248-b0bae0757cb7@collabora.com> (raw)
In-Reply-To: <20230811131330.71263-1-andriy.shevchenko@linux.intel.com>
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@linux.intel.com>
Reviewed-by: Muhammad Usama Anjum <usama.anjum@collabora.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@amd.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
next prev parent reply other threads:[~2023-08-11 13:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-11 13:13 Andy Shevchenko
2023-08-11 13:14 ` Ilpo Järvinen
2023-08-11 13:35 ` Muhammad Usama Anjum [this message]
2023-08-21 13:21 ` Hans de Goede
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1690b97a-e19a-18fc-7248-b0bae0757cb7@collabora.com \
--to=usama.anjum@collabora.com \
--cc=Shyam-sundar.S-k@amd.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=hdegoede@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=markgross@kernel.org \
--cc=platform-driver-x86@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®