Skip to content

Commit

Permalink
ASoC: dwc: Fix -Wmissing-prototypes warnings
Browse files Browse the repository at this point in the history
while CONFIG_SND_DESIGNWARE_PCM is not set, building with W=1 shows this:

sound/soc/dwc/local.h:127:6: warning: no previous prototype for ‘dw_pcm_push_tx’ [-Wmissing-prototypes]
 void dw_pcm_push_tx(struct dw_i2s_dev *dev) { }
      ^~~~~~~~~~~~~~
sound/soc/dwc/local.h:128:6: warning: no previous prototype for ‘dw_pcm_pop_rx’ [-Wmissing-prototypes]
 void dw_pcm_pop_rx(struct dw_i2s_dev *dev) { }
      ^~~~~~~~~~~~~
sound/soc/dwc/local.h:129:5: warning: no previous prototype for ‘dw_pcm_register’ [-Wmissing-prototypes]
 int dw_pcm_register(struct platform_device *pdev)
     ^~~~~~~~~~~~~~~

Change these to inline functions to fix the warnings.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Link: https://lore.kernel.org/r/20210329150524.18184-1-yuehaibing@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
YueHaibing authored and Mark Brown committed Mar 29, 2021
1 parent e49bcf4 commit 0803a5c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sound/soc/dwc/local.h
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,9 @@ void dw_pcm_push_tx(struct dw_i2s_dev *dev);
void dw_pcm_pop_rx(struct dw_i2s_dev *dev);
int dw_pcm_register(struct platform_device *pdev);
#else
void dw_pcm_push_tx(struct dw_i2s_dev *dev) { }
void dw_pcm_pop_rx(struct dw_i2s_dev *dev) { }
int dw_pcm_register(struct platform_device *pdev)
static inline void dw_pcm_push_tx(struct dw_i2s_dev *dev) { }
static inline void dw_pcm_pop_rx(struct dw_i2s_dev *dev) { }
static inline int dw_pcm_register(struct platform_device *pdev)
{
return -EINVAL;
}
Expand Down

0 comments on commit 0803a5c

Please sign in to comment.