* [PATCH][next] ASoC: samsung: remove redundant pointer cpu_dai
@ 2018-03-13 13:36 Colin King
2018-03-13 16:21 ` Mark Brown
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Colin King @ 2018-03-13 13:36 UTC (permalink / raw)
To: Krzysztof Kozlowski, Sangbeom Kim, Sylwester Nawrocki,
Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
alsa-devel
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
The pointer cpu_dai is assigned a value but the pointer is never
read, hence it is redundant and can be removed.
Cleans up clang warning:
sound/soc/samsung/snow.c:45:2: warning: Value stored to 'cpu_dai' is never read
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
sound/soc/samsung/snow.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/sound/soc/samsung/snow.c b/sound/soc/samsung/snow.c
index fc62110f500f..47b904e2b8c3 100644
--- a/sound/soc/samsung/snow.c
+++ b/sound/soc/samsung/snow.c
@@ -37,12 +37,10 @@ static int snow_late_probe(struct snd_soc_card *card)
{
struct snd_soc_pcm_runtime *rtd;
struct snd_soc_dai *codec_dai;
- struct snd_soc_dai *cpu_dai;
int ret;
rtd = snd_soc_get_pcm_runtime(card, card->dai_link[0].name);
codec_dai = rtd->codec_dai;
- cpu_dai = rtd->cpu_dai;
/* Set the MCLK rate for the codec */
ret = snd_soc_dai_set_sysclk(codec_dai, 0,
--
2.15.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH][next] ASoC: samsung: remove redundant pointer cpu_dai
2018-03-13 13:36 [PATCH][next] ASoC: samsung: remove redundant pointer cpu_dai Colin King
@ 2018-03-13 16:21 ` Mark Brown
2018-03-13 16:22 ` Colin Ian King
2018-03-14 17:45 ` [alsa-devel] " kbuild test robot
2018-03-14 18:08 ` kbuild test robot
2 siblings, 1 reply; 5+ messages in thread
From: Mark Brown @ 2018-03-13 16:21 UTC (permalink / raw)
To: Colin King
Cc: Krzysztof Kozlowski, Sangbeom Kim, Sylwester Nawrocki,
Liam Girdwood, Jaroslav Kysela, Takashi Iwai, alsa-devel,
kernel-janitors, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 337 bytes --]
On Tue, Mar 13, 2018 at 01:36:26PM +0000, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> The pointer cpu_dai is assigned a value but the pointer is never
> read, hence it is redundant and can be removed.
There's some subsequent patches to that driver which I think provide an
alternative fix for this.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH][next] ASoC: samsung: remove redundant pointer cpu_dai
2018-03-13 16:21 ` Mark Brown
@ 2018-03-13 16:22 ` Colin Ian King
0 siblings, 0 replies; 5+ messages in thread
From: Colin Ian King @ 2018-03-13 16:22 UTC (permalink / raw)
To: Mark Brown
Cc: Krzysztof Kozlowski, Sangbeom Kim, Sylwester Nawrocki,
Liam Girdwood, Jaroslav Kysela, Takashi Iwai, alsa-devel,
kernel-janitors, linux-kernel
[-- Attachment #1.1: Type: text/plain, Size: 422 bytes --]
On 13/03/18 16:21, Mark Brown wrote:
> On Tue, Mar 13, 2018 at 01:36:26PM +0000, Colin King wrote:
>> From: Colin Ian King <colin.king@canonical.com>
>>
>> The pointer cpu_dai is assigned a value but the pointer is never
>> read, hence it is redundant and can be removed.
>
> There's some subsequent patches to that driver which I think provide an
> alternative fix for this.
>
OK, glad it's been resolved.
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 870 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [alsa-devel] [PATCH][next] ASoC: samsung: remove redundant pointer cpu_dai
2018-03-13 13:36 [PATCH][next] ASoC: samsung: remove redundant pointer cpu_dai Colin King
2018-03-13 16:21 ` Mark Brown
@ 2018-03-14 17:45 ` kbuild test robot
2018-03-14 18:08 ` kbuild test robot
2 siblings, 0 replies; 5+ messages in thread
From: kbuild test robot @ 2018-03-14 17:45 UTC (permalink / raw)
To: Colin King
Cc: kbuild-all, Krzysztof Kozlowski, Sangbeom Kim,
Sylwester Nawrocki, Liam Girdwood, Mark Brown, Jaroslav Kysela,
Takashi Iwai, alsa-devel, kernel-janitors, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 3161 bytes --]
Hi Colin,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on v4.16-rc4]
[cannot apply to next-20180314]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Colin-King/ASoC-samsung-remove-redundant-pointer-cpu_dai/20180314-232924
config: sh-allmodconfig (attached as .config)
compiler: sh4-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=sh
All errors (new ones prefixed by >>):
sound/soc/samsung/snow.c: In function 'snow_late_probe':
>> sound/soc/samsung/snow.c:52:31: error: 'cpu_dai' undeclared (first use in this function); did you mean 'cpu_data'?
ret = snd_soc_dai_set_sysclk(cpu_dai, SAMSUNG_I2S_RCLKSRC_0,
^~~~~~~
cpu_data
sound/soc/samsung/snow.c:52:31: note: each undeclared identifier is reported only once for each function it appears in
vim +52 sound/soc/samsung/snow.c
31c26a6a Tushar Behera 2014-04-28 35
31c26a6a Tushar Behera 2014-04-28 36 static int snow_late_probe(struct snd_soc_card *card)
31c26a6a Tushar Behera 2014-04-28 37 {
5015920a Mengdong Lin 2015-11-18 38 struct snd_soc_pcm_runtime *rtd;
5015920a Mengdong Lin 2015-11-18 39 struct snd_soc_dai *codec_dai;
31c26a6a Tushar Behera 2014-04-28 40 int ret;
31c26a6a Tushar Behera 2014-04-28 41
5015920a Mengdong Lin 2015-11-18 42 rtd = snd_soc_get_pcm_runtime(card, card->dai_link[0].name);
5015920a Mengdong Lin 2015-11-18 43 codec_dai = rtd->codec_dai;
5015920a Mengdong Lin 2015-11-18 44
31c26a6a Tushar Behera 2014-04-28 45 /* Set the MCLK rate for the codec */
31c26a6a Tushar Behera 2014-04-28 46 ret = snd_soc_dai_set_sysclk(codec_dai, 0,
31c26a6a Tushar Behera 2014-04-28 47 FIN_PLL_RATE, SND_SOC_CLOCK_IN);
31c26a6a Tushar Behera 2014-04-28 48 if (ret < 0)
31c26a6a Tushar Behera 2014-04-28 49 return ret;
31c26a6a Tushar Behera 2014-04-28 50
31c26a6a Tushar Behera 2014-04-28 51 /* Select I2S Bus clock to set RCLK and BCLK */
31c26a6a Tushar Behera 2014-04-28 @52 ret = snd_soc_dai_set_sysclk(cpu_dai, SAMSUNG_I2S_RCLKSRC_0,
31c26a6a Tushar Behera 2014-04-28 53 0, SND_SOC_CLOCK_IN);
31c26a6a Tushar Behera 2014-04-28 54 if (ret < 0)
31c26a6a Tushar Behera 2014-04-28 55 return ret;
31c26a6a Tushar Behera 2014-04-28 56
31c26a6a Tushar Behera 2014-04-28 57 return 0;
31c26a6a Tushar Behera 2014-04-28 58 }
31c26a6a Tushar Behera 2014-04-28 59
:::::: The code at line 52 was first introduced by commit
:::::: 31c26a6a842d541ca475a482112dda5993df2374 ASoC: samsung: Add sound card driver for Snow board
:::::: TO: Tushar Behera <tushar.behera@linaro.org>
:::::: CC: Mark Brown <broonie@linaro.org>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 48060 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [alsa-devel] [PATCH][next] ASoC: samsung: remove redundant pointer cpu_dai
2018-03-13 13:36 [PATCH][next] ASoC: samsung: remove redundant pointer cpu_dai Colin King
2018-03-13 16:21 ` Mark Brown
2018-03-14 17:45 ` [alsa-devel] " kbuild test robot
@ 2018-03-14 18:08 ` kbuild test robot
2 siblings, 0 replies; 5+ messages in thread
From: kbuild test robot @ 2018-03-14 18:08 UTC (permalink / raw)
To: Colin King
Cc: kbuild-all, Krzysztof Kozlowski, Sangbeom Kim,
Sylwester Nawrocki, Liam Girdwood, Mark Brown, Jaroslav Kysela,
Takashi Iwai, alsa-devel, kernel-janitors, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 3165 bytes --]
Hi Colin,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on v4.16-rc4]
[cannot apply to next-20180314]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Colin-King/ASoC-samsung-remove-redundant-pointer-cpu_dai/20180314-232924
config: arm-allyesconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (Debian 7.2.0-11) 7.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=arm
All errors (new ones prefixed by >>):
sound/soc/samsung/snow.c: In function 'snow_late_probe':
>> sound/soc/samsung/snow.c:52:31: error: 'cpu_dai' undeclared (first use in this function); did you mean 'cpu_tlb'?
ret = snd_soc_dai_set_sysclk(cpu_dai, SAMSUNG_I2S_RCLKSRC_0,
^~~~~~~
cpu_tlb
sound/soc/samsung/snow.c:52:31: note: each undeclared identifier is reported only once for each function it appears in
vim +52 sound/soc/samsung/snow.c
31c26a6a Tushar Behera 2014-04-28 35
31c26a6a Tushar Behera 2014-04-28 36 static int snow_late_probe(struct snd_soc_card *card)
31c26a6a Tushar Behera 2014-04-28 37 {
5015920a Mengdong Lin 2015-11-18 38 struct snd_soc_pcm_runtime *rtd;
5015920a Mengdong Lin 2015-11-18 39 struct snd_soc_dai *codec_dai;
31c26a6a Tushar Behera 2014-04-28 40 int ret;
31c26a6a Tushar Behera 2014-04-28 41
5015920a Mengdong Lin 2015-11-18 42 rtd = snd_soc_get_pcm_runtime(card, card->dai_link[0].name);
5015920a Mengdong Lin 2015-11-18 43 codec_dai = rtd->codec_dai;
5015920a Mengdong Lin 2015-11-18 44
31c26a6a Tushar Behera 2014-04-28 45 /* Set the MCLK rate for the codec */
31c26a6a Tushar Behera 2014-04-28 46 ret = snd_soc_dai_set_sysclk(codec_dai, 0,
31c26a6a Tushar Behera 2014-04-28 47 FIN_PLL_RATE, SND_SOC_CLOCK_IN);
31c26a6a Tushar Behera 2014-04-28 48 if (ret < 0)
31c26a6a Tushar Behera 2014-04-28 49 return ret;
31c26a6a Tushar Behera 2014-04-28 50
31c26a6a Tushar Behera 2014-04-28 51 /* Select I2S Bus clock to set RCLK and BCLK */
31c26a6a Tushar Behera 2014-04-28 @52 ret = snd_soc_dai_set_sysclk(cpu_dai, SAMSUNG_I2S_RCLKSRC_0,
31c26a6a Tushar Behera 2014-04-28 53 0, SND_SOC_CLOCK_IN);
31c26a6a Tushar Behera 2014-04-28 54 if (ret < 0)
31c26a6a Tushar Behera 2014-04-28 55 return ret;
31c26a6a Tushar Behera 2014-04-28 56
31c26a6a Tushar Behera 2014-04-28 57 return 0;
31c26a6a Tushar Behera 2014-04-28 58 }
31c26a6a Tushar Behera 2014-04-28 59
:::::: The code at line 52 was first introduced by commit
:::::: 31c26a6a842d541ca475a482112dda5993df2374 ASoC: samsung: Add sound card driver for Snow board
:::::: TO: Tushar Behera <tushar.behera@linaro.org>
:::::: CC: Mark Brown <broonie@linaro.org>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 64433 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-03-14 18:09 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-13 13:36 [PATCH][next] ASoC: samsung: remove redundant pointer cpu_dai Colin King
2018-03-13 16:21 ` Mark Brown
2018-03-13 16:22 ` Colin Ian King
2018-03-14 17:45 ` [alsa-devel] " kbuild test robot
2018-03-14 18:08 ` kbuild test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).