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 15:10:46 +0000 [thread overview]
Message-ID: <1295881846.1677.9.camel@apple-mac> (raw)
In-Reply-To: <alpine.LFD.2.00.1101240936260.8580@xanadu.home>
On Mon, 2011-01-24 at 09:43 -0500, Nicolas Pitre wrote:
> On Mon, 24 Jan 2011, Tony Olech wrote:
> > On Fri, 2011-01-21 at 16:14 -0500, Nicolas Pitre wrote:
> > > On Fri, 21 Jan 2011, Tony Olech wrote:
> > > > There are 5 "do not initialise statics" errors reported by scripts/checkpatch.pl
> > >
> > > you probably should fix those. They are due to lines such as:
> > >
> > > static int pad_input_to_usb_pkt = 0;
> > > static int disable_offload_processing = 0;
> > > static int force_1_bit_data_xfers = 0;
> > > static int force_polling_for_irqs = 0;
> > >
> > > Since those are global variables, you may omit to initialize them to 0
> > > which would then allocate them to the .bss section which is not included
> > > in the compiled binary, and automatically cleared to zero at run time
> > > Nicolas
> > Yes they are due to exactly that, BUT I have a great aversion to using
> > uninitialized variables. How can initializing all one's variables be
> > considered a bug????
>
> Let me repeat myself.
>
> 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. How then can one do static code analysis
to determine which uninitialized variables are uninitialized as
a result of a bug?
Tony Olech
next prev parent reply other threads:[~2011-01-24 15:11 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 [this message]
2011-01-24 15:55 ` Nicolas Pitre
2011-01-24 16:08 ` Tony Olech
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=1295881846.1677.9.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.