linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fs/namespace.c: Make to_mnt_ns static
@ 2019-04-14 19:19 Bharath Vedartham
  0 siblings, 0 replies; 4+ messages in thread
From: Bharath Vedartham @ 2019-04-14 19:19 UTC (permalink / raw)
  To: viro; +Cc: linux-fsdevel, linux-kernel

This patch fixes the sparse warning:
"warning: symbol 'to_mnt_ns' was not declared. Should it be static?"

Signed-off-by: Bharath Vedartham <linux.bhar@gmail.com>
---
 fs/namespace.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/namespace.c b/fs/namespace.c
index c9cab30..b39a3ec 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -1732,7 +1732,7 @@ static bool is_mnt_ns_file(struct dentry *dentry)
 	       dentry->d_fsdata == &mntns_operations;
 }
 
-struct mnt_namespace *to_mnt_ns(struct ns_common *ns)
+static struct mnt_namespace *to_mnt_ns(struct ns_common *ns)
 {
 	return container_of(ns, struct mnt_namespace, ns);
 }
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH] fs/namespace.c: make to_mnt_ns() static
@ 2019-12-09 23:48 Eric Biggers
  0 siblings, 0 replies; 4+ messages in thread
From: Eric Biggers @ 2019-12-09 23:48 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Alexander Viro, linux-fsdevel

From: Eric Biggers <ebiggers@google.com>

Make to_mnt_ns() static to address the following 'sparse' warning:

    fs/namespace.c:1731:22: warning: symbol 'to_mnt_ns' was not declared. Should it be static?

Signed-off-by: Eric Biggers <ebiggers@google.com>
---

Hi Andrew, please consider applying this straightforward cleanup.
This has been sent to Al four times with no response, plus this
same patch has been sent many times by other people too.

 fs/namespace.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/namespace.c b/fs/namespace.c
index 2fd0c8bcb8c14..dd26cad6c5dd5 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -1728,7 +1728,7 @@ static bool is_mnt_ns_file(struct dentry *dentry)
 	       dentry->d_fsdata == &mntns_operations;
 }
 
-struct mnt_namespace *to_mnt_ns(struct ns_common *ns)
+static struct mnt_namespace *to_mnt_ns(struct ns_common *ns)
 {
 	return container_of(ns, struct mnt_namespace, ns);
 }
-- 
2.24.0.393.g34dc348eaf-goog


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH] fs/namespace.c: make to_mnt_ns() static
@ 2019-05-29 21:21 Eric Biggers
  0 siblings, 0 replies; 4+ messages in thread
From: Eric Biggers @ 2019-05-29 21:21 UTC (permalink / raw)
  To: linux-fsdevel, Alexander Viro

From: Eric Biggers <ebiggers@google.com>

Make to_mnt_ns() static to address the following 'sparse' warning:

    fs/namespace.c:1736:22: warning: symbol 'to_mnt_ns' was not declared. Should it be static?

Signed-off-by: Eric Biggers <ebiggers@google.com>
---
 fs/namespace.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/namespace.c b/fs/namespace.c
index ffb13f0562b07..0de85376c0c24 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -1733,7 +1733,7 @@ static bool is_mnt_ns_file(struct dentry *dentry)
 	       dentry->d_fsdata == &mntns_operations;
 }
 
-struct mnt_namespace *to_mnt_ns(struct ns_common *ns)
+static struct mnt_namespace *to_mnt_ns(struct ns_common *ns)
 {
 	return container_of(ns, struct mnt_namespace, ns);
 }
-- 
2.22.0.rc1.257.g3120a18244-goog


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH] fs/namespace.c: make to_mnt_ns() static
@ 2018-11-15  0:09 Eric Biggers
  0 siblings, 0 replies; 4+ messages in thread
From: Eric Biggers @ 2018-11-15  0:09 UTC (permalink / raw)
  To: linux-fsdevel, Alexander Viro

From: Eric Biggers <ebiggers@google.com>

to_mnt_ns() is only used in fs/namespace.c, so make it static.

This addresses a gcc warning when -Wmissing-prototypes is enabled.

Signed-off-by: Eric Biggers <ebiggers@google.com>
---
 fs/namespace.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/namespace.c b/fs/namespace.c
index 74f64294a4108..55a3c94ba98b2 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -1690,7 +1690,7 @@ static bool is_mnt_ns_file(struct dentry *dentry)
 	       dentry->d_fsdata == &mntns_operations;
 }
 
-struct mnt_namespace *to_mnt_ns(struct ns_common *ns)
+static struct mnt_namespace *to_mnt_ns(struct ns_common *ns)
 {
 	return container_of(ns, struct mnt_namespace, ns);
 }
-- 
2.19.1.930.g4563a0d9d0-goog

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-12-09 23:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-14 19:19 [PATCH] fs/namespace.c: Make to_mnt_ns static Bharath Vedartham
  -- strict thread matches above, loose matches on Subject: below --
2019-12-09 23:48 [PATCH] fs/namespace.c: make to_mnt_ns() static Eric Biggers
2019-05-29 21:21 Eric Biggers
2018-11-15  0:09 Eric Biggers

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).