From: Dinh Nguyen <dinguyen@kernel.org>
To: Thorsten Blum <thorsten.blum@linux.dev>,
Moritz Fischer <mdf@kernel.org>, Xu Yilun <yilun.xu@intel.com>,
Tom Rix <trix@redhat.com>
Cc: linux-fpga@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH RESEND] fpga: bridge: Use str_enabled_disabled helper in state_show
Date: Sun, 1 Mar 2026 07:06:57 -0600 [thread overview]
Message-ID: <2520266b-e2ee-4a74-8696-55adc5b9ae91@kernel.org> (raw)
In-Reply-To: <20260224161504.587562-1-thorsten.blum@linux.dev>
Hi Thorsten,
On 2/24/26 10:15, Thorsten Blum wrote:
> Replace hard-coded strings with the str_enabled_disabled() helper. This
> unifies the output and helps the linker with deduplication, which can
> result in a smaller binary.
>
> Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
> ---
> drivers/fpga/fpga-bridge.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/fpga/fpga-bridge.c b/drivers/fpga/fpga-bridge.c
> index ca68c38aa4a1..e8ff3e3bf2fc 100644
> --- a/drivers/fpga/fpga-bridge.c
> +++ b/drivers/fpga/fpga-bridge.c
> @@ -12,6 +12,7 @@
> #include <linux/of_platform.h>
> #include <linux/slab.h>
> #include <linux/spinlock.h>
> +#include <linux/string_choices.h>
>
> static DEFINE_IDA(fpga_bridge_ida);
> static const struct class fpga_bridge_class;
> @@ -305,7 +306,7 @@ static ssize_t state_show(struct device *dev,
> return state;
> }
>
> - return sysfs_emit(buf, "%s\n", state ? "enabled" : "disabled");
> + return sysfs_emit(buf, "%s\n", str_enabled_disabled(state));
> }
>
> static DEVICE_ATTR_RO(name);
Would you consider including this patch[1] to this?
Dinh
[1]
https://lore.kernel.org/linux-fpga/aXH2D06eZ5DRTVi0@yilunxu-OptiPlex-7050/
next prev parent reply other threads:[~2026-03-01 13:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-24 16:15 [PATCH RESEND] fpga: bridge: Use str_enabled_disabled helper in state_show Thorsten Blum
2026-03-01 13:06 ` Dinh Nguyen [this message]
2026-03-02 3:34 ` Xu Yilun
-- strict thread matches above, loose matches on Subject: below --
2026-01-26 0:47 Thorsten Blum
2025-12-19 21:27 Thorsten Blum
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=2520266b-e2ee-4a74-8696-55adc5b9ae91@kernel.org \
--to=dinguyen@kernel.org \
--cc=linux-fpga@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mdf@kernel.org \
--cc=thorsten.blum@linux.dev \
--cc=trix@redhat.com \
--cc=yilun.xu@intel.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