From: "Richard B. Johnson" <jmodem@AbominableFirebug.com>
To: "David Rientjes" <rientjes@cs.washington.edu>, <muli@il.ibm.com>
Cc: <ak@suse.de>, <linux-kernel@vger.kernel.org>,
<discuss@x86-64.org>, <jdmason@kudzu.us>
Subject: Re: [PATCH 1/4] Calgary: phb_shift can be int
Date: Thu, 2 Nov 2006 18:04:10 -0500 [thread overview]
Message-ID: <014101c6fed4$d0e4b850$0732700a@djlaptop> (raw)
In-Reply-To: Pine.LNX.4.64N.0611021401180.1797@attu4.cs.washington.edu
----- Original Message -----
From: "David Rientjes" <rientjes@cs.washington.edu>
To: <muli@il.ibm.com>
Cc: <ak@suse.de>; <linux-kernel@vger.kernel.org>; <discuss@x86-64.org>;
<jdmason@kudzu.us>
Sent: Thursday, November 02, 2006 5:12 PM
Subject: Re: [PATCH 1/4] Calgary: phb_shift can be int
> On Thu, 2 Nov 2006, muli@il.ibm.com wrote:
>
>> diff --git a/arch/x86_64/kernel/pci-calgary.c
>> b/arch/x86_64/kernel/pci-calgary.c
>> index 37a7708..31d5758 100644
>> --- a/arch/x86_64/kernel/pci-calgary.c
>> +++ b/arch/x86_64/kernel/pci-calgary.c
>> @@ -740,7 +740,7 @@ static void __init calgary_increase_spli
>> {
>> u64 val64;
>> void __iomem *target;
>> - unsigned long phb_shift = -1;
>> + unsigned int phb_shift = ~0; /* silence gcc */
>> u64 mask;
>>
>> switch (busno_to_phbid(busnum)) {
>>
>
> There's been a suggestion to add
>
> #define SILENCE_GCC(x) = x
This was previously discussed. To quiet gcc warnings, one can use "var=var",
but you do not want to hide it in a macro! That hides bonafide bugs. If you
carefully review code and see that there is absolutely no possibility of
using an uninitialized variable in any execution path, then you can assign
it to itself to quiet the compiler.
>
> for these silencing cases with the advantage that all the cases are marked
> for an easy grep and the purpose of such an initialization is known by
> the code reader.
>
> http://lkml.org/lkml/2006/10/31/106
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
Cheers,
Dick Johnson
Penguin : Linux version 2.6.16.24 (somewhere). IT took away email
"privileges" to engineers.
New Book: http://www.AbominableFirebug.com
next prev parent reply other threads:[~2006-11-02 23:16 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-02 21:49 [PATCH 0/4] Calgary: updates for 2.6.20 muli
2006-11-02 21:49 ` [PATCH 1/4] Calgary: phb_shift can be int muli
2006-11-02 21:49 ` [PATCH 2/4] Calgary: use BIOS supplied BBARs and topology information muli
2006-11-02 21:49 ` [PATCH 3/4] Calgary: check BBAR ioremap success when ioremapping muli
2006-11-02 21:49 ` [PATCH 4/4] Calgary: allow compiling Calgary in but not using it by default muli
2006-11-02 22:12 ` [PATCH 1/4] Calgary: phb_shift can be int David Rientjes
2006-11-02 23:04 ` Richard B. Johnson [this message]
2006-11-02 23:19 ` David Rientjes
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='014101c6fed4$d0e4b850$0732700a@djlaptop' \
--to=jmodem@abominablefirebug.com \
--cc=ak@suse.de \
--cc=discuss@x86-64.org \
--cc=jdmason@kudzu.us \
--cc=linux-kernel@vger.kernel.org \
--cc=muli@il.ibm.com \
--cc=rientjes@cs.washington.edu \
/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.