From: Grant Likely <grant.likely@secretlab.ca>
To: David Howells <dhowells@redhat.com>, linux-kernel@vger.kernel.org
Cc: linux-arch@vger.kernel.org,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
devicetree-discuss@lists.ozlabs.org, viro@zeniv.linux.org.uk,
linux-fsdevel@vger.kernel.org, Jri Slaby <jslaby@suse.cz>
Subject: Re: [PATCH 09/28] proc: Move some bits from linux/proc_fs.h to linux/{of.h, signal.h, tty.h} [RFC]
Date: Wed, 17 Apr 2013 15:59:20 +0100 [thread overview]
Message-ID: <20130417145920.35C933E2B73@localhost> (raw)
In-Reply-To: <20130416182626.27773.48524.stgit@warthog.procyon.org.uk>
On Tue, 16 Apr 2013 19:26:26 +0100, David Howells <dhowells@redhat.com> wrote:
> Move some bits from linux/proc_fs.h to linux/of.h, signal.h and tty.h.
>
> Also move proc_tty_init() and proc_device_tree_init() to fs/proc/internal.h as
> they're internal to procfs.
>
> Signed-off-by: David Howells <dhowells@redhat.com>
> cc: devicetree-discuss@lists.ozlabs.org
> cc: linux-arch@vger.kernel.org
> cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> cc: Jri Slaby <jslaby@suse.cz>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
> ---
>
> fs/proc/internal.h | 16 ++++++++++++++++
> include/linux/of.h | 10 ++++++++++
> include/linux/proc_fs.h | 37 -------------------------------------
> include/linux/signal.h | 5 +++++
> include/linux/tty.h | 7 +++++++
> 5 files changed, 38 insertions(+), 37 deletions(-)
>
> diff --git a/fs/proc/internal.h b/fs/proc/internal.h
> index 32d8f51..c529b5f 100644
> --- a/fs/proc/internal.h
> +++ b/fs/proc/internal.h
> @@ -198,3 +198,19 @@ extern const struct inode_operations proc_ns_dir_inode_operations;
> extern const struct file_operations proc_ns_dir_operations;
>
> extern int proc_setup_self(struct super_block *);
> +
> +/*
> + * proc_devtree.c
> + */
> +#ifdef CONFIG_PROC_DEVICETREE
> +extern void proc_device_tree_init(void);
> +#endif /* CONFIG_PROC_DEVICETREE */
> +
> +/*
> + * proc_tty.c
> + */
> +#ifdef CONFIG_TTY
> +extern void proc_tty_init(void);
> +#else
> +static inline void proc_tty_init(void) {}
> +#endif
> diff --git a/include/linux/of.h b/include/linux/of.h
> index a0f1292..2d25ff8 100644
> --- a/include/linux/of.h
> +++ b/include/linux/of.h
> @@ -540,4 +540,14 @@ static inline int of_property_read_u32(const struct device_node *np,
> return of_property_read_u32_array(np, propname, out_value, 1);
> }
>
> +#if defined(CONFIG_PROC_FS) && defined(CONFIG_PROC_DEVICETREE)
> +extern void proc_device_tree_add_node(struct device_node *, struct proc_dir_entry *);
> +extern void proc_device_tree_add_prop(struct proc_dir_entry *pde, struct property *prop);
> +extern void proc_device_tree_remove_prop(struct proc_dir_entry *pde,
> + struct property *prop);
> +extern void proc_device_tree_update_prop(struct proc_dir_entry *pde,
> + struct property *newprop,
> + struct property *oldprop);
> +#endif
> +
> #endif /* _LINUX_OF_H */
> diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h
> index 3377224..80d9e24 100644
> --- a/include/linux/proc_fs.h
> +++ b/include/linux/proc_fs.h
> @@ -70,36 +70,6 @@ struct proc_dir_entry *proc_create_data(const char *name, umode_t mode,
> extern void remove_proc_entry(const char *name, struct proc_dir_entry *parent);
> extern int remove_proc_subtree(const char *name, struct proc_dir_entry *parent);
>
> -
> -/*
> - * proc_tty.c
> - */
> -struct tty_driver;
> -#ifdef CONFIG_TTY
> -extern void proc_tty_init(void);
> -#else
> -static inline void proc_tty_init(void)
> -{ }
> -#endif
> -extern void proc_tty_register_driver(struct tty_driver *driver);
> -extern void proc_tty_unregister_driver(struct tty_driver *driver);
> -
> -/*
> - * proc_devtree.c
> - */
> -#ifdef CONFIG_PROC_DEVICETREE
> -struct device_node;
> -struct property;
> -extern void proc_device_tree_init(void);
> -extern void proc_device_tree_add_node(struct device_node *, struct proc_dir_entry *);
> -extern void proc_device_tree_add_prop(struct proc_dir_entry *pde, struct property *prop);
> -extern void proc_device_tree_remove_prop(struct proc_dir_entry *pde,
> - struct property *prop);
> -extern void proc_device_tree_update_prop(struct proc_dir_entry *pde,
> - struct property *newprop,
> - struct property *oldprop);
> -#endif /* CONFIG_PROC_DEVICETREE */
> -
> extern struct proc_dir_entry *proc_symlink(const char *,
> struct proc_dir_entry *, const char *);
> extern struct proc_dir_entry *proc_mkdir(const char *,struct proc_dir_entry *);
> @@ -143,10 +113,6 @@ static inline struct proc_dir_entry *proc_mkdir_mode(const char *name,
> 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) {}
>
> -struct tty_driver;
> -static inline void proc_tty_register_driver(struct tty_driver *driver) {};
> -static inline void proc_tty_unregister_driver(struct tty_driver *driver) {};
> -
> #endif /* CONFIG_PROC_FS */
>
>
> @@ -187,7 +153,4 @@ static inline void *PDE_DATA(const struct inode *inode)
> return PROC_I(inode)->pde->data;
> }
>
> -#include <linux/signal.h>
> -
> -void render_sigset_t(struct seq_file *m, const char *header, sigset_t *set);
> #endif /* _LINUX_PROC_FS_H */
> diff --git a/include/linux/signal.h b/include/linux/signal.h
> index a2dcb94..1135e36 100644
> --- a/include/linux/signal.h
> +++ b/include/linux/signal.h
> @@ -434,4 +434,9 @@ void signals_init(void);
> int restore_altstack(const stack_t __user *);
> int __save_altstack(stack_t __user *, unsigned long);
>
> +#ifdef CONFIG_PROC_FS
> +struct seq_file;
> +extern void render_sigset_t(struct seq_file *, const char *, sigset_t *);
> +#endif
> +
> #endif /* _LINUX_SIGNAL_H */
> diff --git a/include/linux/tty.h b/include/linux/tty.h
> index c75d886..e34605b 100644
> --- a/include/linux/tty.h
> +++ b/include/linux/tty.h
> @@ -658,5 +658,12 @@ do { \
> finish_wait(&wq, &__wait); \
> } while (0)
>
> +#ifdef CONFIG_PROC_FS
> +extern void proc_tty_register_driver(struct tty_driver *);
> +extern void proc_tty_unregister_driver(struct tty_driver *);
> +#else
> +static inline void proc_tty_register_driver(struct tty_driver *) {}
> +static inline void proc_tty_unregister_driver(struct tty_driver *) {}
> +#endif
>
> #endif
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
--
Grant Likely, B.Sc, P.Eng.
Secret Lab Technologies, Ltd.
next prev parent reply other threads:[~2013-04-17 14:59 UTC|newest]
Thread overview: 57+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-16 18:25 [PATCH 00/28] Privatise procfs internals [RFC] David Howells
2013-04-16 18:25 ` [PATCH 01/28] Include missing linux/slab.h inclusions [RFC] David Howells
[not found] ` <20130416182554.27773.86004.stgit-S6HVgzuS8uM4Awkfq6JHfwNdhmdF6hFW@public.gmane.org>
2013-04-17 0:56 ` Greg KH
2013-04-16 18:25 ` [PATCH 02/28] Include missing linux/magic.h " David Howells
2013-04-16 18:26 ` [PATCH 03/28] proc: Split kcore bits from linux/procfs.h into linux/kcore.h [RFC] David Howells
2013-04-16 21:37 ` KOSAKI Motohiro
2013-04-16 22:07 ` David Howells
2013-04-16 22:13 ` KOSAKI Motohiro
2013-04-17 9:13 ` Ralf Baechle
2013-04-16 18:26 ` [PATCH 04/28] proc: Supply PDE attribute setting accessor functions [RFC] David Howells
2013-04-16 21:37 ` Mauro Carvalho Chehab
2013-04-18 16:42 ` Bjorn Helgaas
[not found] ` <20130416182606.27773.55054.stgit-S6HVgzuS8uM4Awkfq6JHfwNdhmdF6hFW@public.gmane.org>
2013-04-25 15:22 ` Vasant Hegde
2013-04-16 18:26 ` [PATCH 05/28] proc: Uninline pid_delete_dentry() [RFC] David Howells
2013-04-16 18:26 ` [PATCH 06/28] proc: Move proc_fd() to fs/proc/fd.h [RFC] David Howells
2013-04-16 18:26 ` [PATCH 07/28] proc: Split the namespace stuff out into linux/proc_ns.h [RFC] David Howells
2013-04-16 18:26 ` [PATCH 08/28] proc: Move PDE_NET() to fs/proc/proc_net.c [RFC] David Howells
2013-04-16 18:26 ` [PATCH 09/28] proc: Move some bits from linux/proc_fs.h to linux/{of.h, signal.h, tty.h} [RFC] David Howells
2013-04-17 0:57 ` Greg Kroah-Hartman
2013-04-17 14:59 ` Grant Likely [this message]
2013-04-16 18:26 ` [PATCH 10/28] proc: Add proc_mkdir_data() [RFC] David Howells
2013-04-16 21:39 ` Mauro Carvalho Chehab
2013-04-17 0:58 ` Greg KH
2013-04-16 18:26 ` [PATCH 11/28] rtl8187se: Use a dir under /proc/net/r8180/ [RFC] David Howells
[not found] ` <20130416182635.27773.93633.stgit-S6HVgzuS8uM4Awkfq6JHfwNdhmdF6hFW@public.gmane.org>
2013-04-17 0:59 ` Greg KH
2013-04-16 18:26 ` [PATCH 12/28] rtl8192u: Don't need to save device proc dir PDE [RFC] David Howells
[not found] ` <20130416182639.27773.60503.stgit-S6HVgzuS8uM4Awkfq6JHfwNdhmdF6hFW@public.gmane.org>
2013-04-17 1:00 ` Greg KH
2013-04-16 18:26 ` [PATCH 13/28] airo: Use remove_proc_subtree() [RFC] David Howells
2013-04-16 18:26 ` [PATCH 14/28] proc: Supply an accessor for getting the data from a PDE's parent [RFC] David Howells
2013-04-17 1:01 ` Greg KH
2013-04-16 18:26 ` [PATCH 15/28] reiserfs: Don't access the proc_dir_entry in r_open(), r_start() r_show() [RFC] David Howells
2013-04-16 18:26 ` [PATCH 16/28] zoran: Don't print proc_dir_entry data in debug [RFC] David Howells
2013-04-16 21:32 ` Mauro Carvalho Chehab
2013-04-16 18:26 ` [PATCH 17/28] drm: Constify drm_proc_list[] [RFC] David Howells
2013-04-16 18:27 ` [PATCH 18/28] drm: proc: Use minor->index to label things, not PDE->name [RFC] David Howells
2013-04-16 18:27 ` [PATCH 19/28] drm: proc: Use remove_proc_subtree() [RFC] David Howells
2013-04-16 18:27 ` [PATCH 21/28] dgrp: Clean up the use of procfs [RFC] David Howells
2013-04-17 1:02 ` Greg KH
2013-04-16 18:27 ` [PATCH 22/28] ppc: Clean up rtas_flash driver somewhat [RFC] David Howells
2013-04-25 14:33 ` Vasant Hegde
2013-04-16 18:27 ` [PATCH 23/28] ppc: Clean up scanlog [RFC] David Howells
2013-04-25 15:01 ` Vasant Hegde
2013-04-16 18:27 ` [PATCH 24/28] proc: Supply an accessor to get the name in a proc_dir_entry struct [RFC] David Howells
2013-04-16 22:20 ` Harald Welte
[not found] ` <20130416182550.27773.89310.stgit-S6HVgzuS8uM4Awkfq6JHfwNdhmdF6hFW@public.gmane.org>
2013-04-16 18:27 ` [PATCH 20/28] hostap: proc: Use remove_proc_subtree() [RFC] David Howells
2013-04-16 18:27 ` [PATCH 25/28] proc: Supply an accessor to get the process ID associated with some proc files [RFC] David Howells
[not found] ` <20130416182730.27773.88726.stgit-S6HVgzuS8uM4Awkfq6JHfwNdhmdF6hFW@public.gmane.org>
2013-04-17 1:53 ` Li Zefan
2013-04-18 18:39 ` Tejun Heo
2013-04-16 18:27 ` [PATCH 26/28] proc: Supply a function to remove a proc entry by PDE [RFC] David Howells
2013-04-17 15:03 ` Grant Likely
2013-04-18 16:41 ` Bjorn Helgaas
2013-04-18 20:34 ` David Howells
2013-04-21 22:01 ` Rafael J. Wysocki
2013-04-16 18:27 ` [PATCH 27/28] proc: Make the PROC_I() and PDE() macros internal to procfs [RFC] David Howells
2013-04-16 18:27 ` [PATCH 28/28] proc: Move non-public stuff from linux/proc_fs.h to fs/proc/internal.h [RFC] David Howells
2013-05-01 20:51 ` [PATCH 00/28] Privatise procfs internals [RFC] Geert Uytterhoeven
2013-05-03 20:27 ` Geert Uytterhoeven
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=20130417145920.35C933E2B73@localhost \
--to=grant.likely@secretlab.ca \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=dhowells@redhat.com \
--cc=gregkh@linuxfoundation.org \
--cc=jslaby@suse.cz \
--cc=linux-arch@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--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).