Skip to contentSkip to conversation

rtc: wilco_ec: Make some functions static

PATCH In review Wei Yongjun 3 participants 3 messages Feb 16, 2019 – Feb 18, 2019

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

PATCH 1/1 rtc: wilco_ec: Make some functions static

Fixes the following sparse warnings:

drivers/rtc/rtc-wilco-ec.c:72:5: warning:
symbol 'wilco_ec_rtc_read' was not declared. Should it be static?
drivers/rtc/rtc-wilco-ec.c:106:5: warning:
symbol 'wilco_ec_rtc_write' was not declared. Should it be static?

Fixes 79c4ec4869b5 ("platform/chrome: wilco_ec: Add RTC driver")
---
 drivers/rtc/rtc-wilco-ec.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/rtc/rtc-wilco-ec.c +2 -2
index 35cc56114c1c..e62bda0cb53e 100644
@@ -69,7 +69,7 @@ struct ec_rtc_write {
 	u8 weekday;
 } __packed;
 
-int wilco_ec_rtc_read(struct device *dev, struct rtc_time *tm)
+static int wilco_ec_rtc_read(struct device *dev, struct rtc_time *tm)
 {
 	struct wilco_ec_device *ec = dev_get_drvdata(dev->parent);
 	u8 param = EC_CMOS_TOD_READ;
@@ -103,7 +103,7 @@ int wilco_ec_rtc_read(struct device *dev, struct rtc_time *tm)
 	return 0;
 }
 
-int wilco_ec_rtc_write(struct device *dev, struct rtc_time *tm)
+static int wilco_ec_rtc_write(struct device *dev, struct rtc_time *tm)
 {
 	struct wilco_ec_device *ec = dev_get_drvdata(dev->parent);
 	struct ec_rtc_write rtc;
#1 lore raw

Enric,

You should take that one or squash it with the original commit.

Quoted 38 lines · Wei Yongjun

Fixes the following sparse warnings:

drivers/rtc/rtc-wilco-ec.c:72:5: warning:
symbol 'wilco_ec_rtc_read' was not declared. Should it be static?
drivers/rtc/rtc-wilco-ec.c:106:5: warning:
symbol 'wilco_ec_rtc_write' was not declared. Should it be static?

Fixes 79c4ec4869b5 ("platform/chrome: wilco_ec: Add RTC driver")
---
 drivers/rtc/rtc-wilco-ec.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/rtc/rtc-wilco-ec.c +2 -2
index 35cc56114c1c..e62bda0cb53e 100644
@@ -69,7 +69,7 @@ struct ec_rtc_write {
 	u8 weekday;
 } __packed;
 
-int wilco_ec_rtc_read(struct device *dev, struct rtc_time *tm)
+static int wilco_ec_rtc_read(struct device *dev, struct rtc_time *tm)
 {
 	struct wilco_ec_device *ec = dev_get_drvdata(dev->parent);
 	u8 param = EC_CMOS_TOD_READ;
@@ -103,7 +103,7 @@ int wilco_ec_rtc_read(struct device *dev, struct rtc_time *tm)
 	return 0;
 }
 
-int wilco_ec_rtc_write(struct device *dev, struct rtc_time *tm)
+static int wilco_ec_rtc_write(struct device *dev, struct rtc_time *tm)
 {
 	struct wilco_ec_device *ec = dev_get_drvdata(dev->parent);
 	struct ec_rtc_write rtc;
Signature · 3 lines
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#2 lore raw

Missatge de Alexandre Belloni <[email protected]> del dia dl., 18 de febr. 2019 a les 15:48:

Quoted 5 lines

Enric,

You should take that one or squash it with the original commit.

Ok, thanks. If Wei doesn't mind I'd like to squash as this is still for-next.

Quoted 44 lines · Wei Yongjun
Quoted 30 lines

Fixes the following sparse warnings:

drivers/rtc/rtc-wilco-ec.c:72:5: warning:
symbol 'wilco_ec_rtc_read' was not declared. Should it be static?
drivers/rtc/rtc-wilco-ec.c:106:5: warning:
symbol 'wilco_ec_rtc_write' was not declared. Should it be static?

Fixes 79c4ec4869b5 ("platform/chrome: wilco_ec: Add RTC driver")
---
 drivers/rtc/rtc-wilco-ec.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/rtc/rtc-wilco-ec.c +1 -1
index 35cc56114c1c..e62bda0cb53e 100644
@@ -69,7 +69,7 @@ struct ec_rtc_write {
      u8 weekday;
 } __packed;
 
-int wilco_ec_rtc_read(struct device *dev, struct rtc_time *tm)
+static int wilco_ec_rtc_read(struct device *dev, struct rtc_time *tm)
 {
      struct wilco_ec_device *ec = dev_get_drvdata(dev->parent);
      u8 param = EC_CMOS_TOD_READ;

drivers/rtc/rtc-wilco-ec.c int wilco_ec_rtc_read(struct device *dev, struct rtc_time *tm) · line 109

Quoted 8 lines
drivers/rtc/rtc-wilco-ec.c +1 -1
@@ -103,7 +103,7 @@ int wilco_ec_rtc_read(struct device *dev, struct rtc_time *tm)
      return 0;
 }
 
-int wilco_ec_rtc_write(struct device *dev, struct rtc_time *tm)
+static int wilco_ec_rtc_write(struct device *dev, struct rtc_time *tm)
 {
      struct wilco_ec_device *ec = dev_get_drvdata(dev->parent);
      struct ec_rtc_write rtc;

--
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com