Skip to contentSkip to conversation

platform/chrome: cros-ec: make init_lock static

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

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

PATCH 1/1 platform/chrome: cros-ec: make init_lock static

The init_lock is not declared or used outside of cros_ec_ishtp.c so make it static to avoid the following warning:

drivers/platform/chrome/cros_ec_ishtp.c:79:1: warning: symbol 'init_lock' was not declared. Should it be static?

---
Cc: Benson Leung <[email protected]>
Cc: Enric Balletbo i Serra <[email protected]>
Cc: Guenter Roeck <[email protected]>
Cc: [email protected]

---
 drivers/platform/chrome/cros_ec_ishtp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/platform/chrome/cros_ec_ishtp.c +1 -1
index e5996821d08b..5f8e76f3022a 100644
@@ -76,7 +76,7 @@ struct cros_ish_in_msg {
  *
  * The writers are .reset() and .probe() function.
  */
-DECLARE_RWSEM(init_lock);
+static DECLARE_RWSEM(init_lock);
 
 /**
  * struct response_info - Encapsulate firmware response related
Signature · 1 line
2.24.0
#1 lore raw

Hi Ben,

Thanks for the patch.

Quoted 6 lines · Ben Dooks (Codethink)

The init_lock is not declared or used outside of cros_ec_ishtp.c so make it static to avoid the following warning:

drivers/platform/chrome/cros_ec_ishtp.c:79:1: warning: symbol 'init_lock' was not declared. Should it be static?

Applied for 5.6

Quoted 23 lines

---
Cc: Benson Leung <[email protected]>
Cc: Enric Balletbo i Serra <[email protected]>
Cc: Guenter Roeck <[email protected]>
Cc: [email protected]

---
 drivers/platform/chrome/cros_ec_ishtp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/platform/chrome/cros_ec_ishtp.c +1 -1
index e5996821d08b..5f8e76f3022a 100644
@@ -76,7 +76,7 @@ struct cros_ish_in_msg {
  *
  * The writers are .reset() and .probe() function.
  */
-DECLARE_RWSEM(init_lock);
+static DECLARE_RWSEM(init_lock);
 
 /**
  * struct response_info - Encapsulate firmware response related