diff mbox

[8/9] ASoC: simple-card: code sync: rename num_link to num

Message ID 87poox1v2x.wl%kuninori.morimoto.gx@renesas.com (mailing list archive)
State New, archived
Headers show

Commit Message

Kuninori Morimoto Aug. 25, 2016, 1:52 a.m. UTC
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

simple sound card family are using very similar style, but because of its
historical reason, there are small differences. For example pointer style,
function name, caller postion etc...
This patch synchronized simple card style to other simple card family.

This patch renames num_link to num

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/generic/simple-card.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comments

Kuninori Morimoto Aug. 26, 2016, 2:51 a.m. UTC | #1
Hi Mark

This is my fault.
I will post v2 patch.

> [auto build test ERROR on asoc/for-next]
> [also build test ERROR on next-20160824]
> [cannot apply to v4.8-rc3]
> [if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
> [Suggest to use git(>=2.9.0) format-patch --base=<commit> (or --base=auto for convenience) to record what (public, well-known) commit your patch series was built on]
> [Check https://git-scm.com/docs/git-format-patch for more information]
> 
> url:    https://github.com/0day-ci/linux/commits/Kuninori-Morimoto/ASoC-simple-card-tidyup-and-synchronize-patches/20160825-100058
> base:   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
> config: i386-randconfig-x011-201634 (attached as .config)
> compiler: gcc-6 (Debian 6.1.1-9) 6.1.1 20160705
> reproduce:
>         # save the attached .config to linux build tree
>         make ARCH=i386 
> 
> Note: the linux-review/Kuninori-Morimoto/ASoC-simple-card-tidyup-and-synchronize-patches/20160825-100058 HEAD 36fb10f61ffb92eb287328e22cad00a486495747 builds fine.
>       It only hurts bisectibility.
> 
> All errors (new ones prefixed by >>):
> 
>    sound/soc/generic/simple-card.c: In function 'asoc_simple_card_probe':
> >> sound/soc/generic/simple-card.c:398:40: error: 'num_links' undeclared (first use in this function)
>        sizeof(*priv) + sizeof(*dai_link) * num_links,
>                                            ^~~~~~~~~
>    sound/soc/generic/simple-card.c:398:40: note: each undeclared identifier is reported only once for each function it appears in
> 
> vim +/num_links +398 sound/soc/generic/simple-card.c
> 
> 6805a759b Kuninori Morimoto   2016-08-25  392  		num = of_get_child_count(np);
> 2080437d3 Xiubo Li            2014-09-03  393  	else
> 6805a759b Kuninori Morimoto   2016-08-25  394  		num = 1;
> f2390880e Kuninori Morimoto   2012-04-08  395  
> 0dd4fc3c2 Xiubo Li            2014-09-10  396  	/* Allocate the private data and the DAI link array */
> cf7dc23cb Jean-Francois Moine 2014-03-20  397  	priv = devm_kzalloc(dev,
> 6a91a17bd Jean-Francois Moine 2014-03-20 @398  			sizeof(*priv) + sizeof(*dai_link) * num_links,
> cf7dc23cb Jean-Francois Moine 2014-03-20  399  			GFP_KERNEL);
> ca65b492c Jean-Francois Moine 2014-01-15  400  	if (!priv)
> ca919fe4b Xiubo Li            2014-01-14  401  		return -ENOMEM;
> 
> :::::: The code at line 398 was first introduced by commit
> :::::: 6a91a17bd7b92b2d2aa9ece85457f52a62fd7708 ASoC: simple-card: Handle many DAI links
> 
> :::::: TO: Jean-Francois Moine <moinejf@free.fr>
> :::::: CC: Mark Brown <broonie@linaro.org>
> 
> ---
> 0-DAY kernel test infrastructure                Open Source Technology Center
> https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
> [2 .config.gz <application/octet-stream (base64)>]
> 


Best regards
---
Kuninori Morimoto
diff mbox

Patch

diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c
index c17f851..0a4bcc1 100644
--- a/sound/soc/generic/simple-card.c
+++ b/sound/soc/generic/simple-card.c
@@ -385,13 +385,13 @@  static int asoc_simple_card_probe(struct platform_device *pdev)
 	struct snd_soc_dai_link *dai_link;
 	struct device_node *np = pdev->dev.of_node;
 	struct device *dev = &pdev->dev;
-	int num_links, ret;
+	int num, ret;
 
 	/* Get the number of DAI links */
 	if (np && of_get_child_by_name(np, PREFIX "dai-link"))
-		num_links = of_get_child_count(np);
+		num = of_get_child_count(np);
 	else
-		num_links = 1;
+		num = 1;
 
 	/* Allocate the private data and the DAI link array */
 	priv = devm_kzalloc(dev,
@@ -405,7 +405,7 @@  static int asoc_simple_card_probe(struct platform_device *pdev)
 	priv->snd_card.owner		= THIS_MODULE;
 	priv->snd_card.dev		= dev;
 	priv->snd_card.dai_link		= priv->dai_link;
-	priv->snd_card.num_links	= num_links;
+	priv->snd_card.num_links	= num;
 
 	/* Get room for the other properties */
 	priv->dai_props = devm_kzalloc(dev,