Skip to contentSkip to conversation

clk: mediatek: fhctl: set varaiables fhctl_offset_v1,2 storage-class-specifier to static

PATCH Applied Tom Rix 2 participants 2 messages Apr 6, 2023 – Apr 10, 2023

Subsystems (2)
lore
Share & tools
lore

Tom Rix

author
#0 lore raw

PATCH 1/1 clk: mediatek: fhctl: set varaiables fhctl_offset_v1,2 storage-class-specifier to static

smatch reports drivers/clk/mediatek/clk-fhctl.c:17:27: warning: symbol
'fhctl_offset_v1' was not declared. Should it be static?
drivers/clk/mediatek/clk-fhctl.c:30:27: warning: symbol
'fhctl_offset_v2' was not declared. Should it be static?

These variables are only used in one file so should be static.

---
 drivers/clk/mediatek/clk-fhctl.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/clk/mediatek/clk-fhctl.c +2 -2
index 45e4842cbf04..33b6ad8fdc2e 100644
@@ -14,7 +14,7 @@
 #define PERCENT_TO_DDSLMT(dds, percent_m10) \
 	((((dds) * (percent_m10)) >> 5) / 100)
 
-const struct fhctl_offset fhctl_offset_v1 = {
+static const struct fhctl_offset fhctl_offset_v1 = {
 	.offset_hp_en = 0x0,
 	.offset_clk_con = 0x4,
 	.offset_rst_con = 0x8,
@@ -27,7 +27,7 @@ const struct fhctl_offset fhctl_offset_v1 = {
 	.offset_mon = 0x10,
 };
 
-const struct fhctl_offset fhctl_offset_v2 = {
+static const struct fhctl_offset fhctl_offset_v2 = {
 	.offset_hp_en = 0x0,
 	.offset_clk_con = 0x8,
 	.offset_rst_con = 0xc,
Signature · 1 line
2.27.0
maintainer Applied
#1 lore raw

Quoting Tom Rix (2023-04-05 18:09:35)

Quoted 10 lines

smatch reports drivers/clk/mediatek/clk-fhctl.c:17:27: warning: symbol
'fhctl_offset_v1' was not declared. Should it be static?
drivers/clk/mediatek/clk-fhctl.c:30:27: warning: symbol
'fhctl_offset_v2' was not declared. Should it be static?

These variables are only used in one file so should be static.

---

Applied to clk-next