Skip to content

Commit

Permalink
clk: mediatek: fhctl: Mark local variables static
Browse files Browse the repository at this point in the history
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.

Signed-off-by: Tom Rix <trix@redhat.com>
Link: https://lore.kernel.org/r/20230406010935.1944976-1-trix@redhat.com
Fixes: 8da312d ("clk: mediatek: fhctl: Add support for older fhctl register layout")
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
  • Loading branch information
Tom Rix authored and Stephen Boyd committed Apr 10, 2023
1 parent e0e3aca commit cb9eee5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/clk/mediatek/clk-fhctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down

0 comments on commit cb9eee5

Please sign in to comment.