[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <m1y6ewr6vf.fsf@fess.ebiederm.org>
Date: Wed, 02 Jun 2010 23:02:28 -0700
From: ebiederm@...ssion.com (Eric W. Biederman)
To: Américo Wang <xiyou.wangcong@...il.com>
Cc: Eric Dumazet <eric.dumazet@...il.com>,
Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp>,
ebiederm@...stanetworks.com, randy.dunlap@...cle.com,
gregkh@...e.de, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] kobject: Suppress compiler warning with gcc 3.x
Américo Wang <xiyou.wangcong@...il.com> writes:
> On Thu, Jun 03, 2010 at 07:31:41AM +0200, Eric Dumazet wrote:
>>Le jeudi 03 juin 2010 à 14:23 +0900, Tetsuo Handa a écrit :
>>> Gcc 3.x generates a warning
>>>
>>> include/linux/sysfs.h:183: warning: parameter has incomplete type
>>>
>>> on each file.
>>> Suppress the warning by moving the definition of "enum kobj_ns_type"
>>> to before "#include <linux/sysfs.h>".
>>>
>>> Signed-off-by: Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp>
>>
>>
>>I was about to submit same patch, but I was also reverting 27eabc7cb4b3
>>(sysfs: Don't use enums in inline function declaration.)
>>
>>So that sysfs_exit_ns() prototype is consistent regardless of
>>CONFIG_SYSFS
>>
>>What do you think ?
>>
>
> This looks odd, in sysfs.h we do have a forward declaration of
> enum kobj_ns_type... I am wondering why gcc 3.x doesn't recognize it.
Because the replacement is an inline, and we are passing the enum by value
gcc wants to see the full definition, at the point where the inline function
is declared.
Eric
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists