From: Heiko Schocher <hs@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v4 2/2] hwmon: do not init sensors on startup
Date: Mon, 01 Aug 2011 15:54:28 +0200 [thread overview]
Message-ID: <4E36B014.2040208@denx.de> (raw)
In-Reply-To: <20110801132832.1E0381673B92@gemini.denx.de>
Hello Wolfgang,
Wolfgang Denk wrote:
> Dear Heiko Schocher,
>
> In message <1312196898-20228-1-git-send-email-hs@denx.de> you wrote:
>> The U-Boot Design Principles[1] clearly say:
>>
>> Initialize devices only when they are needed within U-Boot, i.e. don't
>> initialize the Ethernet interface(s) unless U-Boot performs a download
>> over Ethernet; don't initialize any IDE or USB devices unless U-Boot
>> actually tries to load files from these, etc. (and don't forget to
>> shut down these devices after using them - otherwise nasty things may
>> happen when you try to boot your OS).
>>
>> So, do not initialize and read the sensors on startup.
> ...
>> - changes since v3
>> do not initialize static sensor_initialized with 0
> ...
>> +static unsigned long sensor_initialized = 0xffffffff;
>
> Ummm.... no. You failed to understand what the checkpatch error
> means.
>
> There is no need to explicitly static variables with 0, because this
> is their default value if you leave them unitialized - unintialized
> data is allocated in the BSS segment, and thus get automatically
> initialized as 0.
Ah! Ok, I undo this change.
> The code above enforces allocation ion the data segment, i. e. it
> increses the (flash) memory footprint.
>
> Please undo this. Just omit the "= 0" par tin the declaration all
> together.
bye,
Heiko
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
next prev parent reply other threads:[~2011-08-01 13:54 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-09 14:00 [U-Boot] [PATCH][NEXT] hwmon: do not init sensors on startup Heiko Schocher
2010-12-09 14:26 ` Wolfgang Denk
2010-12-09 15:45 ` Heiko Schocher
2010-12-09 18:50 ` Wolfgang Denk
2010-12-13 9:26 ` [U-Boot] [PATCH 1/2] common: introduce a genutils.h file Heiko Schocher
2011-01-09 16:46 ` Wolfgang Denk
2011-01-10 7:09 ` Heiko Schocher
2011-01-10 10:19 ` Wolfgang Denk
2011-06-09 9:07 ` [U-Boot] [PATCH v3 1/2] common: move BUILD_BUG_ON define to common.h Heiko Schocher
2011-07-27 21:46 ` Wolfgang Denk
2010-12-13 9:26 ` [U-Boot] [PATCH 2/2 v2] hwmon: do not init sensors on startup Heiko Schocher
2011-01-09 16:49 ` Wolfgang Denk
2011-06-09 9:07 ` [U-Boot] [PATCH v3 2/2] " Heiko Schocher
2011-08-01 7:23 ` Holger Brunck
2011-08-01 10:13 ` Wolfgang Denk
2011-08-01 10:12 ` Wolfgang Denk
2011-08-01 11:08 ` [U-Boot] [PATCH v4 " Heiko Schocher
2011-08-01 13:28 ` Wolfgang Denk
2011-08-01 13:54 ` Heiko Schocher [this message]
2011-08-01 14:01 ` [U-Boot] [PATCH v5 " Heiko Schocher
2011-08-04 21:31 ` Wolfgang Denk
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=4E36B014.2040208@denx.de \
--to=hs@denx.de \
--cc=u-boot@lists.denx.de \
/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.