From: Segher Boessenkool <segher@kernel.crashing.org>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: linuxppc-dev list <linuxppc-dev@ozlabs.org>,
Paul Mackerras <paulus@samba.org>
Subject: Re: [PATCH] powerpc: make U4 PCIe work (#2)
Date: Sat, 7 Oct 2006 00:37:05 +0200 [thread overview]
Message-ID: <DA809761-6800-486F-9549-E55CD40843DD@kernel.crashing.org> (raw)
In-Reply-To: <1160170142.22232.132.camel@localhost.localdomain>
>>> +static unsigned int u4_pcie_cfa0(u8 devfn, u8 off)
>>
>> "off" should be bigger than u8...
>
> Right
>
>>> +{
>>> + return (1 << ((unsigned int)PCI_SLOT(devfn))) |
>>> + (((unsigned int)PCI_FUNC(devfn)) << 8) |
>>> + ((((unsigned int)(off)) >> 8) << 28) |
>>
>> ...and the compiler told you about that here.
>
> No it didn't...
Ah right, because of the explicit cast. Get rid of it :-)
>> Make the parameters and return value all u32 and you won't
>> need casts anymore, the function call will implicitly do it.
Segher
prev parent reply other threads:[~2006-10-06 22:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-06 5:40 [PATCH] powerpc: make U4 PCIe work (#2) Benjamin Herrenschmidt
2006-10-06 11:26 ` Segher Boessenkool
2006-10-06 21:29 ` Benjamin Herrenschmidt
2006-10-06 22:37 ` Segher Boessenkool [this message]
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=DA809761-6800-486F-9549-E55CD40843DD@kernel.crashing.org \
--to=segher@kernel.crashing.org \
--cc=benh@kernel.crashing.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=paulus@samba.org \
/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;
as well as URLs for NNTP newsgroup(s).