Hi Andy, > Date: 2026-11-16 14:25:28+0200 > From: Andy Shevchenko > > On Sun, Nov 15, 2026 at 07:46:24PM +0100, Alejandro Colomar wrote: > > Uses of strncmp(foo,"bar",sizeof("bar")) are really the same as > > strcmp(foo,"bar"). There's no good reason to use strncmp(3). > > > > This code seems to have been confused, and probably thought using > > strncmp(3) was somehow safer than strcmp(3), but it is not. > > > > Let's rewrite with streq(3), which makes it more readable. > > This patch is not changing the behavior of the existing code. > > > > These cases were found with the following script: > > > > $ git grep -E 'strncmp\([^,]*, [^,]*, sizeof.*[A-Z"]' \ > > | grep -v -- '- 1'; > > ... > > > arch/m68k/sun3/prom/console.c | 6 +++--- > > I hope you compile-tested this at least. IIRC PROM is early boot stage on m68k > and PPC. Yes, but never trust my word for that, as I make mistakes. :) That's why I try to explicitly show the testing shell session in the cover letter or in a reply to it. In this case, the cover letter shows the full testing I did, including a full build with 'allmodconfig'. Cheers, Alex > > -- > With Best Regards, > Andy Shevchenko > > --