Skip to contentSkip to conversation

staging: lustre: lnet: add static to libcfs_dev declaration

PATCH In review Justin Skists 2 participants 2 messages May 10, 2018 – May 11, 2018 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: lustre: lnet: add static to libcfs_dev declaration

Add a static prefix to the declaration for libcfs_dev. This would fix the following sparse warning:

drivers/staging/lustre/lnet/libcfs/module.c:317:19: warning: symbol 'libcfs_dev' was not declared. Should it be static?

---
 drivers/staging/lustre/lnet/libcfs/module.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/lustre/lnet/libcfs/module.c +1 -1
index ca942f474a55..e021e439f140 100644
@@ -314,7 +314,7 @@ static const struct file_operations libcfs_fops = {
 	.unlocked_ioctl	= libcfs_psdev_ioctl,
 };
 
-struct miscdevice libcfs_dev = {
+static struct miscdevice libcfs_dev = {
 	.minor = MISC_DYNAMIC_MINOR,
 	.name = "lnet",
 	.fops = &libcfs_fops,
Signature · 1 line
2.17.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 5 lines · Justin Skists

Add a static prefix to the declaration for libcfs_dev. This would fix the following sparse warning:

drivers/staging/lustre/lnet/libcfs/module.c:317:19: warning: symbol 'libcfs_dev' was not declared. Should it be static?

Thanks - that was my fault. (b4ded66db93b)

Thanks,
NeilBrown

Quoted 21 lines
---
 drivers/staging/lustre/lnet/libcfs/module.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/lustre/lnet/libcfs/module.c +1 -1
index ca942f474a55..e021e439f140 100644
@@ -314,7 +314,7 @@ static const struct file_operations libcfs_fops = {
 	.unlocked_ioctl	= libcfs_psdev_ioctl,
 };
 
-struct miscdevice libcfs_dev = {
+static struct miscdevice libcfs_dev = {
 	.minor = MISC_DYNAMIC_MINOR,
 	.name = "lnet",
 	.fops = &libcfs_fops,
Signature · 1 line
2.17.0

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <http://lists.lustre.org/pipermail/lustre-devel-lustre.org/attachments/20180511/90899e3d/attachment.sig>