Re: [PATCH] arm: orion5x: use string choices helper

Andrew Lunn
2025-06-17T01:31:47Z

On Tue, Jun 17, 2025 at 12:07:42AM +0000, Kuninori Morimoto wrote:
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> ---
> arch/arm/mach-orion5x/ts78xx-setup.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm/mach-orion5x/ts78xx-setup.c b/arch/arm/mach-orion5x/ts78xx-setup.c
> index af810e7ccd79..c250703e696d 100644
> --- a/arch/arm/mach-orion5x/ts78xx-setup.c
> +++ b/arch/arm/mach-orion5x/ts78xx-setup.c
> @@ -460,7 +460,7 @@ static ssize_t ts78xx_fpga_show(struct kobject *kobj,
> if (ts78xx_fpga.state < 0)
> return sprintf(buf, "borked\n");
>
> - return sprintf(buf, "%s\n", (ts78xx_fpga.state) ? "online" : "offline");
> + return sprintf(buf, "%sline\n", str_on_off(ts78xx_fpga.state));

static inline const char *str_on_off(bool v)
{
return v ? "on" : "off";
}

That is an ABI change. Sorry, but NACK.

Andrew