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

Andrew Lunn
2025-06-17T02:08:56Z

On Tue, Jun 17, 2025 at 01:33:38AM +0000, Kuninori Morimoto wrote:
>
> Hi Andrew
>
> Thank you for your review
>
> > > - 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.
>
> It updates format too, I guess it keeps "online/offline" ?
>
> - return sprintf(buf, "%s\n", ...
> + return sprintf(buf, "%sline\n", ...
> ^^^^
>
> Thank you for your help !!

Ah, missed that, but you should of also mentioned it in the commit
message....

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

Andrew