Re: [PATCH 1/5] drm/modes: parse_cmdline: Handle empty mode name part

2022-07-08 Thread Geert Uytterhoeven
Hi Hans, On Fri, Jul 8, 2022 at 10:06 PM Geert Uytterhoeven wrote: > On Fri, Jul 8, 2022 at 9:28 PM Hans de Goede wrote: > > On 7/8/22 20:21, Geert Uytterhoeven wrote: > > > If no mode name part was specified, mode_end is zero, and the "ret == > > > mode_end" check does the wrong thing. > > > >

Re: [PATCH 1/5] drm/modes: parse_cmdline: Handle empty mode name part

2022-07-08 Thread Geert Uytterhoeven
Hi Hans. On Fri, Jul 8, 2022 at 9:28 PM Hans de Goede wrote: > On 7/8/22 20:21, Geert Uytterhoeven wrote: > > If no mode name part was specified, mode_end is zero, and the "ret == > > mode_end" check does the wrong thing. > > > > Fix this by checking for a non-zero return value instead. > > Which

Re: [PATCH 1/5] drm/modes: parse_cmdline: Handle empty mode name part

2022-07-08 Thread Hans de Goede
Hi Geert, On 7/8/22 20:21, Geert Uytterhoeven wrote: > If no mode name part was specified, mode_end is zero, and the "ret == > mode_end" check does the wrong thing. > > Fix this by checking for a non-zero return value instead. Which is wrong to do, since now if you have e.g. a mode list with: "

[PATCH 1/5] drm/modes: parse_cmdline: Handle empty mode name part

2022-07-08 Thread Geert Uytterhoeven
If no mode name part was specified, mode_end is zero, and the "ret == mode_end" check does the wrong thing. Fix this by checking for a non-zero return value instead. While at it, skip all named mode handling when mode_end is zero, as it is futile. Fixes: 7b1cce760afe38b4 ("drm/modes: parse_cmdlin