Re: [PATCH] fbdev/nvidiafb: Correct const string length in nvidiafb_setup()

2025-04-25 Thread Zijun Hu
On 2025/4/25 16:55, Jani Nikula wrote: >> } else if (!strncmp(this_opt, "noscale", 7)) { >> noscale = 1; > A further cleanup could be to replace all of the strncmp's with > str_has_prefix(this_opt, "...") to avoid this class of errors > altogether. It also returns

Re: [PATCH] fbdev/nvidiafb: Correct const string length in nvidiafb_setup()

2025-04-25 Thread Jani Nikula
On Mon, 07 Apr 2025, Zijun Hu wrote: > From: Zijun Hu > > The actual length of const string "noaccel" is 7, but the strncmp() > branch in nvidiafb_setup() wrongly hard codes it as 6. > > Fix by using actual length 7 as argument of the strncmp(). > > Signed-off-by: Zijun Hu > --- > drivers/video

Re: [PATCH] fbdev/nvidiafb: Correct const string length in nvidiafb_setup()

2025-04-24 Thread Helge Deller
On 4/7/25 13:55, Zijun Hu wrote: From: Zijun Hu The actual length of const string "noaccel" is 7, but the strncmp() branch in nvidiafb_setup() wrongly hard codes it as 6. Fix by using actual length 7 as argument of the strncmp(). Signed-off-by: Zijun Hu --- drivers/video/fbdev/nvidia/nvidi