Skip to contentSkip to conversation

bus: moxtet: declare moxtet_bus_type

PATCH In review Ben Dooks 2 participants 4 messages Oct 15, 2019 – Oct 16, 2019 Arm/cz.nic turris support

lore
Share & tools
lore

Ben Dooks

author
#0 lore raw

PATCH 1/1 bus: moxtet: declare moxtet_bus_type

The moxtet_bus_type object is exported from the bus driver, but not declared. Add a declaration for use and to silence the following warning:

drivers/bus/moxtet.c:105:17: warning: symbol 'moxtet_bus_type' was not declared. Should it be static?

---
Cc: Marek Behun <[email protected]>
Cc: [email protected]

---
 include/linux/moxtet.h | 2 ++
 1 file changed, 2 insertions(+)
include/linux/moxtet.h +2 -0
index 490db6886dcc..b76231cb60e4 100644
@@ -94,6 +94,8 @@ struct moxtet_device {
 	unsigned int			idx;
 };
 
+extern struct bus_type moxtet_bus_type;
+
 extern int moxtet_device_read(struct device *dev);
 extern int moxtet_device_write(struct device *dev, u8 val);
 extern int moxtet_device_written(struct device *dev);
Signature · 1 line
2.23.0
#1 lore raw
Quoted 3 lines · Ben Dooks

The moxtet_bus_type object is exported from the bus driver, but not declared. Add a declaration for use and to silence the following warning:

The symbol can be marked static instead.

author
#2 lore raw
Quoted 6 lines · Christoph Hellwig
Quoted 3 lines · Ben Dooks

The moxtet_bus_type object is exported from the bus driver, but not declared. Add a declaration for use and to silence the following warning:

The symbol can be marked static instead.

Then it would have to be un-exported as it's listed as EXPORT_SYMBOL_GPL(moxtet_bus_type);

Signature · 4 lines
Ben Dooks				http://www.codethink.co.uk/
Senior Engineer				Codethink - Providing Genius

https://www.codethink.co.uk/privacy.html
#3 lore raw
Quoted 10 lines · Ben Dooks
Quoted 6 lines · Christoph Hellwig
Quoted 3 lines · Ben Dooks

The moxtet_bus_type object is exported from the bus driver, but not declared. Add a declaration for use and to silence the following warning:

The symbol can be marked static instead.

Then it would have to be un-exported as it's listed as EXPORT_SYMBOL_GPL(moxtet_bus_type);

Yes, once you mark it static you should also remove the export.