Commit d34971a6 authored by Bhumika Goyal's avatar Bhumika Goyal Committed by J. Bruce Fields

sunrpc: make the function arg as const

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: default avatarBhumika Goyal <bhumirks@gmail.com>
Reviewed-by: default avatarJeff Layton <jlayton@redhat.com>
Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
parent ae254dac
...@@ -213,7 +213,7 @@ extern void __init cache_initialize(void); ...@@ -213,7 +213,7 @@ extern void __init cache_initialize(void);
extern int cache_register_net(struct cache_detail *cd, struct net *net); 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 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 cache_destroy_net(struct cache_detail *cd, struct net *net);
extern void sunrpc_init_cache_detail(struct cache_detail *cd); extern void sunrpc_init_cache_detail(struct cache_detail *cd);
......
...@@ -1674,7 +1674,7 @@ void cache_unregister_net(struct cache_detail *cd, struct net *net) ...@@ -1674,7 +1674,7 @@ void cache_unregister_net(struct cache_detail *cd, struct net *net)
} }
EXPORT_SYMBOL_GPL(cache_unregister_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; struct cache_detail *cd;
int i; int i;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment