* [PATCH 0/4] make function arg and structures as const @ 2017-10-17 16:14 Bhumika Goyal [not found] ` <1508256866-12798-1-git-send-email-bhumirks-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> ` (3 more replies) 0 siblings, 4 replies; 9+ messages in thread From: Bhumika Goyal @ 2017-10-17 16:14 UTC (permalink / raw) To: julia.lawall, trond.myklebust, anna.schumaker, bfields, jlayton, davem, linux-nfs, linux-kernel, netdev Cc: Bhumika Goyal Make the function argument as const. After thing change, make the cache_detail structures as const. Bhumika Goyal (4): sunrpc: make the function arg as const NFS: make cache_detail structures const NFSD: make cache_detail structures const SUNRPC: make cache_detail structures const fs/nfs/dns_resolve.c | 2 +- fs/nfsd/export.c | 4 ++-- fs/nfsd/nfs4idmap.c | 4 ++-- include/linux/sunrpc/cache.h | 2 +- net/sunrpc/auth_gss/svcauth_gss.c | 4 ++-- net/sunrpc/cache.c | 2 +- net/sunrpc/svcauth_unix.c | 4 ++-- 7 files changed, 11 insertions(+), 11 deletions(-) -- 1.9.1 ^ permalink raw reply [flat|nested] 9+ messages in thread
[parent not found: <1508256866-12798-1-git-send-email-bhumirks-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>]
* [PATCH 1/4] sunrpc: make the function arg as const [not found] ` <1508256866-12798-1-git-send-email-bhumirks-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> @ 2017-10-17 16:14 ` Bhumika Goyal 2017-10-17 16:14 ` [PATCH 3/4] NFSD: make cache_detail structures const Bhumika Goyal 1 sibling, 0 replies; 9+ messages in thread From: Bhumika Goyal @ 2017-10-17 16:14 UTC (permalink / raw) To: julia.lawall-L2FTfq7BK8M, trond.myklebust-7I+n7zu2hftEKMMhf/gKZA, anna.schumaker-HgOvQuBEEgTQT0dZR+AlfA, bfields-uC3wQj2KruNg9hUCZPvPmw, jlayton-vpEMnDpepFuMZCB2o+C8xQ, davem-fT/PcQaiUtIeIZ0/mPfg9Q, linux-nfs-u79uwXL29TY76Z2rM5mHXA, linux-kernel-u79uwXL29TY76Z2rM5mHXA, netdev-u79uwXL29TY76Z2rM5mHXA Cc: Bhumika Goyal Make the struct cache_detail *tmpl argument of the function cache_create_net as const as it is only getting passed to kmemup having the argument as const void *. Add const to the prototype too. Signed-off-by: Bhumika Goyal <bhumirks-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> --- include/linux/sunrpc/cache.h | 2 +- net/sunrpc/cache.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/sunrpc/cache.h b/include/linux/sunrpc/cache.h index 270bad0..40d2822 100644 --- a/include/linux/sunrpc/cache.h +++ b/include/linux/sunrpc/cache.h @@ -213,7 +213,7 @@ extern int cache_check(struct cache_detail *detail, extern int cache_register_net(struct cache_detail *cd, struct net *net); extern void cache_unregister_net(struct cache_detail *cd, struct net *net); -extern struct cache_detail *cache_create_net(struct cache_detail *tmpl, struct net *net); +extern struct cache_detail *cache_create_net(const struct cache_detail *tmpl, struct net *net); extern void cache_destroy_net(struct cache_detail *cd, struct net *net); extern void sunrpc_init_cache_detail(struct cache_detail *cd); diff --git a/net/sunrpc/cache.c b/net/sunrpc/cache.c index 79d55d9..e689438 100644 --- a/net/sunrpc/cache.c +++ b/net/sunrpc/cache.c @@ -1674,7 +1674,7 @@ void cache_unregister_net(struct cache_detail *cd, struct net *net) } EXPORT_SYMBOL_GPL(cache_unregister_net); -struct cache_detail *cache_create_net(struct cache_detail *tmpl, struct net *net) +struct cache_detail *cache_create_net(const struct cache_detail *tmpl, struct net *net) { struct cache_detail *cd; int i; -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 3/4] NFSD: make cache_detail structures const [not found] ` <1508256866-12798-1-git-send-email-bhumirks-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 2017-10-17 16:14 ` [PATCH 1/4] sunrpc: make the function arg " Bhumika Goyal @ 2017-10-17 16:14 ` Bhumika Goyal 1 sibling, 0 replies; 9+ messages in thread From: Bhumika Goyal @ 2017-10-17 16:14 UTC (permalink / raw) To: julia.lawall-L2FTfq7BK8M, trond.myklebust-7I+n7zu2hftEKMMhf/gKZA, anna.schumaker-HgOvQuBEEgTQT0dZR+AlfA, bfields-uC3wQj2KruNg9hUCZPvPmw, jlayton-vpEMnDpepFuMZCB2o+C8xQ, davem-fT/PcQaiUtIeIZ0/mPfg9Q, linux-nfs-u79uwXL29TY76Z2rM5mHXA, linux-kernel-u79uwXL29TY76Z2rM5mHXA, netdev-u79uwXL29TY76Z2rM5mHXA Cc: Bhumika Goyal Make these const as they are only getting passed to the function cache_create_net having the argument as const. Signed-off-by: Bhumika Goyal <bhumirks-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> --- fs/nfsd/export.c | 4 ++-- fs/nfsd/nfs4idmap.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/nfsd/export.c b/fs/nfsd/export.c index 3bc08c3..06bb39c 100644 --- a/fs/nfsd/export.c +++ b/fs/nfsd/export.c @@ -231,7 +231,7 @@ static struct cache_head *expkey_alloc(void) return NULL; } -static struct cache_detail svc_expkey_cache_template = { +static const struct cache_detail svc_expkey_cache_template = { .owner = THIS_MODULE, .hash_size = EXPKEY_HASHMAX, .name = "nfsd.fh", @@ -747,7 +747,7 @@ static struct cache_head *svc_export_alloc(void) return NULL; } -static struct cache_detail svc_export_cache_template = { +static const struct cache_detail svc_export_cache_template = { .owner = THIS_MODULE, .hash_size = EXPORT_HASHMAX, .name = "nfsd.export", diff --git a/fs/nfsd/nfs4idmap.c b/fs/nfsd/nfs4idmap.c index 6b9b6cc..a5bb765 100644 --- a/fs/nfsd/nfs4idmap.c +++ b/fs/nfsd/nfs4idmap.c @@ -178,7 +178,7 @@ struct ent { static struct ent *idtoname_update(struct cache_detail *, struct ent *, struct ent *); -static struct cache_detail idtoname_cache_template = { +static const struct cache_detail idtoname_cache_template = { .owner = THIS_MODULE, .hash_size = ENT_HASHMAX, .name = "nfs4.idtoname", @@ -341,7 +341,7 @@ static struct ent *nametoid_update(struct cache_detail *, struct ent *, struct ent *); static int nametoid_parse(struct cache_detail *, char *, int); -static struct cache_detail nametoid_cache_template = { +static const struct cache_detail nametoid_cache_template = { .owner = THIS_MODULE, .hash_size = ENT_HASHMAX, .name = "nfs4.nametoid", -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 2/4] NFS: make cache_detail structure const 2017-10-17 16:14 [PATCH 0/4] make function arg and structures as const Bhumika Goyal [not found] ` <1508256866-12798-1-git-send-email-bhumirks-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> @ 2017-10-17 16:14 ` Bhumika Goyal 2017-10-17 16:14 ` [PATCH 4/4] SUNRPC: make cache_detail structures const Bhumika Goyal 2017-10-17 16:40 ` [PATCH 0/4] make function arg and structures as const Jeff Layton 3 siblings, 0 replies; 9+ messages in thread From: Bhumika Goyal @ 2017-10-17 16:14 UTC (permalink / raw) To: julia.lawall, trond.myklebust, anna.schumaker, bfields, jlayton, davem, linux-nfs, linux-kernel, netdev Cc: Bhumika Goyal Make it const as it is only getting passed to the function cache_create_net having the argument as const. Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> --- fs/nfs/dns_resolve.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/nfs/dns_resolve.c b/fs/nfs/dns_resolve.c index d25f10f..477934a 100644 --- a/fs/nfs/dns_resolve.c +++ b/fs/nfs/dns_resolve.c @@ -353,7 +353,7 @@ ssize_t nfs_dns_resolve_name(struct net *net, char *name, return ret; } -static struct cache_detail nfs_dns_resolve_template = { +static const struct cache_detail nfs_dns_resolve_template = { .owner = THIS_MODULE, .hash_size = NFS_DNS_HASHTBL_SIZE, .name = "dns_resolve", -- 1.9.1 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 4/4] SUNRPC: make cache_detail structures const 2017-10-17 16:14 [PATCH 0/4] make function arg and structures as const Bhumika Goyal [not found] ` <1508256866-12798-1-git-send-email-bhumirks-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 2017-10-17 16:14 ` [PATCH 2/4] NFS: make cache_detail structure const Bhumika Goyal @ 2017-10-17 16:14 ` Bhumika Goyal 2017-10-17 16:40 ` [PATCH 0/4] make function arg and structures as const Jeff Layton 3 siblings, 0 replies; 9+ messages in thread From: Bhumika Goyal @ 2017-10-17 16:14 UTC (permalink / raw) To: julia.lawall, trond.myklebust, anna.schumaker, bfields, jlayton, davem, linux-nfs, linux-kernel, netdev Cc: Bhumika Goyal Make these const as they are only getting passed to the function cache_create_net having the argument as const. Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> --- net/sunrpc/auth_gss/svcauth_gss.c | 4 ++-- net/sunrpc/svcauth_unix.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/net/sunrpc/auth_gss/svcauth_gss.c b/net/sunrpc/auth_gss/svcauth_gss.c index 7b1ee5a..e242cb4 100644 --- a/net/sunrpc/auth_gss/svcauth_gss.c +++ b/net/sunrpc/auth_gss/svcauth_gss.c @@ -264,7 +264,7 @@ static int rsi_parse(struct cache_detail *cd, return status; } -static struct cache_detail rsi_cache_template = { +static const struct cache_detail rsi_cache_template = { .owner = THIS_MODULE, .hash_size = RSI_HASHMAX, .name = "auth.rpcsec.init", @@ -524,7 +524,7 @@ static int rsc_parse(struct cache_detail *cd, return status; } -static struct cache_detail rsc_cache_template = { +static const struct cache_detail rsc_cache_template = { .owner = THIS_MODULE, .hash_size = RSC_HASHMAX, .name = "auth.rpcsec.context", diff --git a/net/sunrpc/svcauth_unix.c b/net/sunrpc/svcauth_unix.c index f81eaa8..740b67d 100644 --- a/net/sunrpc/svcauth_unix.c +++ b/net/sunrpc/svcauth_unix.c @@ -569,7 +569,7 @@ static int unix_gid_show(struct seq_file *m, return 0; } -static struct cache_detail unix_gid_cache_template = { +static const struct cache_detail unix_gid_cache_template = { .owner = THIS_MODULE, .hash_size = GID_HASHMAX, .name = "auth.unix.gid", @@ -862,7 +862,7 @@ struct auth_ops svcauth_unix = { .set_client = svcauth_unix_set_client, }; -static struct cache_detail ip_map_cache_template = { +static const struct cache_detail ip_map_cache_template = { .owner = THIS_MODULE, .hash_size = IP_HASHMAX, .name = "auth.unix.ip", -- 1.9.1 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 0/4] make function arg and structures as const 2017-10-17 16:14 [PATCH 0/4] make function arg and structures as const Bhumika Goyal ` (2 preceding siblings ...) 2017-10-17 16:14 ` [PATCH 4/4] SUNRPC: make cache_detail structures const Bhumika Goyal @ 2017-10-17 16:40 ` Jeff Layton [not found] ` <1508258427.4747.7.camel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> 3 siblings, 1 reply; 9+ messages in thread From: Jeff Layton @ 2017-10-17 16:40 UTC (permalink / raw) To: Bhumika Goyal, julia.lawall, trond.myklebust, anna.schumaker, bfields, davem, linux-nfs, linux-kernel, netdev On Tue, 2017-10-17 at 18:14 +0200, Bhumika Goyal wrote: > Make the function argument as const. After thing change, make > the cache_detail structures as const. > > Bhumika Goyal (4): > sunrpc: make the function arg as const > NFS: make cache_detail structures const > NFSD: make cache_detail structures const > SUNRPC: make cache_detail structures const > > fs/nfs/dns_resolve.c | 2 +- > fs/nfsd/export.c | 4 ++-- > fs/nfsd/nfs4idmap.c | 4 ++-- > include/linux/sunrpc/cache.h | 2 +- > net/sunrpc/auth_gss/svcauth_gss.c | 4 ++-- > net/sunrpc/cache.c | 2 +- > net/sunrpc/svcauth_unix.c | 4 ++-- > 7 files changed, 11 insertions(+), 11 deletions(-) > Looks pretty straightforward. You can add this to the set: Reviewed-by: Jeff Layton <jlayton@redhat.com> ^ permalink raw reply [flat|nested] 9+ messages in thread
[parent not found: <1508258427.4747.7.camel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>]
* Re: [PATCH 0/4] make function arg and structures as const [not found] ` <1508258427.4747.7.camel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> @ 2017-11-10 2:21 ` J. Bruce Fields 2017-11-10 15:09 ` Anna Schumaker 0 siblings, 1 reply; 9+ messages in thread From: J. Bruce Fields @ 2017-11-10 2:21 UTC (permalink / raw) To: Jeff Layton Cc: Bhumika Goyal, julia.lawall-L2FTfq7BK8M, trond.myklebust-7I+n7zu2hftEKMMhf/gKZA, anna.schumaker-HgOvQuBEEgTQT0dZR+AlfA, davem-fT/PcQaiUtIeIZ0/mPfg9Q, linux-nfs-u79uwXL29TY76Z2rM5mHXA, linux-kernel-u79uwXL29TY76Z2rM5mHXA, netdev-u79uwXL29TY76Z2rM5mHXA On Tue, Oct 17, 2017 at 12:40:27PM -0400, Jeff Layton wrote: > On Tue, 2017-10-17 at 18:14 +0200, Bhumika Goyal wrote: > > Make the function argument as const. After thing change, make > > the cache_detail structures as const. > > > > Bhumika Goyal (4): > > sunrpc: make the function arg as const > > NFS: make cache_detail structures const > > NFSD: make cache_detail structures const > > SUNRPC: make cache_detail structures const > > > > fs/nfs/dns_resolve.c | 2 +- > > fs/nfsd/export.c | 4 ++-- > > fs/nfsd/nfs4idmap.c | 4 ++-- > > include/linux/sunrpc/cache.h | 2 +- > > net/sunrpc/auth_gss/svcauth_gss.c | 4 ++-- > > net/sunrpc/cache.c | 2 +- > > net/sunrpc/svcauth_unix.c | 4 ++-- > > 7 files changed, 11 insertions(+), 11 deletions(-) > > > > Looks pretty straightforward. You can add this to the set: > > Reviewed-by: Jeff Layton <jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> Thanks, I've applied 1, 3, and 4 and could take #2 as well if it's OK with Trond/Anna. --b. -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 0/4] make function arg and structures as const 2017-11-10 2:21 ` J. Bruce Fields @ 2017-11-10 15:09 ` Anna Schumaker 2017-11-10 15:29 ` J. Bruce Fields 0 siblings, 1 reply; 9+ messages in thread From: Anna Schumaker @ 2017-11-10 15:09 UTC (permalink / raw) To: J. Bruce Fields, Jeff Layton Cc: Bhumika Goyal, julia.lawall, trond.myklebust, davem, linux-nfs, linux-kernel, netdev On 11/09/2017 09:21 PM, J. Bruce Fields wrote: > On Tue, Oct 17, 2017 at 12:40:27PM -0400, Jeff Layton wrote: >> On Tue, 2017-10-17 at 18:14 +0200, Bhumika Goyal wrote: >>> Make the function argument as const. After thing change, make >>> the cache_detail structures as const. >>> >>> Bhumika Goyal (4): >>> sunrpc: make the function arg as const >>> NFS: make cache_detail structures const >>> NFSD: make cache_detail structures const >>> SUNRPC: make cache_detail structures const >>> >>> fs/nfs/dns_resolve.c | 2 +- >>> fs/nfsd/export.c | 4 ++-- >>> fs/nfsd/nfs4idmap.c | 4 ++-- >>> include/linux/sunrpc/cache.h | 2 +- >>> net/sunrpc/auth_gss/svcauth_gss.c | 4 ++-- >>> net/sunrpc/cache.c | 2 +- >>> net/sunrpc/svcauth_unix.c | 4 ++-- >>> 7 files changed, 11 insertions(+), 11 deletions(-) >>> >> >> Looks pretty straightforward. You can add this to the set: >> >> Reviewed-by: Jeff Layton <jlayton@redhat.com> > > Thanks, I've applied 1, 3, and 4 and could take #2 as well if it's OK > with Trond/Anna. I don't mind taking #2, it's already in my branch :) Anna > > --b. > ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 0/4] make function arg and structures as const 2017-11-10 15:09 ` Anna Schumaker @ 2017-11-10 15:29 ` J. Bruce Fields 0 siblings, 0 replies; 9+ messages in thread From: J. Bruce Fields @ 2017-11-10 15:29 UTC (permalink / raw) To: Anna Schumaker Cc: Jeff Layton, Bhumika Goyal, julia.lawall, trond.myklebust, davem, linux-nfs, linux-kernel, netdev On Fri, Nov 10, 2017 at 10:09:46AM -0500, Anna Schumaker wrote: > > > On 11/09/2017 09:21 PM, J. Bruce Fields wrote: > > On Tue, Oct 17, 2017 at 12:40:27PM -0400, Jeff Layton wrote: > >> On Tue, 2017-10-17 at 18:14 +0200, Bhumika Goyal wrote: > >>> Make the function argument as const. After thing change, make > >>> the cache_detail structures as const. > >>> > >>> Bhumika Goyal (4): > >>> sunrpc: make the function arg as const > >>> NFS: make cache_detail structures const > >>> NFSD: make cache_detail structures const > >>> SUNRPC: make cache_detail structures const > >>> > >>> fs/nfs/dns_resolve.c | 2 +- > >>> fs/nfsd/export.c | 4 ++-- > >>> fs/nfsd/nfs4idmap.c | 4 ++-- > >>> include/linux/sunrpc/cache.h | 2 +- > >>> net/sunrpc/auth_gss/svcauth_gss.c | 4 ++-- > >>> net/sunrpc/cache.c | 2 +- > >>> net/sunrpc/svcauth_unix.c | 4 ++-- > >>> 7 files changed, 11 insertions(+), 11 deletions(-) > >>> > >> > >> Looks pretty straightforward. You can add this to the set: > >> > >> Reviewed-by: Jeff Layton <jlayton@redhat.com> > > > > Thanks, I've applied 1, 3, and 4 and could take #2 as well if it's OK > > with Trond/Anna. > > I don't mind taking #2, it's already in my branch :) OK, thanks.--b. ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2017-11-10 15:29 UTC | newest] Thread overview: 9+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2017-10-17 16:14 [PATCH 0/4] make function arg and structures as const Bhumika Goyal [not found] ` <1508256866-12798-1-git-send-email-bhumirks-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 2017-10-17 16:14 ` [PATCH 1/4] sunrpc: make the function arg " Bhumika Goyal 2017-10-17 16:14 ` [PATCH 3/4] NFSD: make cache_detail structures const Bhumika Goyal 2017-10-17 16:14 ` [PATCH 2/4] NFS: make cache_detail structure const Bhumika Goyal 2017-10-17 16:14 ` [PATCH 4/4] SUNRPC: make cache_detail structures const Bhumika Goyal 2017-10-17 16:40 ` [PATCH 0/4] make function arg and structures as const Jeff Layton [not found] ` <1508258427.4747.7.camel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> 2017-11-10 2:21 ` J. Bruce Fields 2017-11-10 15:09 ` Anna Schumaker 2017-11-10 15:29 ` J. Bruce Fields
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).