From: Samuel Ortiz <samuel@sortiz.org>
To: Stephen Hemminger <shemminger@vyatta.com>
Cc: David Miller <davem@davemloft.net>,
netdev@vger.kernel.org, linux-wireless@vger.kernel.org
Subject: Re: [PATCH 5/5] net: file_operations should be const
Date: Wed, 02 Sep 2009 10:55:11 +0200 [thread overview]
Message-ID: <1251881711.2829.0.camel@sortiz-mobl> (raw)
In-Reply-To: <20090902052538.601908379@vyatta.com>
On Tue, 2009-09-01 at 22:25 -0700, Stephen Hemminger wrote:
> plain text document attachment (const-file-ops.patch)
> All instances of file_operations should be const.
>
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
For the IrDA parts:
Acked-by: Samuel Ortiz <samuel@sortiz.org>
>
> ---
> net/ipv6/ip6mr.c | 4 ++--
> net/irda/irnet/irnet_ppp.h | 2 +-
> net/irda/irproc.c | 14 +++++++-------
> net/key/af_key.c | 2 +-
> net/mac80211/rc80211_minstrel_debugfs.c | 2 +-
> net/mac80211/rc80211_pid_debugfs.c | 2 +-
> net/xfrm/xfrm_proc.c | 2 +-
> 7 files changed, 14 insertions(+), 14 deletions(-)
>
> --- a/net/ipv6/ip6mr.c 2009-09-01 22:06:18.049861877 -0700
> +++ b/net/ipv6/ip6mr.c 2009-09-01 22:06:45.101130517 -0700
> @@ -217,7 +217,7 @@ static int ip6mr_vif_open(struct inode *
> sizeof(struct ipmr_vif_iter));
> }
>
> -static struct file_operations ip6mr_vif_fops = {
> +static const struct file_operations ip6mr_vif_fops = {
> .owner = THIS_MODULE,
> .open = ip6mr_vif_open,
> .read = seq_read,
> @@ -341,7 +341,7 @@ static int ipmr_mfc_open(struct inode *i
> sizeof(struct ipmr_mfc_iter));
> }
>
> -static struct file_operations ip6mr_mfc_fops = {
> +static const struct file_operations ip6mr_mfc_fops = {
> .owner = THIS_MODULE,
> .open = ipmr_mfc_open,
> .read = seq_read,
> --- a/net/irda/irnet/irnet_ppp.h 2009-09-01 22:06:18.066775983 -0700
> +++ b/net/irda/irnet/irnet_ppp.h 2009-09-01 22:07:01.768232028 -0700
> @@ -95,7 +95,7 @@ static int
> /**************************** VARIABLES ****************************/
>
> /* Filesystem callbacks (to call us) */
> -static struct file_operations irnet_device_fops =
> +static const struct file_operations irnet_device_fops =
> {
> .owner = THIS_MODULE,
> .read = dev_irnet_read,
> --- a/net/irda/irproc.c 2009-09-01 22:06:18.083862409 -0700
> +++ b/net/irda/irproc.c 2009-09-01 22:07:33.742884934 -0700
> @@ -34,21 +34,21 @@
> #include <net/irda/irlap.h>
> #include <net/irda/irlmp.h>
>
> -extern struct file_operations discovery_seq_fops;
> -extern struct file_operations irlap_seq_fops;
> -extern struct file_operations irlmp_seq_fops;
> -extern struct file_operations irttp_seq_fops;
> -extern struct file_operations irias_seq_fops;
> +extern const struct file_operations discovery_seq_fops;
> +extern const struct file_operations irlap_seq_fops;
> +extern const struct file_operations irlmp_seq_fops;
> +extern const struct file_operations irttp_seq_fops;
> +extern const struct file_operations irias_seq_fops;
>
> struct irda_entry {
> const char *name;
> - struct file_operations *fops;
> + const struct file_operations *fops;
> };
>
> struct proc_dir_entry *proc_irda;
> EXPORT_SYMBOL(proc_irda);
>
> -static struct irda_entry irda_dirs[] = {
> +static const struct irda_entry irda_dirs[] = {
> {"discovery", &discovery_seq_fops},
> {"irttp", &irttp_seq_fops},
> {"irlmp", &irlmp_seq_fops},
> --- a/net/key/af_key.c 2009-09-01 22:06:18.103861872 -0700
> +++ b/net/key/af_key.c 2009-09-01 22:07:53.008956985 -0700
> @@ -3718,7 +3718,7 @@ static int pfkey_seq_open(struct inode *
> sizeof(struct seq_net_private));
> }
>
> -static struct file_operations pfkey_proc_ops = {
> +static const struct file_operations pfkey_proc_ops = {
> .open = pfkey_seq_open,
> .read = seq_read,
> .llseek = seq_lseek,
> --- a/net/mac80211/rc80211_minstrel_debugfs.c 2009-09-01 22:06:18.119862498 -0700
> +++ b/net/mac80211/rc80211_minstrel_debugfs.c 2009-09-01 22:08:22.747241542 -0700
> @@ -139,7 +139,7 @@ minstrel_stats_release(struct inode *ino
> return 0;
> }
>
> -static struct file_operations minstrel_stat_fops = {
> +static const struct file_operations minstrel_stat_fops = {
> .owner = THIS_MODULE,
> .open = minstrel_stats_open,
> .read = minstrel_stats_read,
> --- a/net/mac80211/rc80211_pid_debugfs.c 2009-09-01 22:06:18.135862300 -0700
> +++ b/net/mac80211/rc80211_pid_debugfs.c 2009-09-01 22:08:28.843245757 -0700
> @@ -198,7 +198,7 @@ static ssize_t rate_control_pid_events_r
>
> #undef RC_PID_PRINT_BUF_SIZE
>
> -static struct file_operations rc_pid_fop_events = {
> +static const struct file_operations rc_pid_fop_events = {
> .owner = THIS_MODULE,
> .read = rate_control_pid_events_read,
> .poll = rate_control_pid_events_poll,
> --- a/net/xfrm/xfrm_proc.c 2009-09-01 22:06:18.169862213 -0700
> +++ b/net/xfrm/xfrm_proc.c 2009-09-01 22:08:48.707830315 -0700
> @@ -60,7 +60,7 @@ static int xfrm_statistics_seq_open(stru
> return single_open_net(inode, file, xfrm_statistics_seq_show);
> }
>
> -static struct file_operations xfrm_statistics_seq_fops = {
> +static const struct file_operations xfrm_statistics_seq_fops = {
> .owner = THIS_MODULE,
> .open = xfrm_statistics_seq_open,
> .read = seq_read,
>
next prev parent reply other threads:[~2009-09-02 8:53 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-02 5:25 [PATCH 0/5] More const ops cleanups Stephen Hemminger
2009-09-02 5:25 ` [PATCH 1/5] netdev: drivers should make ethtool_ops const Stephen Hemminger
2009-09-02 5:25 ` Stephen Hemminger
2009-09-02 13:53 ` John W. Linville
2009-09-02 13:53 ` John W. Linville
2009-09-02 5:25 ` [PATCH 2/5] net: seq_operations should be const Stephen Hemminger
2009-09-02 5:25 ` [PATCH 3/5] tcp: MD5 operations " Stephen Hemminger
2009-09-02 5:25 ` [PATCH 4/5] inet: inet_connection_sock_af_ops const Stephen Hemminger
2009-09-02 5:25 ` [PATCH 5/5] net: file_operations should be const Stephen Hemminger
2009-09-02 5:25 ` Stephen Hemminger
2009-09-02 8:55 ` Samuel Ortiz [this message]
2009-09-02 13:53 ` John W. Linville
2009-09-02 7:46 ` [PATCH 0/5] More const ops cleanups David Miller
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=1251881711.2829.0.camel@sortiz-mobl \
--to=samuel@sortiz.org \
--cc=davem@davemloft.net \
--cc=linux-wireless@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=shemminger@vyatta.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.