From: Eslam Khafagy <eslam.medhat1993@gmail.com>
To: rafael@kernel.org
Cc: Eslam Khafagy <eslam.medhat1993@gmail.com>,
lenb@kernel.org, linux-acpi@vger.kernel.org,
skhan@linuxfoundation.com
Subject: [PATCH] ACPI: fan_attr: Replace sprintf with sysfs_emit
Date: Fri, 4 Jul 2025 03:40:00 +0300 [thread overview]
Message-ID: <20250704004002.70839-1-eslam.medhat1993@gmail.com> (raw)
Replace sprintf with sysfs_emit in function show_fine_grain_control in
according to Documentation/filesystems/sysfs.rst.
This patch builds on the fix proposed in patch:
Message-ID 20250621055200.166361-1-abdelrahmanfekry375@gmail.com
Signed-off-by: Eslam Khafagy <eslam.medhat1993@gmail.com>
---
drivers/acpi/fan_attr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/acpi/fan_attr.c b/drivers/acpi/fan_attr.c
index 22d29ac2447c..f4e7f2351616 100644
--- a/drivers/acpi/fan_attr.c
+++ b/drivers/acpi/fan_attr.c
@@ -67,7 +67,7 @@ static ssize_t show_fine_grain_control(struct device *dev, struct device_attribu
struct acpi_device *acpi_dev = container_of(dev, struct acpi_device, dev);
struct acpi_fan *fan = acpi_driver_data(acpi_dev);
- return sprintf(buf, "%d\n", fan->fif.fine_grain_ctrl);
+ return sysfs_emit(buf, "%d\n", fan->fif.fine_grain_ctrl);
}
int acpi_fan_create_attributes(struct acpi_device *device)
--
2.43.0
next reply other threads:[~2025-07-04 0:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-04 0:40 Eslam Khafagy [this message]
2025-07-07 16:29 ` [PATCH] ACPI: fan_attr: Replace sprintf with sysfs_emit Rafael J. Wysocki
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=20250704004002.70839-1-eslam.medhat1993@gmail.com \
--to=eslam.medhat1993@gmail.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=skhan@linuxfoundation.com \
/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