Re: [PATCH v3 4/4] p2sb: Do not scan and remove the P2SB device when it is unhidden

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Nov 28, 2024 / 14:59, Andy Shevchenko wrote:
> On Thu, Nov 28, 2024 at 12:26:05AM +0000, Shinichiro Kawasaki wrote:
> > On Nov 27, 2024 / 10:55, Hans de Goede wrote:
> > > On 27-Nov-24 7:00 AM, Shin'ichiro Kawasaki wrote:
> 
> [...]
> 
> > > > +	if (p2sb_hidden_by_bios)
> > > > +		ret = p2sb_scan_and_cache(bus, devfn_p2sb);
> > > 
> > > ret will be returned uninitialized now when p2sb_hidden_by_bios is false,
> > > so this patch also needs to initialize ret to 0 when declaring it.
> > 
> > Ah, right. Will fix it in v4. I compile tested with KCFLAGS=-Wall and expected
> > it would catch such mistakes, but it didn't. I found that -Wmaybe-uninitialized
> > does the check. Will use this check for my future patches.
> 
> Just use what kernel Kbuild provides already to you with carefully selected
> warnings, i.e.
> 
> 	`make W=1 ...`
> 
> without any need to hack KCFLAGS or anything else.
> 
> FYI, the above mentioned warning is included in level 1 of Linux kernel Kbuild
> W facility. But if you want much more, there are level 2 and IIRC 3, but I'm
> not sure.

Thanks! 'make W=n' is handier than KCFLAGS. I found 'make help' describes W=n,
and it says n can be 1, 2 or 3. Will use them in the future.




[Index of Archives]     [Linux Kernel Development]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux