From 429eb0fae6c06c9adcda03401c09c2b9ccaa7ebd Mon Sep 17 00:00:00 2001 From: YOSHIFUJI Hideaki Date: Fri, 9 Feb 2007 23:24:40 +0900 Subject: [NET] DECNET: Fix whitespace errors. Signed-off-by: YOSHIFUJI Hideaki Signed-off-by: David S. Miller --- net/decnet/af_decnet.c | 130 ++++++++++++++++++++++++------------------------- 1 file changed, 65 insertions(+), 65 deletions(-) (limited to 'net/decnet/af_decnet.c') diff --git a/net/decnet/af_decnet.c b/net/decnet/af_decnet.c index 21f20f21dd32..70061641ee59 100644 --- a/net/decnet/af_decnet.c +++ b/net/decnet/af_decnet.c @@ -45,7 +45,7 @@ /****************************************************************************** (c) 1995-1998 E.M. Serrat emserrat@geocities.com - + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or @@ -63,7 +63,7 @@ Version Kernel Date Author/Comments Version 0.0.1 2.0.30 01-dic-97 Eduardo Marcelo Serrat (emserrat@geocities.com) - First Development of DECnet Socket La- + First Development of DECnet Socket La- yer for Linux. Only supports outgoing connections. @@ -75,28 +75,28 @@ Version 0.0.2 2.1.105 20-jun-98 Patrick J. Caulfield Version 0.0.3 2.1.106 25-jun-98 Eduardo Marcelo Serrat (emserrat@geocities.com) _ - Added support for incoming connections - so we can start developing server apps - on Linux. + Added support for incoming connections + so we can start developing server apps + on Linux. - Module Support Version 0.0.4 2.1.109 21-jul-98 Eduardo Marcelo Serrat - (emserrat@geocities.com) - _ - Added support for X11R6.4. Now we can - use DECnet transport for X on Linux!!! - - + (emserrat@geocities.com) + _ + Added support for X11R6.4. Now we can + use DECnet transport for X on Linux!!! + - Version 0.0.5 2.1.110 01-aug-98 Eduardo Marcelo Serrat - (emserrat@geocities.com) - Removed bugs on flow control - Removed bugs on incoming accessdata - order - - + (emserrat@geocities.com) + Removed bugs on flow control + Removed bugs on incoming accessdata + order + - Version 0.0.6 2.1.110 07-aug-98 Eduardo Marcelo Serrat - dn_recvmsg fixes + dn_recvmsg fixes - Patrick J. Caulfield - dn_bind fixes + Patrick J. Caulfield + dn_bind fixes *******************************************************************************/ #include @@ -169,7 +169,7 @@ static struct hlist_head *dn_find_list(struct sock *sk) return &dn_sk_hash[dn_ntohs(scp->addrloc) & DN_SK_HASH_MASK]; } -/* +/* * Valid ports are those greater than zero and not already in use. */ static int check_port(__le16 port) @@ -218,7 +218,7 @@ static int dn_hash_sock(struct sock *sk) BUG_ON(sk_hashed(sk)); write_lock_bh(&dn_hash_lock); - + if (!scp->addrloc && !port_alloc(sk)) goto out; @@ -400,7 +400,7 @@ struct sock *dn_sklist_find_listener(struct sockaddr_dn *addr) sk = sk_head(&dn_wild_sk); if (sk) { - if (sk->sk_state == TCP_LISTEN) + if (sk->sk_state == TCP_LISTEN) sock_hold(sk); else sk = NULL; @@ -500,7 +500,7 @@ static struct sock *dn_alloc_sock(struct socket *sock, gfp_t gfp) scp->ackxmt_oth = 0; /* Last oth data ack'ed */ scp->ackrcv_dat = 0; /* Highest data ack recv*/ scp->ackrcv_oth = 0; /* Last oth data ack rec*/ - scp->flowrem_sw = DN_SEND; + scp->flowrem_sw = DN_SEND; scp->flowloc_sw = DN_SEND; scp->flowrem_dat = 0; scp->flowrem_oth = 1; @@ -690,7 +690,7 @@ static int dn_create(struct socket *sock, int protocol) } - if ((sk = dn_alloc_sock(sock, GFP_KERNEL)) == NULL) + if ((sk = dn_alloc_sock(sock, GFP_KERNEL)) == NULL) return -ENOBUFS; sk->sk_protocol = protocol; @@ -713,7 +713,7 @@ dn_release(struct socket *sock) sock_put(sk); } - return 0; + return 0; } static int dn_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len) @@ -770,7 +770,7 @@ static int dn_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len) } release_sock(sk); - return rv; + return rv; } @@ -791,7 +791,7 @@ static int dn_auto_bind(struct socket *sock) */ if ((scp->accessdata.acc_accl != 0) && (scp->accessdata.acc_accl <= 12)) { - + scp->addr.sdn_objnamel = dn_htons(scp->accessdata.acc_accl); memcpy(scp->addr.sdn_objname, scp->accessdata.acc_acc, dn_ntohs(scp->addr.sdn_objnamel)); @@ -997,20 +997,20 @@ static inline int dn_check_state(struct sock *sk, struct sockaddr_dn *addr, int static void dn_access_copy(struct sk_buff *skb, struct accessdata_dn *acc) { - unsigned char *ptr = skb->data; + unsigned char *ptr = skb->data; - acc->acc_userl = *ptr++; - memcpy(&acc->acc_user, ptr, acc->acc_userl); - ptr += acc->acc_userl; + acc->acc_userl = *ptr++; + memcpy(&acc->acc_user, ptr, acc->acc_userl); + ptr += acc->acc_userl; - acc->acc_passl = *ptr++; - memcpy(&acc->acc_pass, ptr, acc->acc_passl); - ptr += acc->acc_passl; + acc->acc_passl = *ptr++; + memcpy(&acc->acc_pass, ptr, acc->acc_passl); + ptr += acc->acc_passl; - acc->acc_accl = *ptr++; - memcpy(&acc->acc_acc, ptr, acc->acc_accl); + acc->acc_accl = *ptr++; + memcpy(&acc->acc_acc, ptr, acc->acc_accl); - skb_pull(skb, acc->acc_accl + acc->acc_passl + acc->acc_userl + 3); + skb_pull(skb, acc->acc_accl + acc->acc_passl + acc->acc_userl + 3); } @@ -1071,7 +1071,7 @@ static int dn_accept(struct socket *sock, struct socket *newsock, int flags) lock_sock(sk); - if (sk->sk_state != TCP_LISTEN || DN_SK(sk)->state != DN_O) { + if (sk->sk_state != TCP_LISTEN || DN_SK(sk)->state != DN_O) { release_sock(sk); return -EINVAL; } @@ -1098,13 +1098,13 @@ static int dn_accept(struct socket *sock, struct socket *newsock, int flags) dst_release(xchg(&newsk->sk_dst_cache, skb->dst)); skb->dst = NULL; - DN_SK(newsk)->state = DN_CR; + DN_SK(newsk)->state = DN_CR; DN_SK(newsk)->addrrem = cb->src_port; DN_SK(newsk)->services_rem = cb->services; DN_SK(newsk)->info_rem = cb->info; DN_SK(newsk)->segsize_rem = cb->segsize; DN_SK(newsk)->accept_mode = DN_SK(sk)->accept_mode; - + if (DN_SK(newsk)->segsize_rem < 230) DN_SK(newsk)->segsize_rem = 230; @@ -1154,15 +1154,15 @@ static int dn_accept(struct socket *sock, struct socket *newsock, int flags) dn_send_conn_ack(newsk); /* - * Here we use sk->sk_allocation since although the conn conf is - * for the newsk, the context is the old socket. - */ + * Here we use sk->sk_allocation since although the conn conf is + * for the newsk, the context is the old socket. + */ if (DN_SK(newsk)->accept_mode == ACC_IMMED) err = dn_confirm_accept(newsk, &timeo, sk->sk_allocation); } release_sock(newsk); - return err; + return err; } @@ -1177,10 +1177,10 @@ static int dn_getname(struct socket *sock, struct sockaddr *uaddr,int *uaddr_len lock_sock(sk); if (peer) { - if ((sock->state != SS_CONNECTED && - sock->state != SS_CONNECTING) && + if ((sock->state != SS_CONNECTED && + sock->state != SS_CONNECTING) && scp->accept_mode == ACC_IMMED) { - release_sock(sk); + release_sock(sk); return -ENOTCONN; } @@ -1191,7 +1191,7 @@ static int dn_getname(struct socket *sock, struct sockaddr *uaddr,int *uaddr_len release_sock(sk); - return 0; + return 0; } @@ -1285,7 +1285,7 @@ static int dn_listen(struct socket *sock, int backlog) out: release_sock(sk); - return err; + return err; } @@ -1333,7 +1333,7 @@ static int dn_setsockopt(struct socket *sock, int level, int optname, char __use return err; } -static int __dn_setsockopt(struct socket *sock, int level,int optname, char __user *optval, int optlen, int flags) +static int __dn_setsockopt(struct socket *sock, int level,int optname, char __user *optval, int optlen, int flags) { struct sock *sk = sock->sk; struct dn_scp *scp = DN_SK(sk); @@ -1360,7 +1360,7 @@ static int __dn_setsockopt(struct socket *sock, int level,int optname, char __us switch(optname) { case DSO_CONDATA: - if (sock->state == SS_CONNECTED) + if (sock->state == SS_CONNECTED) return -EISCONN; if ((scp->state != DN_O) && (scp->state != DN_CR)) return -EINVAL; @@ -1375,7 +1375,7 @@ static int __dn_setsockopt(struct socket *sock, int level,int optname, char __us break; case DSO_DISDATA: - if (sock->state != SS_CONNECTED && scp->accept_mode == ACC_IMMED) + if (sock->state != SS_CONNECTED && scp->accept_mode == ACC_IMMED) return -ENOTCONN; if (optlen != sizeof(struct optdata_dn)) @@ -1388,7 +1388,7 @@ static int __dn_setsockopt(struct socket *sock, int level,int optname, char __us break; case DSO_CONACCESS: - if (sock->state == SS_CONNECTED) + if (sock->state == SS_CONNECTED) return -EISCONN; if (scp->state != DN_O) return -EINVAL; @@ -1521,7 +1521,7 @@ static int __dn_getsockopt(struct socket *sock, int level,int optname, char __us if(get_user(r_len , optlen)) return -EFAULT; - + switch(optname) { case DSO_CONDATA: if (r_len > sizeof(struct optdata_dn)) @@ -1573,11 +1573,11 @@ static int __dn_getsockopt(struct socket *sock, int level,int optname, char __us #ifdef CONFIG_NETFILTER { int val, len; - + if(get_user(len, optlen)) return -EFAULT; - - val = nf_getsockopt(sk, PF_DECnet, optname, + + val = nf_getsockopt(sk, PF_DECnet, optname, optval, &len); if (val >= 0) val = put_user(len, optlen); @@ -1588,7 +1588,7 @@ static int __dn_getsockopt(struct socket *sock, int level,int optname, char __us case DSO_SEQPACKET: case DSO_CONACCEPT: case DSO_CONREJECT: - return -ENOPROTOOPT; + return -ENOPROTOOPT; case DSO_MAXWINDOW: if (r_len > sizeof(unsigned long)) @@ -1724,7 +1724,7 @@ static int dn_recvmsg(struct kiocb *iocb, struct socket *sock, } } } - + if (scp->state != DN_RUN) goto out; @@ -1773,7 +1773,7 @@ static int dn_recvmsg(struct kiocb *iocb, struct socket *sock, if (skb->len == 0) { skb_unlink(skb, queue); kfree_skb(skb); - /* + /* * N.B. Don't refer to skb or cb after this point * in loop. */ @@ -1783,7 +1783,7 @@ static int dn_recvmsg(struct kiocb *iocb, struct socket *sock, } } - if (eor) { + if (eor) { if (sk->sk_type == SOCK_SEQPACKET) break; if (!(flags & MSG_WAITALL)) @@ -1884,7 +1884,7 @@ static inline unsigned int dn_current_mss(struct sock *sk, int flags) return mss_now; } -/* +/* * N.B. We get the timeout wrong here, but then we always did get it * wrong before and this is another step along the road to correcting * it. It ought to get updated each time we pass through the routine, @@ -2044,7 +2044,7 @@ static int dn_sendmsg(struct kiocb *iocb, struct socket *sock, cb->nsp_flags |= 0x20; scp->seg_total += len; - + if (((sent + len) == size) && (flags & MSG_EOR)) { cb->nsp_flags |= 0x40; scp->seg_total = 0; @@ -2202,7 +2202,7 @@ static void dn_socket_seq_stop(struct seq_file *seq, void *v) static void dn_printable_object(struct sockaddr_dn *dn, unsigned char *buf) { int i; - + switch (dn_ntohs(dn->sdn_objnamel)) { case 0: sprintf(buf, "%d", dn->sdn_objnum); @@ -2214,7 +2214,7 @@ static void dn_printable_object(struct sockaddr_dn *dn, unsigned char *buf) buf[i] = '.'; } buf[i] = 0; - } + } } static char *dn_state2asc(unsigned char state) @@ -2381,7 +2381,7 @@ static int __init decnet_init(void) { int rc; - printk(banner); + printk(banner); rc = proto_register(&dn_proto, 1); if (rc != 0) -- cgit v1.2.3 From 9a32144e9d7b4e21341174b1a83b82a82353be86 Mon Sep 17 00:00:00 2001 From: Arjan van de Ven Date: Mon, 12 Feb 2007 00:55:35 -0800 Subject: [PATCH] mark struct file_operations const 7 Many struct file_operations in the kernel can be "const". Marking them const moves these to the .rodata section, which avoids false sharing with potential dirty data. In addition it'll catch accidental writes at compile time to these shared resources. Signed-off-by: Arjan van de Ven Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- ipc/mqueue.c | 4 ++-- ipc/shm.c | 4 ++-- ipc/util.c | 4 ++-- kernel/cpuset.c | 2 +- net/802/tr.c | 2 +- net/8021q/vlanproc.c | 4 ++-- net/appletalk/aarp.c | 2 +- net/appletalk/atalk_proc.c | 6 +++--- net/atm/br2684.c | 2 +- net/atm/clip.c | 2 +- net/atm/lec.c | 2 +- net/atm/mpoa_proc.c | 2 +- net/atm/proc.c | 12 ++++++------ net/ax25/af_ax25.c | 2 +- net/ax25/ax25_route.c | 2 +- net/ax25/ax25_uid.c | 2 +- net/core/dev.c | 4 ++-- net/core/dev_mcast.c | 2 +- net/core/neighbour.c | 4 ++-- net/core/pktgen.c | 6 +++--- net/core/sock.c | 2 +- net/core/wireless.c | 2 +- net/dccp/probe.c | 2 +- net/decnet/af_decnet.c | 2 +- net/decnet/dn_dev.c | 2 +- net/decnet/dn_neigh.c | 2 +- net/decnet/dn_route.c | 2 +- net/ipv4/arp.c | 2 +- net/ipv4/fib_hash.c | 2 +- net/ipv4/fib_trie.c | 6 +++--- net/ipv4/igmp.c | 4 ++-- net/ipv4/ipconfig.c | 2 +- net/ipv4/ipmr.c | 4 ++-- net/ipv4/ipvs/ip_vs_app.c | 2 +- net/ipv4/ipvs/ip_vs_conn.c | 2 +- net/ipv4/ipvs/ip_vs_ctl.c | 4 ++-- net/ipv4/netfilter/ip_conntrack_standalone.c | 6 +++--- net/ipv4/netfilter/ipt_CLUSTERIP.c | 4 ++-- net/ipv4/netfilter/ipt_recent.c | 4 ++-- net/ipv4/netfilter/nf_conntrack_l3proto_ipv4_compat.c | 6 +++--- net/ipv4/proc.c | 6 +++--- net/ipv4/raw.c | 2 +- net/ipv4/route.c | 4 ++-- net/ipv4/tcp_probe.c | 2 +- net/ipv6/addrconf.c | 2 +- net/ipv6/anycast.c | 2 +- net/ipv6/ip6_flowlabel.c | 2 +- net/ipv6/mcast.c | 4 ++-- net/ipv6/proc.c | 4 ++-- net/ipv6/raw.c | 2 +- net/ipv6/route.c | 2 +- net/ipx/ipx_proc.c | 6 +++--- net/irda/discovery.c | 2 +- 53 files changed, 86 insertions(+), 86 deletions(-) (limited to 'net/decnet/af_decnet.c') diff --git a/ipc/mqueue.c b/ipc/mqueue.c index 02717f71d8d0..fafdef357e92 100644 --- a/ipc/mqueue.c +++ b/ipc/mqueue.c @@ -85,7 +85,7 @@ struct mqueue_inode_info { }; static struct inode_operations mqueue_dir_inode_operations; -static struct file_operations mqueue_file_operations; +static const struct file_operations mqueue_file_operations; static struct super_operations mqueue_super_ops; static void remove_notification(struct mqueue_inode_info *info); @@ -1166,7 +1166,7 @@ static struct inode_operations mqueue_dir_inode_operations = { .unlink = mqueue_unlink, }; -static struct file_operations mqueue_file_operations = { +static const struct file_operations mqueue_file_operations = { .flush = mqueue_flush_file, .poll = mqueue_poll_file, .read = mqueue_read_file, diff --git a/ipc/shm.c b/ipc/shm.c index f8e10a25ad7d..5bb617f6306e 100644 --- a/ipc/shm.c +++ b/ipc/shm.c @@ -42,7 +42,7 @@ #include "util.h" -static struct file_operations shm_file_operations; +static const struct file_operations shm_file_operations; static struct vm_operations_struct shm_vm_ops; static struct ipc_ids init_shm_ids; @@ -249,7 +249,7 @@ static int shm_release(struct inode *ino, struct file *file) return 0; } -static struct file_operations shm_file_operations = { +static const struct file_operations shm_file_operations = { .mmap = shm_mmap, .release = shm_release, #ifndef CONFIG_MMU diff --git a/ipc/util.c b/ipc/util.c index 115e9aac1366..08a647965b9e 100644 --- a/ipc/util.c +++ b/ipc/util.c @@ -205,7 +205,7 @@ void __ipc_init ipc_init_ids(struct ipc_ids* ids, int size) } #ifdef CONFIG_PROC_FS -static struct file_operations sysvipc_proc_fops; +static const struct file_operations sysvipc_proc_fops; /** * ipc_init_proc_interface - Create a proc interface for sysipc types using a seq_file interface. * @path: Path in procfs @@ -879,7 +879,7 @@ static int sysvipc_proc_release(struct inode *inode, struct file *file) return seq_release_private(inode, file); } -static struct file_operations sysvipc_proc_fops = { +static const struct file_operations sysvipc_proc_fops = { .open = sysvipc_proc_open, .read = seq_read, .llseek = seq_lseek, diff --git a/kernel/cpuset.c b/kernel/cpuset.c index 6b05dc69c959..232aed2b10f9 100644 --- a/kernel/cpuset.c +++ b/kernel/cpuset.c @@ -2656,7 +2656,7 @@ static int cpuset_open(struct inode *inode, struct file *file) return single_open(file, proc_cpuset_show, pid); } -struct file_operations proc_cpuset_operations = { +const struct file_operations proc_cpuset_operations = { .open = cpuset_open, .read = seq_read, .llseek = seq_lseek, diff --git a/net/802/tr.c b/net/802/tr.c index 31509f613401..96bd14452c55 100644 --- a/net/802/tr.c +++ b/net/802/tr.c @@ -576,7 +576,7 @@ static int rif_seq_open(struct inode *inode, struct file *file) return seq_open(file, &rif_seq_ops); } -static struct file_operations rif_seq_fops = { +static const struct file_operations rif_seq_fops = { .owner = THIS_MODULE, .open = rif_seq_open, .read = seq_read, diff --git a/net/8021q/vlanproc.c b/net/8021q/vlanproc.c index 1b72c9854d6f..5e24f72602a1 100644 --- a/net/8021q/vlanproc.c +++ b/net/8021q/vlanproc.c @@ -81,7 +81,7 @@ static int vlan_seq_open(struct inode *inode, struct file *file) return seq_open(file, &vlan_seq_ops); } -static struct file_operations vlan_fops = { +static const struct file_operations vlan_fops = { .owner = THIS_MODULE, .open = vlan_seq_open, .read = seq_read, @@ -98,7 +98,7 @@ static int vlandev_seq_open(struct inode *inode, struct file *file) return single_open(file, vlandev_seq_show, PDE(inode)->data); } -static struct file_operations vlandev_fops = { +static const struct file_operations vlandev_fops = { .owner = THIS_MODULE, .open = vlandev_seq_open, .read = seq_read, diff --git a/net/appletalk/aarp.c b/net/appletalk/aarp.c index 27e845d260a9..d89d62f3702f 100644 --- a/net/appletalk/aarp.c +++ b/net/appletalk/aarp.c @@ -1048,7 +1048,7 @@ out_kfree: goto out; } -struct file_operations atalk_seq_arp_fops = { +const struct file_operations atalk_seq_arp_fops = { .owner = THIS_MODULE, .open = aarp_seq_open, .read = seq_read, diff --git a/net/appletalk/atalk_proc.c b/net/appletalk/atalk_proc.c index bc3015f277ba..57ff8122b5c5 100644 --- a/net/appletalk/atalk_proc.c +++ b/net/appletalk/atalk_proc.c @@ -240,7 +240,7 @@ static int atalk_seq_socket_open(struct inode *inode, struct file *file) return seq_open(file, &atalk_seq_socket_ops); } -static struct file_operations atalk_seq_interface_fops = { +static const struct file_operations atalk_seq_interface_fops = { .owner = THIS_MODULE, .open = atalk_seq_interface_open, .read = seq_read, @@ -248,7 +248,7 @@ static struct file_operations atalk_seq_interface_fops = { .release = seq_release, }; -static struct file_operations atalk_seq_route_fops = { +static const struct file_operations atalk_seq_route_fops = { .owner = THIS_MODULE, .open = atalk_seq_route_open, .read = seq_read, @@ -256,7 +256,7 @@ static struct file_operations atalk_seq_route_fops = { .release = seq_release, }; -static struct file_operations atalk_seq_socket_fops = { +static const struct file_operations atalk_seq_socket_fops = { .owner = THIS_MODULE, .open = atalk_seq_socket_open, .read = seq_read, diff --git a/net/atm/br2684.c b/net/atm/br2684.c index f949b5c74ec1..ec4ebd3299e3 100644 --- a/net/atm/br2684.c +++ b/net/atm/br2684.c @@ -784,7 +784,7 @@ static int br2684_proc_open(struct inode *inode, struct file *file) return seq_open(file, &br2684_seq_ops); } -static struct file_operations br2684_proc_ops = { +static const struct file_operations br2684_proc_ops = { .owner = THIS_MODULE, .open = br2684_proc_open, .read = seq_read, diff --git a/net/atm/clip.c b/net/atm/clip.c index 5f8a1d222720..ebb5d0ce8b6f 100644 --- a/net/atm/clip.c +++ b/net/atm/clip.c @@ -971,7 +971,7 @@ out_kfree: goto out; } -static struct file_operations arp_seq_fops = { +static const struct file_operations arp_seq_fops = { .open = arp_seq_open, .read = seq_read, .llseek = seq_lseek, diff --git a/net/atm/lec.c b/net/atm/lec.c index 57dc2ab1b65d..986945527691 100644 --- a/net/atm/lec.c +++ b/net/atm/lec.c @@ -1212,7 +1212,7 @@ static int lec_seq_release(struct inode *inode, struct file *file) return seq_release_private(inode, file); } -static struct file_operations lec_seq_fops = { +static const struct file_operations lec_seq_fops = { .owner = THIS_MODULE, .open = lec_seq_open, .read = seq_read, diff --git a/net/atm/mpoa_proc.c b/net/atm/mpoa_proc.c index 43315af10309..4b05cbec7a58 100644 --- a/net/atm/mpoa_proc.c +++ b/net/atm/mpoa_proc.c @@ -39,7 +39,7 @@ static int parse_qos(const char *buff); /* * Define allowed FILE OPERATIONS */ -static struct file_operations mpc_file_operations = { +static const struct file_operations mpc_file_operations = { .owner = THIS_MODULE, .open = proc_mpc_open, .read = seq_read, diff --git a/net/atm/proc.c b/net/atm/proc.c index 190f49ce2cad..9e61e512f667 100644 --- a/net/atm/proc.c +++ b/net/atm/proc.c @@ -33,7 +33,7 @@ static ssize_t proc_dev_atm_read(struct file *file,char __user *buf,size_t count, loff_t *pos); -static struct file_operations proc_atm_dev_ops = { +static const struct file_operations proc_atm_dev_ops = { .owner = THIS_MODULE, .read = proc_dev_atm_read, }; @@ -272,7 +272,7 @@ static int atm_dev_seq_open(struct inode *inode, struct file *file) return seq_open(file, &atm_dev_seq_ops); } -static struct file_operations devices_seq_fops = { +static const struct file_operations devices_seq_fops = { .open = atm_dev_seq_open, .read = seq_read, .llseek = seq_lseek, @@ -307,7 +307,7 @@ static int pvc_seq_open(struct inode *inode, struct file *file) return __vcc_seq_open(inode, file, PF_ATMPVC, &pvc_seq_ops); } -static struct file_operations pvc_seq_fops = { +static const struct file_operations pvc_seq_fops = { .open = pvc_seq_open, .read = seq_read, .llseek = seq_lseek, @@ -341,7 +341,7 @@ static int vcc_seq_open(struct inode *inode, struct file *file) return __vcc_seq_open(inode, file, 0, &vcc_seq_ops); } -static struct file_operations vcc_seq_fops = { +static const struct file_operations vcc_seq_fops = { .open = vcc_seq_open, .read = seq_read, .llseek = seq_lseek, @@ -376,7 +376,7 @@ static int svc_seq_open(struct inode *inode, struct file *file) return __vcc_seq_open(inode, file, PF_ATMSVC, &svc_seq_ops); } -static struct file_operations svc_seq_fops = { +static const struct file_operations svc_seq_fops = { .open = svc_seq_open, .read = seq_read, .llseek = seq_lseek, @@ -457,7 +457,7 @@ void atm_proc_dev_deregister(struct atm_dev *dev) static struct atm_proc_entry { char *name; - struct file_operations *proc_fops; + const struct file_operations *proc_fops; struct proc_dir_entry *dirent; } atm_proc_ents[] = { { .name = "devices", .proc_fops = &devices_seq_fops }, diff --git a/net/ax25/af_ax25.c b/net/ax25/af_ax25.c index 9a0b677d1e7f..1c07c6a50eb8 100644 --- a/net/ax25/af_ax25.c +++ b/net/ax25/af_ax25.c @@ -1938,7 +1938,7 @@ static int ax25_info_open(struct inode *inode, struct file *file) return seq_open(file, &ax25_info_seqops); } -static struct file_operations ax25_info_fops = { +static const struct file_operations ax25_info_fops = { .owner = THIS_MODULE, .open = ax25_info_open, .read = seq_read, diff --git a/net/ax25/ax25_route.c b/net/ax25/ax25_route.c index 7078861a7385..d65b8e22868d 100644 --- a/net/ax25/ax25_route.c +++ b/net/ax25/ax25_route.c @@ -332,7 +332,7 @@ static int ax25_rt_info_open(struct inode *inode, struct file *file) return seq_open(file, &ax25_rt_seqops); } -struct file_operations ax25_route_fops = { +const struct file_operations ax25_route_fops = { .owner = THIS_MODULE, .open = ax25_rt_info_open, .read = seq_read, diff --git a/net/ax25/ax25_uid.c b/net/ax25/ax25_uid.c index 7f4c294b36f1..59a41b1e61f5 100644 --- a/net/ax25/ax25_uid.c +++ b/net/ax25/ax25_uid.c @@ -198,7 +198,7 @@ static int ax25_uid_info_open(struct inode *inode, struct file *file) return seq_open(file, &ax25_uid_seqops); } -struct file_operations ax25_uid_fops = { +const struct file_operations ax25_uid_fops = { .owner = THIS_MODULE, .open = ax25_uid_info_open, .read = seq_read, diff --git a/net/core/dev.c b/net/core/dev.c index 85d58d799329..cf71614dae93 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -2200,7 +2200,7 @@ static int dev_seq_open(struct inode *inode, struct file *file) return seq_open(file, &dev_seq_ops); } -static struct file_operations dev_seq_fops = { +static const struct file_operations dev_seq_fops = { .owner = THIS_MODULE, .open = dev_seq_open, .read = seq_read, @@ -2220,7 +2220,7 @@ static int softnet_seq_open(struct inode *inode, struct file *file) return seq_open(file, &softnet_seq_ops); } -static struct file_operations softnet_seq_fops = { +static const struct file_operations softnet_seq_fops = { .owner = THIS_MODULE, .open = softnet_seq_open, .read = seq_read, diff --git a/net/core/dev_mcast.c b/net/core/dev_mcast.c index bfcbdf73a293..c4e754e86e96 100644 --- a/net/core/dev_mcast.c +++ b/net/core/dev_mcast.c @@ -277,7 +277,7 @@ static int dev_mc_seq_open(struct inode *inode, struct file *file) return seq_open(file, &dev_mc_seq_ops); } -static struct file_operations dev_mc_seq_fops = { +static const struct file_operations dev_mc_seq_fops = { .owner = THIS_MODULE, .open = dev_mc_seq_open, .read = seq_read, diff --git a/net/core/neighbour.c b/net/core/neighbour.c index c08d69650566..512eed91785d 100644 --- a/net/core/neighbour.c +++ b/net/core/neighbour.c @@ -63,7 +63,7 @@ void neigh_changeaddr(struct neigh_table *tbl, struct net_device *dev); static struct neigh_table *neigh_tables; #ifdef CONFIG_PROC_FS -static struct file_operations neigh_stat_seq_fops; +static const struct file_operations neigh_stat_seq_fops; #endif /* @@ -2403,7 +2403,7 @@ static int neigh_stat_seq_open(struct inode *inode, struct file *file) return ret; }; -static struct file_operations neigh_stat_seq_fops = { +static const struct file_operations neigh_stat_seq_fops = { .owner = THIS_MODULE, .open = neigh_stat_seq_open, .read = seq_read, diff --git a/net/core/pktgen.c b/net/core/pktgen.c index c2818e07a4bd..74a9a32b906d 100644 --- a/net/core/pktgen.c +++ b/net/core/pktgen.c @@ -579,7 +579,7 @@ static int pgctrl_open(struct inode *inode, struct file *file) return single_open(file, pgctrl_show, PDE(inode)->data); } -static struct file_operations pktgen_fops = { +static const struct file_operations pktgen_fops = { .owner = THIS_MODULE, .open = pgctrl_open, .read = seq_read, @@ -1672,7 +1672,7 @@ static int pktgen_if_open(struct inode *inode, struct file *file) return single_open(file, pktgen_if_show, PDE(inode)->data); } -static struct file_operations pktgen_if_fops = { +static const struct file_operations pktgen_if_fops = { .owner = THIS_MODULE, .open = pktgen_if_open, .read = seq_read, @@ -1815,7 +1815,7 @@ static int pktgen_thread_open(struct inode *inode, struct file *file) return single_open(file, pktgen_thread_show, PDE(inode)->data); } -static struct file_operations pktgen_thread_fops = { +static const struct file_operations pktgen_thread_fops = { .owner = THIS_MODULE, .open = pktgen_thread_open, .read = seq_read, diff --git a/net/core/sock.c b/net/core/sock.c index 1e35d9973f57..e9986acdd0ab 100644 --- a/net/core/sock.c +++ b/net/core/sock.c @@ -1911,7 +1911,7 @@ static int proto_seq_open(struct inode *inode, struct file *file) return seq_open(file, &proto_seq_ops); } -static struct file_operations proto_seq_fops = { +static const struct file_operations proto_seq_fops = { .owner = THIS_MODULE, .open = proto_seq_open, .read = seq_read, diff --git a/net/core/wireless.c b/net/core/wireless.c index 64017d47b25b..9936ab11e6e0 100644 --- a/net/core/wireless.c +++ b/net/core/wireless.c @@ -674,7 +674,7 @@ static int wireless_seq_open(struct inode *inode, struct file *file) return seq_open(file, &wireless_seq_ops); } -static struct file_operations wireless_seq_fops = { +static const struct file_operations wireless_seq_fops = { .owner = THIS_MODULE, .open = wireless_seq_open, .read = seq_read, diff --git a/net/dccp/probe.c b/net/dccp/probe.c index f81e37de35d5..3b1f509f51dd 100644 --- a/net/dccp/probe.c +++ b/net/dccp/probe.c @@ -149,7 +149,7 @@ out_free: return error ? error : cnt; } -static struct file_operations dccpprobe_fops = { +static const struct file_operations dccpprobe_fops = { .owner = THIS_MODULE, .open = dccpprobe_open, .read = dccpprobe_read, diff --git a/net/decnet/af_decnet.c b/net/decnet/af_decnet.c index 70061641ee59..c6568d637e1a 100644 --- a/net/decnet/af_decnet.c +++ b/net/decnet/af_decnet.c @@ -2331,7 +2331,7 @@ out_kfree: goto out; } -static struct file_operations dn_socket_seq_fops = { +static const struct file_operations dn_socket_seq_fops = { .owner = THIS_MODULE, .open = dn_socket_seq_open, .read = seq_read, diff --git a/net/decnet/dn_dev.c b/net/decnet/dn_dev.c index c5e28114beb8..2b2c7fe45a71 100644 --- a/net/decnet/dn_dev.c +++ b/net/decnet/dn_dev.c @@ -1442,7 +1442,7 @@ static int dn_dev_seq_open(struct inode *inode, struct file *file) return seq_open(file, &dn_dev_seq_ops); } -static struct file_operations dn_dev_seq_fops = { +static const struct file_operations dn_dev_seq_fops = { .owner = THIS_MODULE, .open = dn_dev_seq_open, .read = seq_read, diff --git a/net/decnet/dn_neigh.c b/net/decnet/dn_neigh.c index 11d692dfb4f3..bf701cf5a386 100644 --- a/net/decnet/dn_neigh.c +++ b/net/decnet/dn_neigh.c @@ -598,7 +598,7 @@ out_kfree: goto out; } -static struct file_operations dn_neigh_seq_fops = { +static const struct file_operations dn_neigh_seq_fops = { .owner = THIS_MODULE, .open = dn_neigh_seq_open, .read = seq_read, diff --git a/net/decnet/dn_route.c b/net/decnet/dn_route.c index efccc42ff1c6..c1b5502f195b 100644 --- a/net/decnet/dn_route.c +++ b/net/decnet/dn_route.c @@ -1751,7 +1751,7 @@ out_kfree: goto out; } -static struct file_operations dn_rt_cache_seq_fops = { +static const struct file_operations dn_rt_cache_seq_fops = { .owner = THIS_MODULE, .open = dn_rt_cache_seq_open, .read = seq_read, diff --git a/net/ipv4/arp.c b/net/ipv4/arp.c index a58afde4f72f..0ffd2d2920c3 100644 --- a/net/ipv4/arp.c +++ b/net/ipv4/arp.c @@ -1390,7 +1390,7 @@ out_kfree: goto out; } -static struct file_operations arp_seq_fops = { +static const struct file_operations arp_seq_fops = { .owner = THIS_MODULE, .open = arp_seq_open, .read = seq_read, diff --git a/net/ipv4/fib_hash.c b/net/ipv4/fib_hash.c index dea04d725b04..b21bb28d1fd0 100644 --- a/net/ipv4/fib_hash.c +++ b/net/ipv4/fib_hash.c @@ -1057,7 +1057,7 @@ out_kfree: goto out; } -static struct file_operations fib_seq_fops = { +static const struct file_operations fib_seq_fops = { .owner = THIS_MODULE, .open = fib_seq_open, .read = seq_read, diff --git a/net/ipv4/fib_trie.c b/net/ipv4/fib_trie.c index 004a437bd7b5..c33dca073801 100644 --- a/net/ipv4/fib_trie.c +++ b/net/ipv4/fib_trie.c @@ -2173,7 +2173,7 @@ static int fib_triestat_seq_open(struct inode *inode, struct file *file) return single_open(file, fib_triestat_seq_show, NULL); } -static struct file_operations fib_triestat_fops = { +static const struct file_operations fib_triestat_fops = { .owner = THIS_MODULE, .open = fib_triestat_seq_open, .read = seq_read, @@ -2364,7 +2364,7 @@ out_kfree: goto out; } -static struct file_operations fib_trie_fops = { +static const struct file_operations fib_trie_fops = { .owner = THIS_MODULE, .open = fib_trie_seq_open, .read = seq_read, @@ -2485,7 +2485,7 @@ out_kfree: goto out; } -static struct file_operations fib_route_fops = { +static const struct file_operations fib_route_fops = { .owner = THIS_MODULE, .open = fib_route_seq_open, .read = seq_read, diff --git a/net/ipv4/igmp.c b/net/ipv4/igmp.c index b8e1625d34cf..063721302ebf 100644 --- a/net/ipv4/igmp.c +++ b/net/ipv4/igmp.c @@ -2403,7 +2403,7 @@ out_kfree: goto out; } -static struct file_operations igmp_mc_seq_fops = { +static const struct file_operations igmp_mc_seq_fops = { .owner = THIS_MODULE, .open = igmp_mc_seq_open, .read = seq_read, @@ -2577,7 +2577,7 @@ out_kfree: goto out; } -static struct file_operations igmp_mcf_seq_fops = { +static const struct file_operations igmp_mcf_seq_fops = { .owner = THIS_MODULE, .open = igmp_mcf_seq_open, .read = seq_read, diff --git a/net/ipv4/ipconfig.c b/net/ipv4/ipconfig.c index ba882bec317a..cf49de1a4983 100644 --- a/net/ipv4/ipconfig.c +++ b/net/ipv4/ipconfig.c @@ -1200,7 +1200,7 @@ static int pnp_seq_open(struct inode *indoe, struct file *file) return single_open(file, pnp_seq_show, NULL); } -static struct file_operations pnp_seq_fops = { +static const struct file_operations pnp_seq_fops = { .owner = THIS_MODULE, .open = pnp_seq_open, .read = seq_read, diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c index 604f5b585104..e6d11abd7841 100644 --- a/net/ipv4/ipmr.c +++ b/net/ipv4/ipmr.c @@ -1712,7 +1712,7 @@ out_kfree: } -static struct file_operations ipmr_vif_fops = { +static const struct file_operations ipmr_vif_fops = { .owner = THIS_MODULE, .open = ipmr_vif_open, .read = seq_read, @@ -1874,7 +1874,7 @@ out_kfree: } -static struct file_operations ipmr_mfc_fops = { +static const struct file_operations ipmr_mfc_fops = { .owner = THIS_MODULE, .open = ipmr_mfc_open, .read = seq_read, diff --git a/net/ipv4/ipvs/ip_vs_app.c b/net/ipv4/ipvs/ip_vs_app.c index 6c40899aa161..22e104c6a493 100644 --- a/net/ipv4/ipvs/ip_vs_app.c +++ b/net/ipv4/ipvs/ip_vs_app.c @@ -561,7 +561,7 @@ static int ip_vs_app_open(struct inode *inode, struct file *file) return seq_open(file, &ip_vs_app_seq_ops); } -static struct file_operations ip_vs_app_fops = { +static const struct file_operations ip_vs_app_fops = { .owner = THIS_MODULE, .open = ip_vs_app_open, .read = seq_read, diff --git a/net/ipv4/ipvs/ip_vs_conn.c b/net/ipv4/ipvs/ip_vs_conn.c index 0b5e03476ce4..7018f97c75dc 100644 --- a/net/ipv4/ipvs/ip_vs_conn.c +++ b/net/ipv4/ipvs/ip_vs_conn.c @@ -757,7 +757,7 @@ static int ip_vs_conn_open(struct inode *inode, struct file *file) return seq_open(file, &ip_vs_conn_seq_ops); } -static struct file_operations ip_vs_conn_fops = { +static const struct file_operations ip_vs_conn_fops = { .owner = THIS_MODULE, .open = ip_vs_conn_open, .read = seq_read, diff --git a/net/ipv4/ipvs/ip_vs_ctl.c b/net/ipv4/ipvs/ip_vs_ctl.c index 9b933381ebbe..8b08d9cdcbc8 100644 --- a/net/ipv4/ipvs/ip_vs_ctl.c +++ b/net/ipv4/ipvs/ip_vs_ctl.c @@ -1812,7 +1812,7 @@ out_kfree: goto out; } -static struct file_operations ip_vs_info_fops = { +static const struct file_operations ip_vs_info_fops = { .owner = THIS_MODULE, .open = ip_vs_info_open, .read = seq_read, @@ -1859,7 +1859,7 @@ static int ip_vs_stats_seq_open(struct inode *inode, struct file *file) return single_open(file, ip_vs_stats_show, NULL); } -static struct file_operations ip_vs_stats_fops = { +static const struct file_operations ip_vs_stats_fops = { .owner = THIS_MODULE, .open = ip_vs_stats_seq_open, .read = seq_read, diff --git a/net/ipv4/netfilter/ip_conntrack_standalone.c b/net/ipv4/netfilter/ip_conntrack_standalone.c index 5903588fddce..300ccbbbdac9 100644 --- a/net/ipv4/netfilter/ip_conntrack_standalone.c +++ b/net/ipv4/netfilter/ip_conntrack_standalone.c @@ -222,7 +222,7 @@ out_free: return ret; } -static struct file_operations ct_file_ops = { +static const struct file_operations ct_file_ops = { .owner = THIS_MODULE, .open = ct_open, .read = seq_read, @@ -298,7 +298,7 @@ static int exp_open(struct inode *inode, struct file *file) return seq_open(file, &exp_seq_ops); } -static struct file_operations exp_file_ops = { +static const struct file_operations exp_file_ops = { .owner = THIS_MODULE, .open = exp_open, .read = seq_read, @@ -386,7 +386,7 @@ static int ct_cpu_seq_open(struct inode *inode, struct file *file) return seq_open(file, &ct_cpu_seq_ops); } -static struct file_operations ct_cpu_seq_fops = { +static const struct file_operations ct_cpu_seq_fops = { .owner = THIS_MODULE, .open = ct_cpu_seq_open, .read = seq_read, diff --git a/net/ipv4/netfilter/ipt_CLUSTERIP.c b/net/ipv4/netfilter/ipt_CLUSTERIP.c index 4fe28f264475..e965b333c997 100644 --- a/net/ipv4/netfilter/ipt_CLUSTERIP.c +++ b/net/ipv4/netfilter/ipt_CLUSTERIP.c @@ -70,7 +70,7 @@ static LIST_HEAD(clusterip_configs); static DEFINE_RWLOCK(clusterip_lock); #ifdef CONFIG_PROC_FS -static struct file_operations clusterip_proc_fops; +static const struct file_operations clusterip_proc_fops; static struct proc_dir_entry *clusterip_procdir; #endif @@ -715,7 +715,7 @@ static ssize_t clusterip_proc_write(struct file *file, const char __user *input, return size; } -static struct file_operations clusterip_proc_fops = { +static const struct file_operations clusterip_proc_fops = { .owner = THIS_MODULE, .open = clusterip_proc_open, .read = seq_read, diff --git a/net/ipv4/netfilter/ipt_recent.c b/net/ipv4/netfilter/ipt_recent.c index 6b97b6796173..aecb9c48e152 100644 --- a/net/ipv4/netfilter/ipt_recent.c +++ b/net/ipv4/netfilter/ipt_recent.c @@ -79,7 +79,7 @@ static DEFINE_MUTEX(recent_mutex); #ifdef CONFIG_PROC_FS static struct proc_dir_entry *proc_dir; -static struct file_operations recent_fops; +static const struct file_operations recent_fops; #endif static u_int32_t hash_rnd; @@ -454,7 +454,7 @@ static ssize_t recent_proc_write(struct file *file, const char __user *input, return size; } -static struct file_operations recent_fops = { +static const struct file_operations recent_fops = { .open = recent_seq_open, .read = seq_read, .write = recent_proc_write, diff --git a/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4_compat.c b/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4_compat.c index 14a93a738418..89f933e81035 100644 --- a/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4_compat.c +++ b/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4_compat.c @@ -197,7 +197,7 @@ out_free: return ret; } -static struct file_operations ct_file_ops = { +static const struct file_operations ct_file_ops = { .owner = THIS_MODULE, .open = ct_open, .read = seq_read, @@ -278,7 +278,7 @@ static int exp_open(struct inode *inode, struct file *file) return seq_open(file, &exp_seq_ops); } -static struct file_operations ip_exp_file_ops = { +static const struct file_operations ip_exp_file_ops = { .owner = THIS_MODULE, .open = exp_open, .read = seq_read, @@ -366,7 +366,7 @@ static int ct_cpu_seq_open(struct inode *inode, struct file *file) return seq_open(file, &ct_cpu_seq_ops); } -static struct file_operations ct_cpu_seq_fops = { +static const struct file_operations ct_cpu_seq_fops = { .owner = THIS_MODULE, .open = ct_cpu_seq_open, .read = seq_read, diff --git a/net/ipv4/proc.c b/net/ipv4/proc.c index ccb199e9dd8b..ae68a691e8cd 100644 --- a/net/ipv4/proc.c +++ b/net/ipv4/proc.c @@ -79,7 +79,7 @@ static int sockstat_seq_open(struct inode *inode, struct file *file) return single_open(file, sockstat_seq_show, NULL); } -static struct file_operations sockstat_seq_fops = { +static const struct file_operations sockstat_seq_fops = { .owner = THIS_MODULE, .open = sockstat_seq_open, .read = seq_read, @@ -326,7 +326,7 @@ static int snmp_seq_open(struct inode *inode, struct file *file) return single_open(file, snmp_seq_show, NULL); } -static struct file_operations snmp_seq_fops = { +static const struct file_operations snmp_seq_fops = { .owner = THIS_MODULE, .open = snmp_seq_open, .read = seq_read, @@ -360,7 +360,7 @@ static int netstat_seq_open(struct inode *inode, struct file *file) return single_open(file, netstat_seq_show, NULL); } -static struct file_operations netstat_seq_fops = { +static const struct file_operations netstat_seq_fops = { .owner = THIS_MODULE, .open = netstat_seq_open, .read = seq_read, diff --git a/net/ipv4/raw.c b/net/ipv4/raw.c index 931084bfb572..87e9c1618100 100644 --- a/net/ipv4/raw.c +++ b/net/ipv4/raw.c @@ -916,7 +916,7 @@ out_kfree: goto out; } -static struct file_operations raw_seq_fops = { +static const struct file_operations raw_seq_fops = { .owner = THIS_MODULE, .open = raw_seq_open, .read = seq_read, diff --git a/net/ipv4/route.c b/net/ipv4/route.c index 5b3834b38a2d..9b5e56481d53 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c @@ -393,7 +393,7 @@ out_kfree: goto out; } -static struct file_operations rt_cache_seq_fops = { +static const struct file_operations rt_cache_seq_fops = { .owner = THIS_MODULE, .open = rt_cache_seq_open, .read = seq_read, @@ -484,7 +484,7 @@ static int rt_cpu_seq_open(struct inode *inode, struct file *file) return seq_open(file, &rt_cpu_seq_ops); } -static struct file_operations rt_cpu_seq_fops = { +static const struct file_operations rt_cpu_seq_fops = { .owner = THIS_MODULE, .open = rt_cpu_seq_open, .read = seq_read, diff --git a/net/ipv4/tcp_probe.c b/net/ipv4/tcp_probe.c index 41c157848181..61f406f27294 100644 --- a/net/ipv4/tcp_probe.c +++ b/net/ipv4/tcp_probe.c @@ -143,7 +143,7 @@ out_free: return error ? error : cnt; } -static struct file_operations tcpprobe_fops = { +static const struct file_operations tcpprobe_fops = { .owner = THIS_MODULE, .open = tcpprobe_open, .read = tcpprobe_read, diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index 77e56f2b1af2..ea0755b09033 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c @@ -2776,7 +2776,7 @@ out_kfree: goto out; } -static struct file_operations if6_fops = { +static const struct file_operations if6_fops = { .owner = THIS_MODULE, .open = if6_seq_open, .read = seq_read, diff --git a/net/ipv6/anycast.c b/net/ipv6/anycast.c index e2dc1c41bbf5..6fb2e9d716c0 100644 --- a/net/ipv6/anycast.c +++ b/net/ipv6/anycast.c @@ -565,7 +565,7 @@ out_kfree: goto out; } -static struct file_operations ac6_seq_fops = { +static const struct file_operations ac6_seq_fops = { .owner = THIS_MODULE, .open = ac6_seq_open, .read = seq_read, diff --git a/net/ipv6/ip6_flowlabel.c b/net/ipv6/ip6_flowlabel.c index 1551ab3890a3..c206a152ed9d 100644 --- a/net/ipv6/ip6_flowlabel.c +++ b/net/ipv6/ip6_flowlabel.c @@ -677,7 +677,7 @@ out_kfree: goto out; } -static struct file_operations ip6fl_seq_fops = { +static const struct file_operations ip6fl_seq_fops = { .owner = THIS_MODULE, .open = ip6fl_seq_open, .read = seq_read, diff --git a/net/ipv6/mcast.c b/net/ipv6/mcast.c index c9db5bc5b0f9..a8d6625ec782 100644 --- a/net/ipv6/mcast.c +++ b/net/ipv6/mcast.c @@ -2451,7 +2451,7 @@ out_kfree: goto out; } -static struct file_operations igmp6_mc_seq_fops = { +static const struct file_operations igmp6_mc_seq_fops = { .owner = THIS_MODULE, .open = igmp6_mc_seq_open, .read = seq_read, @@ -2625,7 +2625,7 @@ out_kfree: goto out; } -static struct file_operations igmp6_mcf_seq_fops = { +static const struct file_operations igmp6_mcf_seq_fops = { .owner = THIS_MODULE, .open = igmp6_mcf_seq_open, .read = seq_read, diff --git a/net/ipv6/proc.c b/net/ipv6/proc.c index 032ef95c5b00..c82257dd04b6 100644 --- a/net/ipv6/proc.c +++ b/net/ipv6/proc.c @@ -187,7 +187,7 @@ static int sockstat6_seq_open(struct inode *inode, struct file *file) return single_open(file, sockstat6_seq_show, NULL); } -static struct file_operations sockstat6_seq_fops = { +static const struct file_operations sockstat6_seq_fops = { .owner = THIS_MODULE, .open = sockstat6_seq_open, .read = seq_read, @@ -200,7 +200,7 @@ static int snmp6_seq_open(struct inode *inode, struct file *file) return single_open(file, snmp6_seq_show, PDE(inode)->data); } -static struct file_operations snmp6_seq_fops = { +static const struct file_operations snmp6_seq_fops = { .owner = THIS_MODULE, .open = snmp6_seq_open, .read = seq_read, diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c index 16d4c63ff554..1f8f6275a7e4 100644 --- a/net/ipv6/raw.c +++ b/net/ipv6/raw.c @@ -1273,7 +1273,7 @@ out_kfree: goto out; } -static struct file_operations raw6_seq_fops = { +static const struct file_operations raw6_seq_fops = { .owner = THIS_MODULE, .open = raw6_seq_open, .read = seq_read, diff --git a/net/ipv6/route.c b/net/ipv6/route.c index a415ac610e2d..0e1f4b2cd3dd 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c @@ -2345,7 +2345,7 @@ static int rt6_stats_seq_open(struct inode *inode, struct file *file) return single_open(file, rt6_stats_seq_show, NULL); } -static struct file_operations rt6_stats_seq_fops = { +static const struct file_operations rt6_stats_seq_fops = { .owner = THIS_MODULE, .open = rt6_stats_seq_open, .read = seq_read, diff --git a/net/ipx/ipx_proc.c b/net/ipx/ipx_proc.c index 811e4badce81..db32ac8e79bd 100644 --- a/net/ipx/ipx_proc.c +++ b/net/ipx/ipx_proc.c @@ -322,7 +322,7 @@ static int ipx_seq_socket_open(struct inode *inode, struct file *file) return seq_open(file, &ipx_seq_socket_ops); } -static struct file_operations ipx_seq_interface_fops = { +static const struct file_operations ipx_seq_interface_fops = { .owner = THIS_MODULE, .open = ipx_seq_interface_open, .read = seq_read, @@ -330,7 +330,7 @@ static struct file_operations ipx_seq_interface_fops = { .release = seq_release, }; -static struct file_operations ipx_seq_route_fops = { +static const struct file_operations ipx_seq_route_fops = { .owner = THIS_MODULE, .open = ipx_seq_route_open, .read = seq_read, @@ -338,7 +338,7 @@ static struct file_operations ipx_seq_route_fops = { .release = seq_release, }; -static struct file_operations ipx_seq_socket_fops = { +static const struct file_operations ipx_seq_socket_fops = { .owner = THIS_MODULE, .open = ipx_seq_socket_open, .read = seq_read, diff --git a/net/irda/discovery.c b/net/irda/discovery.c index 789478bc3009..f09734128674 100644 --- a/net/irda/discovery.c +++ b/net/irda/discovery.c @@ -409,7 +409,7 @@ static int discovery_seq_open(struct inode *inode, struct file *file) return seq_open(file, &discovery_seq_ops); } -struct file_operations discovery_seq_fops = { +const struct file_operations discovery_seq_fops = { .owner = THIS_MODULE, .open = discovery_seq_open, .read = seq_read, -- cgit v1.2.3