* [RESEND PATCH] ACPI: video: Use str_yes_no() helper in acpi_video_bus_add()
@ 2025-02-11 10:45 Thorsten Blum
2025-02-18 18:11 ` Rafael J. Wysocki
0 siblings, 1 reply; 2+ messages in thread
From: Thorsten Blum @ 2025-02-11 10:45 UTC (permalink / raw)
To: Rafael J. Wysocki, Len Brown; +Cc: Thorsten Blum, linux-acpi, linux-kernel
Remove hard-coded strings by using the str_yes_no() helper function.
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
---
drivers/acpi/acpi_video.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/acpi/acpi_video.c b/drivers/acpi/acpi_video.c
index a972831dbd66..efdadc74e3f4 100644
--- a/drivers/acpi/acpi_video.c
+++ b/drivers/acpi/acpi_video.c
@@ -27,6 +27,7 @@
#include <linux/acpi.h>
#include <acpi/video.h>
#include <linux/uaccess.h>
+#include <linux/string_choices.h>
#define ACPI_VIDEO_BUS_NAME "Video Bus"
#define ACPI_VIDEO_DEVICE_NAME "Video Device"
@@ -2039,9 +2040,9 @@ static int acpi_video_bus_add(struct acpi_device *device)
pr_info("%s [%s] (multi-head: %s rom: %s post: %s)\n",
ACPI_VIDEO_DEVICE_NAME, acpi_device_bid(device),
- video->flags.multihead ? "yes" : "no",
- video->flags.rom ? "yes" : "no",
- video->flags.post ? "yes" : "no");
+ str_yes_no(video->flags.multihead),
+ str_yes_no(video->flags.rom),
+ str_yes_no(video->flags.post));
mutex_lock(&video_list_lock);
list_add_tail(&video->entry, &video_bus_head);
mutex_unlock(&video_list_lock);
--
2.48.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [RESEND PATCH] ACPI: video: Use str_yes_no() helper in acpi_video_bus_add()
2025-02-11 10:45 [RESEND PATCH] ACPI: video: Use str_yes_no() helper in acpi_video_bus_add() Thorsten Blum
@ 2025-02-18 18:11 ` Rafael J. Wysocki
0 siblings, 0 replies; 2+ messages in thread
From: Rafael J. Wysocki @ 2025-02-18 18:11 UTC (permalink / raw)
To: Thorsten Blum; +Cc: Rafael J. Wysocki, Len Brown, linux-acpi, linux-kernel
On Tue, Feb 11, 2025 at 11:45 AM Thorsten Blum <thorsten.blum@linux.dev> wrote:
>
> Remove hard-coded strings by using the str_yes_no() helper function.
>
> Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
> ---
> drivers/acpi/acpi_video.c | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/acpi/acpi_video.c b/drivers/acpi/acpi_video.c
> index a972831dbd66..efdadc74e3f4 100644
> --- a/drivers/acpi/acpi_video.c
> +++ b/drivers/acpi/acpi_video.c
> @@ -27,6 +27,7 @@
> #include <linux/acpi.h>
> #include <acpi/video.h>
> #include <linux/uaccess.h>
> +#include <linux/string_choices.h>
>
> #define ACPI_VIDEO_BUS_NAME "Video Bus"
> #define ACPI_VIDEO_DEVICE_NAME "Video Device"
> @@ -2039,9 +2040,9 @@ static int acpi_video_bus_add(struct acpi_device *device)
>
> pr_info("%s [%s] (multi-head: %s rom: %s post: %s)\n",
> ACPI_VIDEO_DEVICE_NAME, acpi_device_bid(device),
> - video->flags.multihead ? "yes" : "no",
> - video->flags.rom ? "yes" : "no",
> - video->flags.post ? "yes" : "no");
> + str_yes_no(video->flags.multihead),
> + str_yes_no(video->flags.rom),
> + str_yes_no(video->flags.post));
> mutex_lock(&video_list_lock);
> list_add_tail(&video->entry, &video_bus_head);
> mutex_unlock(&video_list_lock);
> --
Applied with changelog edits as 6.15 material, thanks!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-02-18 18:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-11 10:45 [RESEND PATCH] ACPI: video: Use str_yes_no() helper in acpi_video_bus_add() Thorsten Blum
2025-02-18 18:11 ` Rafael J. Wysocki
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox