[PATCH] arm: orion5x: use string choices helper

Andrew Lunn andrew at lunn.ch
Mon Jun 16 19:06:24 PDT 2025


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 at lunn.ch>

    Andrew



More information about the linux-arm-kernel mailing list