Skip to contentSkip to conversation

vfio/mdev: make create attribute static

PATCH Applied Ben Dooks (Codethink) 3 participants 3 messages Dec 18, 2019 – Jan 10, 2020

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 vfio/mdev: make create attribute static

The create attribute is not exported, so make it
static to avoid the following sparse warning:

drivers/vfio/mdev/mdev_sysfs.c:77:1: warning: symbol 'mdev_type_attr_create' was not declared. Should it be static?

---
Cc: Kirti Wankhede <[email protected]>
Cc: Alex Williamson <[email protected]>
Cc: Cornelia Huck <[email protected]>
Cc: [email protected]
Cc: [email protected]

---
 drivers/vfio/mdev/mdev_sysfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/vfio/mdev/mdev_sysfs.c +1 -1
index 7570c7602ab4..8ad14e5c02bf 100644
@@ -74,7 +74,7 @@ static ssize_t create_store(struct kobject *kobj, struct device *dev,
 	return count;
 }
 
-MDEV_TYPE_ATTR_WO(create);
+static MDEV_TYPE_ATTR_WO(create);
 
 static void mdev_type_release(struct kobject *kobj)
 {
Signature · 1 line
2.24.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 21 lines · On Wed, 18 Dec 2019 12:31:19 +0000 "Ben Dooks (Codethink)"…

The create attribute is not exported, so make it
static to avoid the following sparse warning:

drivers/vfio/mdev/mdev_sysfs.c:77:1: warning: symbol 'mdev_type_attr_create' was not declared. Should it be static?

---
Cc: Kirti Wankhede <[email protected]>
Cc: Alex Williamson <[email protected]>
Cc: Cornelia Huck <[email protected]>
Cc: [email protected]
Cc: [email protected]

---
 drivers/vfio/mdev/mdev_sysfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/vfio/mdev/mdev_sysfs.c +0 -0
index 7570c7602ab4..8ad14e5c02bf 100644

drivers/vfio/mdev/mdev_sysfs.c static ssize_t create_store(struct kobject *kobj, struct device *dev, · line 80

Quoted 8 lines
drivers/vfio/mdev/mdev_sysfs.c +1 -1
@@ -74,7 +74,7 @@ static ssize_t create_store(struct kobject *kobj, struct device *dev,
 	return count;
 }
 
-MDEV_TYPE_ATTR_WO(create);
+static MDEV_TYPE_ATTR_WO(create);
 
 static void mdev_type_release(struct kobject *kobj)
 {
#2 lore raw
In reply to Ben Dooks (Codethink)
Quoted 21 lines · On Wed, 18 Dec 2019 12:31:19 +0000 "Ben Dooks (Codethink)"…

The create attribute is not exported, so make it
static to avoid the following sparse warning:

drivers/vfio/mdev/mdev_sysfs.c:77:1: warning: symbol 'mdev_type_attr_create' was not declared. Should it be static?

---
Cc: Kirti Wankhede <[email protected]>
Cc: Alex Williamson <[email protected]>
Cc: Cornelia Huck <[email protected]>
Cc: [email protected]
Cc: [email protected]

---
 drivers/vfio/mdev/mdev_sysfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/vfio/mdev/mdev_sysfs.c +0 -0
index 7570c7602ab4..8ad14e5c02bf 100644

drivers/vfio/mdev/mdev_sysfs.c static ssize_t create_store(struct kobject *kobj, struct device *dev, · line 80

Quoted 8 lines
drivers/vfio/mdev/mdev_sysfs.c +1 -1
@@ -74,7 +74,7 @@ static ssize_t create_store(struct kobject *kobj, struct device *dev,
 	return count;
 }
 
-MDEV_TYPE_ATTR_WO(create);
+static MDEV_TYPE_ATTR_WO(create);
 
 static void mdev_type_release(struct kobject *kobj)
 {

Applied to vfio next branch for v5.6 with Connie's R-b. Thanks,

Alex