From: Timur Tabi <timur@freescale.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/2] e1000: fix PCI memory addressing
Date: Sat, 22 Aug 2009 07:54:01 -0500 [thread overview]
Message-ID: <4A8FEA69.9080408@freescale.com> (raw)
In-Reply-To: <20090822091245.DF0A0833DBD2@gemini.denx.de>
Wolfgang Denk wrote:
> Dear Timur Tabi,
>
> In message<1250542538-5717-1-git-send-email-timur@freescale.com> you wrote:
>> The Intel E1000 driver was making assumptions about the relationship between
>> some virtual, physical, and PCI addresses.
>>
>> Also fix some bad usage of the DEBUGOUT macro
>>
>> Signed-off-by: Timur Tabi<timur@freescale.com>
>> ---
>> drivers/net/e1000.c | 17 +++++++++--------
>> 1 files changed, 9 insertions(+), 8 deletions(-)
>
> This patch causes compiler warnings:
>
> Configuring for MVBC_P board...
> e1000.c: In function 'e1000_transmit':
> e1000.c:5019: warning: passing argument 1 of 'virt_to_phys' discards
> qualifiers from pointer target type
I can't reproduce this problem.
powerpc-linux-gnu-gcc -g -Os -fPIC -ffixed-r14 -meabi -D__KERNEL__
-DTEXT_BASE=0xFF800000 -I/home/b04825/git/u-boot.e1000/include
-fno-builtin -ffreestanding -nostdinc -isystem
/opt/freescale/usr/local/gcc-4.3.74-eglibc-2.8.74-2/powerpc-linux-gnu/bin/../lib/gcc/powerpc-linux-gnu/4.3.2/include
-pipe -DCONFIG_PPC -D__powerpc__ -DCONFIG_MPC5xxx -ffixed-r2 -mstring
-mcpu=603e -mmultiple -DTEXT_BASE=0xFF800000
-I/home/b04825/git/u-boot.e1000/board -Wall -Wstrict-prototypes
-fno-stack-protector -o e1000.o e1000.c -c
powerpc-linux-gnu-ar crv libnet.a e1000.o
$ ${CROSS_COMPILE}gcc --version
powerpc-linux-gnu-gcc (Sourcery G++ Lite 4.3-74) 4.3.2
If you look at the definition of virt_to_bus, you'll see that I added a
pointer cast specifically to address this warning:
#define virt_to_bus(devno, v) pci_virt_to_mem(devno, (void *) (v))
If I remove the (void *) cast, I get this:
e1000.c: In function 'e1000_transmit':
e1000.c:5019: warning: passing argument 1 of 'virt_to_phys' discards
qualifiers from pointer target type
So somehow, you're compiler is ignoring the "(void *)".
next prev parent reply other threads:[~2009-08-22 12:54 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-17 20:55 [U-Boot] [PATCH 2/2] e1000: fix PCI memory addressing Timur Tabi
2009-08-17 20:57 ` Timur Tabi
2009-08-17 23:25 ` Kumar Gala
2009-08-21 6:56 ` Kumar Gala
2009-08-21 16:59 ` Ben Warren
2009-08-22 9:12 ` Wolfgang Denk
2009-08-22 11:40 ` Timur Tabi
2009-08-22 11:49 ` Wolfgang Denk
2009-08-22 12:54 ` Timur Tabi [this message]
2009-08-22 13:17 ` Wolfgang Denk
2009-08-24 15:30 ` Timur Tabi
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=4A8FEA69.9080408@freescale.com \
--to=timur@freescale.com \
--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.