Skip to content

Commit

Permalink
ASoC: mediatek: mark symbols static where possible
Browse files Browse the repository at this point in the history
We get 2 warnings about global functions without a declaration
in the ASoC mediatek module when building with W=1:

sound/soc/mediatek/common/mtk-afe-fe-dai.c:26:5: warning: no previous prototype for 'mtk_regmap_update_bits' [-Wmissing-prototypes]
 int mtk_regmap_update_bits(struct regmap *map, int reg, unsigned int mask,
         ^
sound/soc/mediatek/common/mtk-afe-fe-dai.c:34:5: warning: no previous prototype for 'mtk_regmap_write' [-Wmissing-prototypes]
 int mtk_regmap_write(struct regmap *map, int reg, unsigned int val)

In fact, all of those functions are only used in the file in which
they are declared and don't need a declaration, but can be made static.

so this patch marks it 'static'.

Signed-off-by: Baoyou Xie <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
  • Loading branch information
Baoyou Xie authored and broonie committed Aug 11, 2016
1 parent 29b4817 commit 22e7661
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions sound/soc/mediatek/common/mtk-afe-fe-dai.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,16 @@

#define AFE_BASE_END_OFFSET 8

int mtk_regmap_update_bits(struct regmap *map, int reg, unsigned int mask,
static int mtk_regmap_update_bits(struct regmap *map, int reg,
unsigned int mask,
unsigned int val)
{
if (reg < 0)
return 0;
return regmap_update_bits(map, reg, mask, val);
}

int mtk_regmap_write(struct regmap *map, int reg, unsigned int val)
static int mtk_regmap_write(struct regmap *map, int reg, unsigned int val)
{
if (reg < 0)
return 0;
Expand Down

0 comments on commit 22e7661

Please sign in to comment.