Skip to contentSkip to conversation

devtmpfs: make 'devtmpfs_context_ops' static

PATCH New Ben Dooks 1 participant 1 message Jan 16 Driver core

lore
Share & tools
lore

Ben Dooks

author
#0 lore raw

PATCH 1/1 devtmpfs: make 'devtmpfs_context_ops' static

The 'devtmpfs_context_ops' object is not exported outside the devtmpfs.c file nor defined anywhere for use outside. Make this static to remove the following sparse warning:

drivers/base/devtmpfs.c:88:30: warning: symbol 'devtmpfs_context_ops' was not declared. Should it be static?

---
 drivers/base/devtmpfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/base/devtmpfs.c +1 -1
index 194b44075ac7..748ad3698107 100644
@@ -85,7 +85,7 @@ static int devtmpfs_get_tree(struct fs_context *fc)
 }
 
 /* Ops are filled in during init depending on underlying shmem or ramfs type */
-struct fs_context_operations devtmpfs_context_ops = {};
+static struct fs_context_operations devtmpfs_context_ops = {};
 
 /* Call the underlying initialization and set to our ops */
 static int devtmpfs_init_fs_context(struct fs_context *fc)
Signature · 1 line
2.37.2.352.g3c44437643