Re: [PATCH] mmc: USB SDIO/SD/MMC Host Controller (VUB300) driver Resubmission

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

 



On Mon, 24 Jan 2011, Tony Olech wrote:

> On Mon, 2011-01-24 at 09:43 -0500, Nicolas Pitre wrote:
> > Uninitialized global scope variables are by definition assigned to the 
> > .bss section.  The .bss section is dynamically allocated at run time 
> > rather than being stored in the compiled binary, and also cleared to 
> > zero at run time.  So the preference is for zero-initialized global 
> > variables not to be initialized at all because 1) they are implicitly 
> > initialized to zero anyway, and 2) that makes the resulting binaries 
> > smaller.
> > So this is not about fixing a bug, but rather to conform to the adopted 
> > policy for kernel code.
> > Nicolas
> Thanks for the reply. I had not realized that saving 20 bytes on the
> binary size was so important.

With the size of the kernel they add up.

> How then can one do static code analysis
> to determine which uninitialized variables are uninitialized as
> a result of a bug?

A good static code analysis tool should know already that uninitialized 
global variables are implicitly initialized to zero.  This is not the 
case for local variables of course.


Nicolas
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


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

  Powered by Linux