All of lore.kernel.org
 help / color / mirror / Atom feed
* compile warnings in __IRQ_STAT
@ 2005-03-15 19:23 Hollis Blanchard
  2005-03-15 20:01 ` David Hopwood
  0 siblings, 1 reply; 2+ messages in thread
From: Hollis Blanchard @ 2005-03-15 19:23 UTC (permalink / raw)
  To: xen-devel

/home/hollis/source/xeno-unstable-ppc/xen/include/xen/softirq.h: In function 
`cpu_raise_softirq': /home/hollis/source/xeno-unstable-ppc/xen/include/xen/softirq.h:28: 
warning: use of compound expressions as lvalues is deprecated

static inline void cpu_raise_softirq(unsigned int cpu, unsigned int nr)
{
    if ( !test_and_set_bit(nr, &softirq_pending(cpu)) )
        smp_send_event_check_cpu(cpu);
}

#define softirq_pending(cpu) __IRQ_STAT((cpu), __softirq_pending)

I have CONFIG_SMP disabled, so the definition being used is this:
#define __IRQ_STAT(cpu, member) ((void)(cpu), irq_stat[0].member)

So the warning is caused by this statement:
    &((void)(cpu),  irq_stat[0].member))

GCC version:
basalt xeno-unstable-ppc% powerpc64-unknown-linux-gnu-gcc -v
Reading specs 
from /opt/crosstool/powerpc64-unknown-linux-gnu/gcc-3.4.2-glibc-2.3.3/lib/gcc/powerpc64-unknown-linux-gnu/3.4.2/specs
Configured 
with: /home/hollis/source/crosstool-0.28-rc37/build/powerpc64-unknown-linux-gnu/gcc-3.4.2-glibc-2.3.3/gcc-3.4.2/configure 
--target=powerpc64-unknown-linux-gnu --host=i686-host_pc-linux-gnu 
--prefix=/opt/crosstool/powerpc64-unknown-linux-gnu/gcc-3.4.2-glibc-2.3.3 
--disable-multilib 
--with-sysroot=/opt/crosstool/powerpc64-unknown-linux-gnu/gcc-3.4.2-glibc-2.3.3/powerpc64-unknown-linux-gnu/sys-root 
--with-local-prefix=/opt/crosstool/powerpc64-unknown-linux-gnu/gcc-3.4.2-glibc-2.3.3/powerpc64-unknown-linux-gnu/sys-root 
--disable-nls --enable-threads=posix --enable-symvers=gnu 
--enable-__cxa_atexit --enable-languages=c,c++ --enable-shared --enable-c99 
--enable-long-long
Thread model: posix
gcc version 3.4.2

Undefining CONFIG_SMP and building with GCC 3.4 on x86 should cause the same 
problem. Suggestions on how to fix? Removing the (void)cpu fixes it for me...

-- 
Hollis Blanchard
IBM Linux Technology Center


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: compile warnings in __IRQ_STAT
  2005-03-15 19:23 compile warnings in __IRQ_STAT Hollis Blanchard
@ 2005-03-15 20:01 ` David Hopwood
  0 siblings, 0 replies; 2+ messages in thread
From: David Hopwood @ 2005-03-15 20:01 UTC (permalink / raw)
  To: xen-devel

Hollis Blanchard wrote:
> /home/hollis/source/xeno-unstable-ppc/xen/include/xen/softirq.h: In function 
> `cpu_raise_softirq': /home/hollis/source/xeno-unstable-ppc/xen/include/xen/softirq.h:28: 
> warning: use of compound expressions as lvalues is deprecated
> 
[...]
> #define __IRQ_STAT(cpu, member) ((void)(cpu), irq_stat[0].member)
> 
> So the warning is caused by this statement:
>     &((void)(cpu),  irq_stat[0].member))

> [...] Suggestions on how to fix?

#define __IRQ_STAT(cpu, member) (irq_stat[((void)(cpu), 0)].member)

-- 
David Hopwood <david.nospam.hopwood@blueyonder.co.uk>



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-03-15 20:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-15 19:23 compile warnings in __IRQ_STAT Hollis Blanchard
2005-03-15 20:01 ` David Hopwood

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.