Skip to contentSkip to conversation

i3c: make 'i3c_bus_set_mode' static

PATCH In review Ben Dooks (Codethink) 2 participants 2 messages Dec 17, 2019 – Dec 18, 2019 I3C

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 i3c: make 'i3c_bus_set_mode' static

The function i3c_bus_set_mode() is not declared or exported, so make it static to avoid the following warning:

drivers/i3c/master.c:530:5: warning: symbol 'i3c_bus_set_mode' was not declared. Should it be static?

If it is needed in the future, then it should be declared and suitably exported.

---
Cc: Boris Brezillon <[email protected]>
Cc: [email protected]
Cc: [email protected]

---
 drivers/i3c/master.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/i3c/master.c +2 -2
index 043691656245..7f8f896fa0c3 100644
@@ -527,8 +527,8 @@ static const struct device_type i3c_masterdev_type = {
 	.groups	= i3c_masterdev_groups,
 };
 
-int i3c_bus_set_mode(struct i3c_bus *i3cbus, enum i3c_bus_mode mode,
-		     unsigned long max_i2c_scl_rate)
+static int i3c_bus_set_mode(struct i3c_bus *i3cbus, enum i3c_bus_mode mode,
+			    unsigned long max_i2c_scl_rate)
 {
 	struct i3c_master_controller *master = i3c_bus_to_i3c_master(i3cbus);
 
Signature · 1 line
2.24.0
#1 lore raw

Hello Ben,

Quoted 10 lines · On Tue, 17 Dec 2019 12:01:50 +0000 "Ben Dooks (Codethink)"…

The function i3c_bus_set_mode() is not declared or exported, so make it static to avoid the following warning:

drivers/i3c/master.c:530:5: warning: symbol 'i3c_bus_set_mode' was not declared. Should it be static?

If it is needed in the future, then it should be declared and suitably exported.

Thanks for this patch, but I already a similar fix [1].

Regards,

Boris

[1]https://git.kernel.org/pub/scm/linux/kernel/git/i3c/linux.git/commit/?h=i3c/next&id=026d8450d499904f4712676e2149cdb758d0a601

Quoted 23 lines

---
Cc: Boris Brezillon <[email protected]>
Cc: [email protected]
Cc: [email protected]

---
 drivers/i3c/master.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/i3c/master.c +2 -2
index 043691656245..7f8f896fa0c3 100644
@@ -527,8 +527,8 @@ static const struct device_type i3c_masterdev_type = {
 	.groups	= i3c_masterdev_groups,
 };
 
-int i3c_bus_set_mode(struct i3c_bus *i3cbus, enum i3c_bus_mode mode,
-		     unsigned long max_i2c_scl_rate)
+static int i3c_bus_set_mode(struct i3c_bus *i3cbus, enum i3c_bus_mode mode,
+			    unsigned long max_i2c_scl_rate)
 {
 	struct i3c_master_controller *master = i3c_bus_to_i3c_master(i3cbus);