[alsa-devel] [PATCH 0/5] ALSA: soc: fix sparse warnings
Hi,
This patchset is to fix some sparse warnings in ALSA SoC part. Below items are going to be fixed: * fix a condition statement with a logical operation * purge old way to initialize array * missing 'static' qualifier for file local symbols
Although I got many warnings from Intel SST drivers due to confusions of address spaces (__iomem and __kernel), I still left them as they are, because they require more codes to fix. I hope Intel developers will do additional work for them...
Takashi Sakamoto (5): ALSA: soc-da7219: fix inappropriate condition statement ALSA: soc-sst-bxt-rt298: fix obsoleted initializers for array ALSA: soc-sst-bxt-da7219_max98357a: fix obsoleted initializers for array ALSA: soc-rt5616: add static qualifier for file local symbols ALSA: soc-tpa6130a2: add static qualifier for file local symbols
sound/soc/codecs/da7219.c | 2 +- sound/soc/codecs/rt5616.c | 4 ++-- sound/soc/codecs/tpa6130a2.c | 2 +- sound/soc/intel/boards/bxt_da7219_max98357a.c | 12 ++++++------ sound/soc/intel/boards/bxt_rt298.c | 14 +++++++------- 5 files changed, 17 insertions(+), 17 deletions(-)
Sparse reports a below warning.
sound/soc/codecs/da7219.c:804:57: warning: dubious: x & !y
The line includes a condition statement; '(a < b) & !c'. Practically, the evaluated value of this statement equals to the value of '(a < b) && !c'. Although, it's not an usual way to use bitwise operations as logical operations to several conditions.
This commit fixes the bug.
Fixes: 6d817c0e9fd7 ("ASoC: codecs: Add da7219 codec driver") CC: Adam Thomson Adam.Thomson.Opensource@diasemi.com Signed-off-by: Takashi Sakamoto o-takashi@sakamocchi.jp --- sound/soc/codecs/da7219.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/codecs/da7219.c b/sound/soc/codecs/da7219.c index 50ea943..b9fa8fe 100644 --- a/sound/soc/codecs/da7219.c +++ b/sound/soc/codecs/da7219.c @@ -801,7 +801,7 @@ static int da7219_dai_event(struct snd_soc_dapm_widget *w, ++i; msleep(50); } - } while ((i < DA7219_SRM_CHECK_RETRIES) & (!srm_lock)); + } while ((i < DA7219_SRM_CHECK_RETRIES) && (!srm_lock));
if (!srm_lock) dev_warn(codec->dev, "SRM failed to lock\n");
On 26 July 2016 14:42, Takashi Sakamoto wrote:
Sparse reports a below warning.
sound/soc/codecs/da7219.c:804:57: warning: dubious: x & !y
The line includes a condition statement; '(a < b) & !c'. Practically, the evaluated value of this statement equals to the value of '(a < b) && !c'. Although, it's not an usual way to use bitwise operations as logical operations to several conditions.
This commit fixes the bug.
Fixes: 6d817c0e9fd7 ("ASoC: codecs: Add da7219 codec driver") CC: Adam Thomson Adam.Thomson.Opensource@diasemi.com Signed-off-by: Takashi Sakamoto o-takashi@sakamocchi.jp
sound/soc/codecs/da7219.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/codecs/da7219.c b/sound/soc/codecs/da7219.c index 50ea943..b9fa8fe 100644 --- a/sound/soc/codecs/da7219.c +++ b/sound/soc/codecs/da7219.c @@ -801,7 +801,7 @@ static int da7219_dai_event(struct snd_soc_dapm_widget *w, ++i; msleep(50); }
} while ((i < DA7219_SRM_CHECK_RETRIES) & (!srm_lock));
} while ((i < DA7219_SRM_CHECK_RETRIES) && (!srm_lock));
if (!srm_lock) dev_warn(codec->dev, "SRM failed to lock\n");
-- 2.7.4
Acked-by: Adam Thomson Adam.Thomson.Opensource@diasemi.com
The patch
ASoC: da7219: fix inappropriate condition statement
has been applied to the asoc tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks, Mark
From a56a569818ea831ed2325dc5d1122dc0b8a229d0 Mon Sep 17 00:00:00 2001
From: Takashi Sakamoto o-takashi@sakamocchi.jp Date: Tue, 27 Sep 2016 07:45:07 +0900 Subject: [PATCH] ASoC: da7219: fix inappropriate condition statement
Sparse reports a below warning.
sound/soc/codecs/da7219.c:804:57: warning: dubious: x & !y
The line includes a condition statement; '(a < b) & !c'. Practically, the evaluated value of this statement equals to the value of '(a < b) && !c'. Although, it's not an usual way to use bitwise operations as logical operations to several conditions.
This commit fixes the bug.
Signed-off-by: Takashi Sakamoto o-takashi@sakamocchi.jp Acked-by: Adam Thomson Adam.Thomson.Opensource@diasemi.com Signed-off-by: Mark Brown broonie@kernel.org --- sound/soc/codecs/da7219.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/codecs/da7219.c b/sound/soc/codecs/da7219.c index 65f7e9807659..32007625913d 100644 --- a/sound/soc/codecs/da7219.c +++ b/sound/soc/codecs/da7219.c @@ -801,7 +801,7 @@ static int da7219_dai_event(struct snd_soc_dapm_widget *w, ++i; msleep(50); } - } while ((i < DA7219_SRM_CHECK_RETRIES) & (!srm_lock)); + } while ((i < DA7219_SRM_CHECK_RETRIES) && (!srm_lock));
if (!srm_lock) dev_warn(codec->dev, "SRM failed to lock\n");
Sparse reports below warnings.
bxt_rt298.c:275:9: warning: obsolete array initializer, use C99 syntax bxt_rt298.c:290:9: warning: obsolete array initializer, use C99 syntax bxt_rt298.c:304:9: warning: obsolete array initializer, use C99 syntax bxt_rt298.c:317:9: warning: obsolete array initializer, use C99 syntax bxt_rt298.c:331:9: warning: obsolete array initializer, use C99 syntax bxt_rt298.c:344:9: warning: obsolete array initializer, use C99 syntax bxt_rt298.c:357:9: warning: obsolete array initializer, use C99 syntax
There's no need to use obsoleted way. This commit fixes it.
Fixed: 76016322ec56 ('ASoC: Intel: Add Broxton-P machine driver') CC: Ramesh Babu ramesh.babu@intel.com Signed-off-by: Takashi Sakamoto o-takashi@sakamocchi.jp --- sound/soc/intel/boards/bxt_rt298.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/sound/soc/intel/boards/bxt_rt298.c b/sound/soc/intel/boards/bxt_rt298.c index 253d7bf..d610bdc 100644 --- a/sound/soc/intel/boards/bxt_rt298.c +++ b/sound/soc/intel/boards/bxt_rt298.c @@ -271,7 +271,7 @@ static const struct snd_soc_ops broxton_rt286_fe_ops = { /* broxton digital audio interface glue - connects codec <--> CPU */ static struct snd_soc_dai_link broxton_rt298_dais[] = { /* Front End DAI links */ - [BXT_DPCM_AUDIO_PB] + [BXT_DPCM_AUDIO_PB] = { .name = "Bxt Audio Port", .stream_name = "Audio", @@ -286,7 +286,7 @@ static struct snd_soc_dai_link broxton_rt298_dais[] = { .dpcm_playback = 1, .ops = &broxton_rt286_fe_ops, }, - [BXT_DPCM_AUDIO_CP] + [BXT_DPCM_AUDIO_CP] = { .name = "Bxt Audio Capture Port", .stream_name = "Audio Record", @@ -300,7 +300,7 @@ static struct snd_soc_dai_link broxton_rt298_dais[] = { .dpcm_capture = 1, .ops = &broxton_rt286_fe_ops, }, - [BXT_DPCM_AUDIO_REF_CP] + [BXT_DPCM_AUDIO_REF_CP] = { .name = "Bxt Audio Reference cap", .stream_name = "refcap", @@ -313,7 +313,7 @@ static struct snd_soc_dai_link broxton_rt298_dais[] = { .nonatomic = 1, .dynamic = 1, }, - [BXT_DPCM_AUDIO_DMIC_CP] + [BXT_DPCM_AUDIO_DMIC_CP] = { .name = "Bxt Audio DMIC cap", .stream_name = "dmiccap", @@ -327,7 +327,7 @@ static struct snd_soc_dai_link broxton_rt298_dais[] = { .dynamic = 1, .ops = &broxton_dmic_ops, }, - [BXT_DPCM_AUDIO_HDMI1_PB] + [BXT_DPCM_AUDIO_HDMI1_PB] = { .name = "Bxt HDMI Port1", .stream_name = "Hdmi1", @@ -340,7 +340,7 @@ static struct snd_soc_dai_link broxton_rt298_dais[] = { .nonatomic = 1, .dynamic = 1, }, - [BXT_DPCM_AUDIO_HDMI2_PB] + [BXT_DPCM_AUDIO_HDMI2_PB] = { .name = "Bxt HDMI Port2", .stream_name = "Hdmi2", @@ -353,7 +353,7 @@ static struct snd_soc_dai_link broxton_rt298_dais[] = { .nonatomic = 1, .dynamic = 1, }, - [BXT_DPCM_AUDIO_HDMI3_PB] + [BXT_DPCM_AUDIO_HDMI3_PB] = { .name = "Bxt HDMI Port3", .stream_name = "Hdmi3",
On Tue, Jul 26, 2016 at 10:41:54PM +0900, Takashi Sakamoto wrote:
Sparse reports below warnings.
bxt_rt298.c:275:9: warning: obsolete array initializer, use C99 syntax bxt_rt298.c:290:9: warning: obsolete array initializer, use C99 syntax bxt_rt298.c:304:9: warning: obsolete array initializer, use C99 syntax bxt_rt298.c:317:9: warning: obsolete array initializer, use C99 syntax bxt_rt298.c:331:9: warning: obsolete array initializer, use C99 syntax bxt_rt298.c:344:9: warning: obsolete array initializer, use C99 syntax bxt_rt298.c:357:9: warning: obsolete array initializer, use C99 syntax
There's no need to use obsoleted way. This commit fixes it.
Thanks for the patch
Acked-by: Vinod Koul vinod.koul@intel.com
The patch
ASoC: sst-bxt-rt298: fix obsoleted initializers for array
has been applied to the asoc tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks, Mark
From 5919a3898136aae4d2cb4b18b44f70f7b185aa47 Mon Sep 17 00:00:00 2001
From: Takashi Sakamoto o-takashi@sakamocchi.jp Date: Tue, 27 Sep 2016 07:45:08 +0900 Subject: [PATCH] ASoC: sst-bxt-rt298: fix obsoleted initializers for array
Sparse reports below warnings.
bxt_rt298.c:275:9: warning: obsolete array initializer, use C99 syntax bxt_rt298.c:290:9: warning: obsolete array initializer, use C99 syntax bxt_rt298.c:304:9: warning: obsolete array initializer, use C99 syntax bxt_rt298.c:317:9: warning: obsolete array initializer, use C99 syntax bxt_rt298.c:331:9: warning: obsolete array initializer, use C99 syntax bxt_rt298.c:344:9: warning: obsolete array initializer, use C99 syntax bxt_rt298.c:357:9: warning: obsolete array initializer, use C99 syntax
There's no need to use obsoleted way. This commit fixes it.
Fixes: 76016322ec56 (ASoC: Intel: Add Broxton-P machine driver) Signed-off-by: Takashi Sakamoto o-takashi@sakamocchi.jp Acked-by: Vinod Koul vinod.koul@intel.com Signed-off-by: Mark Brown broonie@kernel.org --- sound/soc/intel/boards/bxt_rt298.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/sound/soc/intel/boards/bxt_rt298.c b/sound/soc/intel/boards/bxt_rt298.c index 253d7bfbf511..d610bdca1608 100644 --- a/sound/soc/intel/boards/bxt_rt298.c +++ b/sound/soc/intel/boards/bxt_rt298.c @@ -271,7 +271,7 @@ static const struct snd_soc_ops broxton_rt286_fe_ops = { /* broxton digital audio interface glue - connects codec <--> CPU */ static struct snd_soc_dai_link broxton_rt298_dais[] = { /* Front End DAI links */ - [BXT_DPCM_AUDIO_PB] + [BXT_DPCM_AUDIO_PB] = { .name = "Bxt Audio Port", .stream_name = "Audio", @@ -286,7 +286,7 @@ static struct snd_soc_dai_link broxton_rt298_dais[] = { .dpcm_playback = 1, .ops = &broxton_rt286_fe_ops, }, - [BXT_DPCM_AUDIO_CP] + [BXT_DPCM_AUDIO_CP] = { .name = "Bxt Audio Capture Port", .stream_name = "Audio Record", @@ -300,7 +300,7 @@ static struct snd_soc_dai_link broxton_rt298_dais[] = { .dpcm_capture = 1, .ops = &broxton_rt286_fe_ops, }, - [BXT_DPCM_AUDIO_REF_CP] + [BXT_DPCM_AUDIO_REF_CP] = { .name = "Bxt Audio Reference cap", .stream_name = "refcap", @@ -313,7 +313,7 @@ static struct snd_soc_dai_link broxton_rt298_dais[] = { .nonatomic = 1, .dynamic = 1, }, - [BXT_DPCM_AUDIO_DMIC_CP] + [BXT_DPCM_AUDIO_DMIC_CP] = { .name = "Bxt Audio DMIC cap", .stream_name = "dmiccap", @@ -327,7 +327,7 @@ static struct snd_soc_dai_link broxton_rt298_dais[] = { .dynamic = 1, .ops = &broxton_dmic_ops, }, - [BXT_DPCM_AUDIO_HDMI1_PB] + [BXT_DPCM_AUDIO_HDMI1_PB] = { .name = "Bxt HDMI Port1", .stream_name = "Hdmi1", @@ -340,7 +340,7 @@ static struct snd_soc_dai_link broxton_rt298_dais[] = { .nonatomic = 1, .dynamic = 1, }, - [BXT_DPCM_AUDIO_HDMI2_PB] + [BXT_DPCM_AUDIO_HDMI2_PB] = { .name = "Bxt HDMI Port2", .stream_name = "Hdmi2", @@ -353,7 +353,7 @@ static struct snd_soc_dai_link broxton_rt298_dais[] = { .nonatomic = 1, .dynamic = 1, }, - [BXT_DPCM_AUDIO_HDMI3_PB] + [BXT_DPCM_AUDIO_HDMI3_PB] = { .name = "Bxt HDMI Port3", .stream_name = "Hdmi3",
Sparse reports below warnings.
bxt_da7219_max98357a.c:250:9: warning: obsolete array initializer, use C99 syntax bxt_da7219_max98357a.c:275:9: warning: obsolete array initializer, use C99 syntax bxt_da7219_max98357a.c:290:9: warning: obsolete array initializer, use C99 syntax bxt_da7219_max98357a.c:304:9: warning: obsolete array initializer, use C99 syntax bxt_da7219_max98357a.c:317:9: warning: obsolete array initializer, use C99 syntax
There's no need to use obsoleted way. This commit fixes it.
Fixes: 723bad3fef8b ('ASoC: Intel: Add Broxton-P Dialog Maxim machine driver') CC: Sathyanarayana Nujella sathyanarayana.nujella@intel.com Signed-off-by: Takashi Sakamoto o-takashi@sakamocchi.jp --- sound/soc/intel/boards/bxt_da7219_max98357a.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/sound/soc/intel/boards/bxt_da7219_max98357a.c b/sound/soc/intel/boards/bxt_da7219_max98357a.c index 3774b11..49b65d4 100644 --- a/sound/soc/intel/boards/bxt_da7219_max98357a.c +++ b/sound/soc/intel/boards/bxt_da7219_max98357a.c @@ -255,7 +255,7 @@ static struct snd_soc_ops broxton_da7219_ops = { /* broxton digital audio interface glue - connects codec <--> CPU */ static struct snd_soc_dai_link broxton_dais[] = { /* Front End DAI links */ - [BXT_DPCM_AUDIO_PB] + [BXT_DPCM_AUDIO_PB] = { .name = "Bxt Audio Port", .stream_name = "Audio", @@ -271,7 +271,7 @@ static struct snd_soc_dai_link broxton_dais[] = { .dpcm_playback = 1, .ops = &broxton_da7219_fe_ops, }, - [BXT_DPCM_AUDIO_CP] + [BXT_DPCM_AUDIO_CP] = { .name = "Bxt Audio Capture Port", .stream_name = "Audio Record", @@ -286,7 +286,7 @@ static struct snd_soc_dai_link broxton_dais[] = { .dpcm_capture = 1, .ops = &broxton_da7219_fe_ops, }, - [BXT_DPCM_AUDIO_REF_CP] + [BXT_DPCM_AUDIO_REF_CP] = { .name = "Bxt Audio Reference cap", .stream_name = "Refcap", @@ -300,7 +300,7 @@ static struct snd_soc_dai_link broxton_dais[] = { .nonatomic = 1, .dynamic = 1, }, - [BXT_DPCM_AUDIO_HDMI1_PB] + [BXT_DPCM_AUDIO_HDMI1_PB] = { .name = "Bxt HDMI Port1", .stream_name = "Hdmi1", @@ -313,7 +313,7 @@ static struct snd_soc_dai_link broxton_dais[] = { .nonatomic = 1, .dynamic = 1, }, - [BXT_DPCM_AUDIO_HDMI2_PB] + [BXT_DPCM_AUDIO_HDMI2_PB] = { .name = "Bxt HDMI Port2", .stream_name = "Hdmi2", @@ -326,7 +326,7 @@ static struct snd_soc_dai_link broxton_dais[] = { .nonatomic = 1, .dynamic = 1, }, - [BXT_DPCM_AUDIO_HDMI3_PB] + [BXT_DPCM_AUDIO_HDMI3_PB] = { .name = "Bxt HDMI Port3", .stream_name = "Hdmi3",
On Tue, Jul 26, 2016 at 10:41:55PM +0900, Takashi Sakamoto wrote:
Sparse reports below warnings.
bxt_da7219_max98357a.c:250:9: warning: obsolete array initializer, use C99 syntax bxt_da7219_max98357a.c:275:9: warning: obsolete array initializer, use C99 syntax bxt_da7219_max98357a.c:290:9: warning: obsolete array initializer, use C99 syntax bxt_da7219_max98357a.c:304:9: warning: obsolete array initializer, use C99 syntax bxt_da7219_max98357a.c:317:9: warning: obsolete array initializer, use C99 syntax
There's no need to use obsoleted way. This commit fixes it.
Thanks for the patch
Acked-by: Vinod Koul vinod.koul@intel.com
Hi Vinod,
On Jul 27 2016 12:15, Vinod Koul wrote:
On Tue, Jul 26, 2016 at 10:41:55PM +0900, Takashi Sakamoto wrote:
Sparse reports below warnings.
bxt_da7219_max98357a.c:250:9: warning: obsolete array initializer, use C99 syntax bxt_da7219_max98357a.c:275:9: warning: obsolete array initializer, use C99 syntax bxt_da7219_max98357a.c:290:9: warning: obsolete array initializer, use C99 syntax bxt_da7219_max98357a.c:304:9: warning: obsolete array initializer, use C99 syntax bxt_da7219_max98357a.c:317:9: warning: obsolete array initializer, use C99 syntax
There's no need to use obsoleted way. This commit fixes it.
Thanks for the patch
Acked-by: Vinod Koul vinod.koul@intel.com
Thanks for your review.
On Jul 26 2016 22:41, Takashi Sakamoto wrote:
Although I got many warnings from Intel SST drivers due to confusions of address spaces (__iomem and __kernel), I still left them as they are, because they require more codes to fix. I hope Intel developers will do additional work for them...
For your information. I'm happy if you and Intel developers are somewhat aware of them.
$ cd sound/soc/intel atom/sst/sst_drv_interface.c:280:19: warning: cast removes address space of expression atom/sst/sst_drv_interface.c:281:17: warning: incorrect type in argument 2 (different address spaces) atom/sst/sst_drv_interface.c:281:17: expected void const volatile [noderef] asn:2*src atom/sst/sst_drv_interface.c:281:17: got void * atom/sst/sst_drv_interface.c:288:19: warning: cast removes address space of expression atom/sst/sst_drv_interface.c:288:14: warning: incorrect type in assignment (different address spaces) atom/sst/sst_drv_interface.c:288:14: expected void [noderef] asn:2*addr atom/sst/sst_drv_interface.c:288:14: got void * atom/sst/sst_drv_interface.c:375:19: warning: cast removes address space of expression atom/sst/sst_drv_interface.c:376:17: warning: incorrect type in argument 2 (different address spaces) atom/sst/sst_drv_interface.c:376:17: expected void const volatile [noderef] asn:2*src atom/sst/sst_drv_interface.c:376:17: got void * atom/sst/sst_drv_interface.c:563:19: warning: cast removes address space of expression atom/sst/sst_drv_interface.c:564:25: warning: incorrect type in argument 2 (different address spaces) atom/sst/sst_drv_interface.c:564:25: expected void const volatile [noderef] asn:2*src atom/sst/sst_drv_interface.c:564:25: got void * atom/sst/sst_loader.c:55:26: warning: incorrect type in argument 1 (different address spaces) atom/sst/sst_loader.c:55:26: expected void [noderef] asn:2*to atom/sst/sst_loader.c:55:26: got void *dst atom/sst/sst_loader.c:55:31: warning: incorrect type in argument 2 (different address spaces) atom/sst/sst_loader.c:55:31: expected void const *from atom/sst/sst_loader.c:55:31: got void const [noderef] asn:2*src atom/sst/sst_loader.c:220:43: warning: incorrect type in argument 2 (different address spaces) atom/sst/sst_loader.c:220:43: expected void *destn atom/sst/sst_loader.c:220:43: got void [noderef] asn:2* common/sst-firmware.c:272:5: warning: symbol 'sst_dma_new' was not declared. Should it be static? common/sst-firmware.c:326:6: warning: symbol 'sst_dma_free' was not declared. Should it be static? common/sst-firmware.c:973:37: warning: incorrect type in argument 1 (different address spaces) common/sst-firmware.c:973:37: expected void [noderef] asn:2*dest common/sst-firmware.c:973:37: got void *buffer common/sst-firmware.c:973:61: warning: incorrect type in argument 2 (different address spaces) common/sst-firmware.c:973:61: expected void *src common/sst-firmware.c:973:61: got void [noderef] asn:2*
Regards
Takashi Sakamoto
On Wed, Jul 27, 2016 at 12:38:35PM +0900, Takashi Sakamoto wrote:
Thanks for your review.
On Jul 26 2016 22:41, Takashi Sakamoto wrote:
Although I got many warnings from Intel SST drivers due to confusions of address spaces (__iomem and __kernel), I still left them as they are, because they require more codes to fix. I hope Intel developers will do additional work for them...
For your information. I'm happy if you and Intel developers are somewhat aware of them.
Thanks for reporting this Takashi san.
Will work on them as well
Sparse reports below warnings.
rt5616.c:1270:24: warning: symbol 'rt5616_aif_dai_ops' was not declared. Should it be static? rt5616.c:1277:27: warning: symbol 'rt5616_dai' was not declared. Should it be static?
These two symbols are just used inner the file, thus it's better to add static qualifier.
This commit adds it.
Fixes: b1d15059957d ('ASoC: rt5616: add rt5616 codec driver') CC: Bard Liao bardliao@realtek.com Signed-off-by: Takashi Sakamoto o-takashi@sakamocchi.jp --- sound/soc/codecs/rt5616.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/soc/codecs/rt5616.c b/sound/soc/codecs/rt5616.c index f527b5b..98ae326 100644 --- a/sound/soc/codecs/rt5616.c +++ b/sound/soc/codecs/rt5616.c @@ -1267,14 +1267,14 @@ static int rt5616_resume(struct snd_soc_codec *codec) #define RT5616_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE | \ SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S8)
-struct snd_soc_dai_ops rt5616_aif_dai_ops = { +static struct snd_soc_dai_ops rt5616_aif_dai_ops = { .hw_params = rt5616_hw_params, .set_fmt = rt5616_set_dai_fmt, .set_sysclk = rt5616_set_dai_sysclk, .set_pll = rt5616_set_dai_pll, };
-struct snd_soc_dai_driver rt5616_dai[] = { +static struct snd_soc_dai_driver rt5616_dai[] = { { .name = "rt5616-aif1", .id = RT5616_AIF1,
The patch
ASoC: rt5616: add static qualifier for file local symbols
has been applied to the asoc tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks, Mark
From b74e7a26311a14f61fbcd516fb475dd79ea9c4b0 Mon Sep 17 00:00:00 2001
From: Takashi Sakamoto o-takashi@sakamocchi.jp Date: Tue, 27 Sep 2016 07:45:10 +0900 Subject: [PATCH] ASoC: rt5616: add static qualifier for file local symbols
Sparse reports below warnings.
rt5616.c:1270:24: warning: symbol 'rt5616_aif_dai_ops' was not declared. Should it be static? rt5616.c:1277:27: warning: symbol 'rt5616_dai' was not declared. Should it be static?
These two symbols are just used inner the file, thus it's better to add static qualifier.
This commit adds it.
Signed-off-by: Takashi Sakamoto o-takashi@sakamocchi.jp Signed-off-by: Mark Brown broonie@kernel.org --- sound/soc/codecs/rt5616.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/soc/codecs/rt5616.c b/sound/soc/codecs/rt5616.c index f527b5b2817b..98ae326c62fa 100644 --- a/sound/soc/codecs/rt5616.c +++ b/sound/soc/codecs/rt5616.c @@ -1267,14 +1267,14 @@ static int rt5616_resume(struct snd_soc_codec *codec) #define RT5616_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE | \ SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S8)
-struct snd_soc_dai_ops rt5616_aif_dai_ops = { +static struct snd_soc_dai_ops rt5616_aif_dai_ops = { .hw_params = rt5616_hw_params, .set_fmt = rt5616_set_dai_fmt, .set_sysclk = rt5616_set_dai_sysclk, .set_pll = rt5616_set_dai_pll, };
-struct snd_soc_dai_driver rt5616_dai[] = { +static struct snd_soc_dai_driver rt5616_dai[] = { { .name = "rt5616-aif1", .id = RT5616_AIF1,
Sparse reports a below warning.
tpa6130a2.c:193:33: warning: symbol 'tpa6130a2_component_driver' was not declared. Should it be static?
These two symbols are just used inner the file, thus it's better to add static qualifier.
This commit adds it.
Fixes: cb7e62256e99 ('ASoC: tpa6130a2: Register component') CC: Helen Koike helen.koike@collabora.co.uk Signed-off-by: Takashi Sakamoto o-takashi@sakamocchi.jp --- sound/soc/codecs/tpa6130a2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/codecs/tpa6130a2.c b/sound/soc/codecs/tpa6130a2.c index f1ea052..8c67f3a 100644 --- a/sound/soc/codecs/tpa6130a2.c +++ b/sound/soc/codecs/tpa6130a2.c @@ -190,7 +190,7 @@ static const struct snd_soc_dapm_route tpa6130a2_dapm_routes[] = { { "Right PGA", NULL, "Power" }, };
-struct snd_soc_component_driver tpa6130a2_component_driver = { +static struct snd_soc_component_driver tpa6130a2_component_driver = { .name = "tpa6130a2", .probe = tpa6130a2_component_probe, .dapm_widgets = tpa6130a2_dapm_widgets,
participants (4)
-
Adam Thomson
-
Mark Brown
-
Takashi Sakamoto
-
Vinod Koul