public inbox for linux-next@vger.kernel.org 
 help / color / mirror / Atom feed
From: Chris Wright <chrisw@sous-sol•org>
To: Greg KH <greg@kroah•com>
Cc: Chris Wright <chrisw@sous-sol•org>,
	Stephen Rothwell <sfr@canb•auug.org.au>,
	linux-next@vger•kernel.org, linux-kernel@vger•kernel.org
Subject: [PATCH] sysfs: compile fix, struct file forward declaration
Date: Tue, 18 May 2010 15:32:19 -0700	[thread overview]
Message-ID: <20100518223219.GJ8301@sequoia.sous-sol.org> (raw)
In-Reply-To: <20100518212448.GA31331@kroah.com>

On Tue, May 18, 2010 at 04:44:09PM +1000, Stephen Rothwell wrote:
> After merging the driver-core tree, today's linux-next build (powerpc
> ppc64_defconfig) failed like this:
> 
> cc1: warnings being treated as errors
> In file included from include/linux/kobject.h:21,
>                  from include/linux/device.h:17,
>                  from arch/powerpc/lib/devres.c:10:
> include/linux/sysfs.h:97: error: 'struct file' declared inside parameter list
> include/linux/sysfs.h:97: error: its scope is only this definition or
> declaration, which is probably not what you want
> include/linux/sysfs.h:99: error: 'struct file' declared inside parameter list
> include/linux/sysfs.h:101: error: 'struct file' declared inside parameter list
> 
> and many more (arch/powerpc is built with -Werror (as do some other
> architectures)) and lots of similar warnings ...

Add missing forward declaration

Signed-off-by: Chris Wright <chrisw@sous-sol•org>
---
 include/linux/sysfs.h |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h
index 2a0d278..f06b1f1 100644
--- a/include/linux/sysfs.h
+++ b/include/linux/sysfs.h
@@ -86,6 +86,7 @@ struct attribute_group {
 
 #define attr_name(_attr) (_attr).attr.name
 
+struct file;
 struct vm_area_struct;
 
 struct bin_attribute {

  reply	other threads:[~2010-05-18 22:32 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-18  6:44 linux-next: build failure after merge of the driver-core tree Stephen Rothwell
2010-05-18 14:02 ` Greg KH
2010-05-18 14:04   ` Chris Wright
2010-05-18 21:06   ` Chris Wright
2010-05-18 21:24     ` Greg KH
2010-05-18 22:32       ` Chris Wright [this message]
2010-05-20 17:36         ` [PATCH] sysfs: compile fix, struct file forward declaration Greg KH
2010-05-20 18:39           ` Chris Wright

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=20100518223219.GJ8301@sequoia.sous-sol.org \
    --to=chrisw@sous-sol$(echo .)org \
    --cc=greg@kroah$(echo .)com \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linux-next@vger$(echo .)kernel.org \
    --cc=sfr@canb$(echo .)auug.org.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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