linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Randy Dunlap <rdunlap@infradead.org>
To: David Rientjes <rientjes@google.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>,
	linux-next@vger.kernel.org, linux-kernel@vger.kernel.org,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Al Viro <viro@zeniv.linux.org.uk>
Subject: Re: [PATCH -next] proc_fs.h: fix build error when PROC_FS is not enabled
Date: Tue, 30 Apr 2013 10:40:14 -0700	[thread overview]
Message-ID: <518001FE.1010305@infradead.org> (raw)
In-Reply-To: <alpine.DEB.2.02.1304300935290.31619@chino.kir.corp.google.com>

On 04/30/13 09:36, David Rientjes wrote:
> On Mon, 29 Apr 2013, Randy Dunlap wrote:
> 
>> From: Randy Dunlap <rdunlap@infradead.org>
>>
>> Fix build error when CONFIG_PROC_FS is not enabled:
>> (remove duplicated line)
>>
>> include/linux/proc_fs.h:58:20: error: redefinition of 'proc_set_size'
>> include/linux/proc_fs.h:51:20: note: previous definition of 'proc_set_size' was here
>>
> 
> I get more than that on linux-next:
> 
> include/linux/proc_fs.h:58:20: error: redefinition of 'proc_set_size'
> include/linux/proc_fs.h:51:20: note: previous definition of 'proc_set_size' was here
> include/linux/proc_fs.h: In function 'proc_net_mkdir':
> include/linux/proc_fs.h:69:2: error: implicit declaration of function 'proc_mkdir_data' [-Werror=implicit-function-declaration]
> include/linux/proc_fs.h:69:2: warning: return makes pointer from integer without a cast [enabled by default]
> 
> so don't we need to do this instead?
> 
> diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h
> --- a/include/linux/proc_fs.h
> +++ b/include/linux/proc_fs.h
> @@ -21,7 +21,6 @@ extern struct proc_dir_entry *proc_mkdir_data(const char *, umode_t,
>  					      struct proc_dir_entry *, void *);
>  extern struct proc_dir_entry *proc_mkdir_mode(const char *, umode_t,
>  					      struct proc_dir_entry *);
> - 
>  extern struct proc_dir_entry *proc_create_data(const char *, umode_t,
>  					       struct proc_dir_entry *,
>  					       const struct file_operations *,
> @@ -52,10 +51,11 @@ static inline void proc_set_size(struct proc_dir_entry *de, loff_t size) {}
>  static inline void proc_set_user(struct proc_dir_entry *de, kuid_t uid, kgid_t gid) {}
>  static inline void *proc_get_parent_data(const struct inode *inode) { return NULL; }
>  
> +static inline struct proc_dir_entry *proc_mkdir_data(const char *name, umode_t mode,
> +	struct proc_dir_entry *parent, void *data) { return NULL; }
>  static inline struct proc_dir_entry *proc_create_data(const char *name,
>  	umode_t mode, struct proc_dir_entry *parent,
>  	const struct file_operations *proc_fops, void *data) { return NULL; }
> -static inline void proc_set_size(struct proc_dir_entry *de, loff_t size) {}
>  
>  static inline void proc_remove(struct proc_dir_entry *de) {}
>  static inline void remove_proc_entry(const char *name, struct proc_dir_entry *parent) {}
> --

Hi David,

Al has a patchset for this mess here:
https://git.kernel.org/cgit/linux/kernel/git/viro/vfs.git/commit/?h=for-next

so mine at least can be ignored.

-- 
~Randy

  reply	other threads:[~2013-04-30 17:40 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-29  9:17 linux-next: Tree for Apr 29 Stephen Rothwell
2013-04-29 15:52 ` linux-next: Tree for Apr 29 (kvm) Randy Dunlap
2013-04-29 16:31   ` Gleb Natapov
2013-04-29 16:46     ` Paolo Bonzini
2013-04-29 17:01       ` Alex Williamson
2013-04-29 16:49     ` Alex Williamson
2013-04-29 16:05 ` [PATCH -next] proc_fs.h: fix build error when PROC_FS is not enabled Randy Dunlap
2013-04-30 16:36   ` David Rientjes
2013-04-30 17:40     ` Randy Dunlap [this message]
2013-04-29 16:05 ` [PATCH -next] tty.h: fix build errors " Randy Dunlap
2013-04-30 16:39   ` David Rientjes
2013-04-29 16:17 ` linux-next: Tree for Apr 29 (include/linux/proc_fs.h: proc_net_mkdir) Randy Dunlap
2013-04-29 16:25 ` linux-next: Tree for Apr 29 (kconfig) Randy Dunlap
2013-04-29 17:42   ` Yann E. MORIN
2013-04-29 16:42 ` linux-next: Tree for Apr 29 (staging/gdm72xx) Randy Dunlap
2013-04-29 16:51 ` linux-next: Tree for Apr 29 (sound/soc) Randy Dunlap
2013-04-29 17:13 ` linux-next: Tree for Apr 29 (many build errors when PROC_FS is not set -- part 1) Randy Dunlap
2013-04-29 20:05 ` linux-next: Tree for Apr 29 Randy Dunlap
2013-04-29 21:03   ` Randy Dunlap

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=518001FE.1010305@infradead.org \
    --to=rdunlap@infradead.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=rientjes@google.com \
    --cc=sfr@canb.auug.org.au \
    --cc=viro@zeniv.linux.org.uk \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).