Skip to contentSkip to conversation

drivers/base: make devtmpfs_context_ops static

PATCH Superseded dywoq 3 participants 6 messages Jan 15 – Jan 17 Driver core

lore
Share & tools
lore

dywoq

author
#0 lore raw

PATCH 1/1 drivers/base: make devtmpfs_context_ops static

The devtmpfs_context_ops symbol is only used within devtmpfs.c. Marking it static removes compiler warnings and limits symbol visibility.

---
 drivers/base/devtmpfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/base/devtmpfs.c +1 -1
index 194b44075..748ad3698 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.52.0
maintainer
#1 lore raw
Quoted 4 lines · dywoq

The devtmpfs_context_ops symbol is only used within devtmpfs.c. Marking it static removes compiler warnings and limits symbol visibility.

We need a real name here, thanks!

greg k-h

#2 lore raw

Hi Greg,

Quoted 3 lines

We need a real name here, thanks!

I updated the commit message to include a full real name in v2. Let me know if anything else is needed.

#3 lore raw

PATCH v2 1/1 drivers/base: make devtmpfs_context_ops static

In reply to dywoq

The devtmpfs_context_ops symbol is only used within devtmpfs.c. Marking it static removes compiler warnings and limits symbol visibility.

Changes since v1:
- Use real name in From and Signed-off-by

---
 drivers/base/devtmpfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/base/devtmpfs.c +1 -1
index 194b44075..748ad3698 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.52.0
maintainer
#4 lore raw
Quoted 7 lines · Alexey Suchkov

The devtmpfs_context_ops symbol is only used within devtmpfs.c. Marking it static removes compiler warnings and limits symbol visibility.

Changes since v1:
- Use real name in From and Signed-off-by

This is already fixed by [1]. Note that the patch was already sent at Jan 8, but due to a typo didn't make it to the list.

[1] https://patch.msgid.link/[email protected]

#5 lore raw

Hi Danilo,

Quoted 2 lines

This is already fixed by [1]. Note that the patch was already sent at Jan 8, but due to a typo didn't make it to the list.

Thanks for the pointer. Since this is already fixed by another patch, I'll drop mine. Thank you!