public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
From: Tony Olech <tony.olech@elandigitalsystems.com>
To: Nicolas Pitre <nico@fluxnic.net>
Cc: Chris Ball <cjb@laptop.org>,
	linux-mmc@vger.kernel.org, David Vrabel <david.vrabel@csr.com>
Subject: Re: [PATCH] mmc: USB SDIO/SD/MMC Host Controller (VUB300) driver Resubmission
Date: Mon, 24 Jan 2011 16:08:29 +0000	[thread overview]
Message-ID: <1295885309.1677.21.camel@apple-mac> (raw)
In-Reply-To: <alpine.LFD.2.00.1101241051460.8580@xanadu.home>

On Mon, 2011-01-24 at 10:55 -0500, Nicolas Pitre wrote:
> 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
Thanks for the reply.
I had assumed that for a module the global initialized variables were
loaded at module load. That then is a problem given that new devices
(and drivers) are appearing quite rapidly. I therefore do not understand
how the global initialized variables from an externally compiled kernel
module get added into the kernel image - does "depmod" do that?
A good static code analysis tool surely can only show a list of
uninitialized static global variables leaving it for the user to
trawl through and decide which are OK and which are not - so much
easier if one has no uninitialized static global variables to start
with.
Tony Olech



  reply	other threads:[~2011-01-24 16:08 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20B0EAA71DD7413A9A29D0493C6C1D87@AN00536>
     [not found] ` <20101116150022.GA27726@void.printf.net>
     [not found]   ` <27884BED0E3C489C8849EE12A803F536@AN00536>
     [not found]     ` <m3oc9pnt6g.fsf@pullcord.laptop.org>
     [not found]       ` <4CE41BE3.1060806@elandigitalsystems.com>
     [not found]         ` <m3oc9n241c.fsf@pullcord.laptop.org>
2010-11-22 15:05           ` [PATCH] mmc: USB SDIO/SD/MMC Host Controller (VUB300) driver Tony Olech
2010-11-30  6:15             ` Chris Ball
2010-11-30 12:23               ` David Vrabel
2010-12-17  0:43                 ` Chris Ball
2010-12-21 15:03                 ` Tony Olech
2011-01-06  4:56                   ` Chris Ball
2011-01-06 13:18                     ` David Vrabel
2011-01-06 13:17             ` David Vrabel
2011-01-20 16:09               ` Tony Olech
2011-01-20 16:11               ` Tony Olech
2011-01-21 10:50             ` [PATCH] mmc: USB SDIO/SD/MMC Host Controller (VUB300) driver Resubmission Tony Olech
2011-01-21 21:14               ` Nicolas Pitre
2011-01-22 14:21                 ` Wolfram Sang
2011-01-22 19:07                   ` Nicolas Pitre
2011-01-23 10:09                     ` Wolfram Sang
2011-01-23 14:01                       ` Nicolas Pitre
2011-01-24 15:35                         ` Wolfram Sang
2011-01-24 16:27                         ` Tony Olech
2011-01-24 16:21                       ` Tony Olech
2011-01-25  9:13                         ` Wolfram Sang
2011-01-25  9:35                           ` Tony Olech
2011-01-25 20:40                             ` Nicolas Pitre
2011-01-24 16:17                     ` Tony Olech
2011-01-24  8:49                 ` Tony Olech
2011-01-24 14:43                   ` Nicolas Pitre
2011-01-24 15:10                     ` Tony Olech
2011-01-24 15:55                       ` Nicolas Pitre
2011-01-24 16:08                         ` Tony Olech [this message]
2011-01-24 16:28                           ` Nicolas Pitre
2011-01-24 16:43                             ` Tony Olech
2011-03-10 16:13               ` [PATCH] mmc: USB SDIO/SD/MMC Host Controller (VUB300) driver Re-Resubmission Tony Olech
2011-03-15  3:01                 ` Chris Ball
2011-03-15  9:40                   ` Wolfram Sang
2011-03-15 15:06                     ` Chris Ball
2011-03-15 15:41                       ` Arnd Bergmann
2011-03-15 16:23                 ` Arnd Bergmann
2011-03-15 16:55                   ` Tony Olech
2011-04-19  9:05                   ` Tony Olech
2011-04-19 12:10                     ` Arnd Bergmann
2011-04-19 12:32                       ` Tony Olech
2011-04-19 13:21                         ` Arnd Bergmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1295885309.1677.21.camel@apple-mac \
    --to=tony.olech@elandigitalsystems.com \
    --cc=cjb@laptop.org \
    --cc=david.vrabel@csr.com \
    --cc=linux-mmc@vger.kernel.org \
    --cc=nico@fluxnic.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox