Suparna Bhattacharya schrieb: > On Fri, Jan 12, 2007 at 12:55:18PM +0100, Tilman Schmidt wrote: [...] >> causes a sparse warning: >> >> > include/linux/sched.h:1313:29: warning: symbol '__mptr' shadows an earlier one >> > include/linux/sched.h:1313:29: originally declared here >> >> for every source file referencing <linux/sched.h>. >> Could that be avoided please? > > So ... the nested container_of() is a problem ? I guess changing > io_wait_to_kiocb() to be an inline function instead of a macro could help ? So it would seem. The following experimental patch indeed makes the warnings disappear: --- linux-2.6.20-rc4-mm1-orig/include/linux/aio.h 2007-01-12 10:33:12.000000000 +0100 +++ linux-2.6.20-rc4-mm1-work/include/linux/aio.h 2007-01-12 18:31:16.000000000 +0100 @@ -243,8 +243,12 @@ -#define io_wait_to_kiocb(io_wait) container_of(container_of(io_wait, \ - struct wait_bit_queue, wait), struct kiocb, ki_wait) +static inline struct kiocb *io_wait_to_kiocb(wait_queue_t *io_wait) +{ + struct wait_bit_queue *wbqptr = + container_of(io_wait, struct wait_bit_queue, wait); + return container_of(wbqptr, struct kiocb, ki_wait); +} #include <linux/aio_abi.h> Compile checked only - please review. Thanks Tilman -- Tilman Schmidt E-Mail: [email protected] Bonn, Germany Diese Nachricht besteht zu 100% aus wiederverwerteten Bits. Ungeöffnet mindestens haltbar bis: (siehe Rückseite)
Attachment:
signature.asc
Description: OpenPGP digital signature
- References:
- 2.6.20-rc4-mm1
- From: Andrew Morton <[email protected]>
- spurious sparse warnings from linux/aio.h (was: 2.6.20-rc4-mm1)
- From: Tilman Schmidt <[email protected]>
- Re: spurious sparse warnings from linux/aio.h (was: 2.6.20-rc4-mm1)
- From: Suparna Bhattacharya <[email protected]>
- 2.6.20-rc4-mm1
- Prev by Date: Re: [PATCH 05/05] Linux Kernel Markers, non optimised architectures
- Next by Date: Re: 2.6.20-rc4-mm1 md problem
- Previous by thread: Re: spurious sparse warnings from linux/aio.h (was: 2.6.20-rc4-mm1)
- Next by thread: [-mm patch] remove tcp header from tcp_v4_check
- Index(es):