All of lore.kernel.org
 help / color / mirror / Atom feed
* [chrome-os:chromeos-5.4 4/5] sound/soc/qcom/sc7180.c:26:5: warning: no previous prototype for function 'sc7180_parse_of'
@ 2020-07-20 17:13 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2020-07-20 17:13 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 5461 bytes --]

tree:   https://chromium.googlesource.com/chromiumos/third_party/kernel chromeos-5.4
head:   091ed41c87f0bf89714d4aba9a4febec8cd5557b
commit: 084d9bb286af924f2d01e7af0b70288cf8b9fac6 [4/5] FROMLIST: ASoC: qcom: sc7180: Add machine driver for sound card registration
config: x86_64-allyesconfig (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project cf1105069648446d58adfb7a6cc590013d6886ba)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install x86_64 cross compiling tool for clang build
        # apt-get install binutils-x86-64-linux-gnu
        git checkout 084d9bb286af924f2d01e7af0b70288cf8b9fac6
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

>> sound/soc/qcom/sc7180.c:26:5: warning: no previous prototype for function 'sc7180_parse_of' [-Wmissing-prototypes]
   int sc7180_parse_of(struct snd_soc_card *card)
       ^
   sound/soc/qcom/sc7180.c:26:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   int sc7180_parse_of(struct snd_soc_card *card)
   ^
   static 
   1 warning generated.

vim +/sc7180_parse_of +26 sound/soc/qcom/sc7180.c

    25	
  > 26	int sc7180_parse_of(struct snd_soc_card *card)
    27	{
    28		struct device_node *np;
    29		struct device_node *codec = NULL;
    30		struct device_node *platform = NULL;
    31		struct device_node *cpu = NULL;
    32		struct device *dev = card->dev;
    33		struct snd_soc_dai_link *link;
    34		struct of_phandle_args args;
    35		struct snd_soc_dai_link_component *dlc;
    36		int ret, num_links, dir;
    37	
    38		ret = snd_soc_of_parse_card_name(card, "model");
    39		if (ret) {
    40			dev_err(dev, "Error parsing card name: %d\n", ret);
    41			return ret;
    42		}
    43	
    44		/* DAPM routes */
    45		if (of_property_read_bool(dev->of_node, "audio-routing")) {
    46			ret = snd_soc_of_parse_audio_routing(card,
    47							     "audio-routing");
    48			if (ret)
    49				return ret;
    50		}
    51	
    52		/* Populate links */
    53		num_links = of_get_child_count(dev->of_node);
    54	
    55		/* Allocate the DAI link array */
    56		card->dai_link = kcalloc(num_links, sizeof(*link), GFP_KERNEL);
    57		if (!card->dai_link)
    58			return -ENOMEM;
    59	
    60		card->num_links = num_links;
    61		link = card->dai_link;
    62	
    63		for_each_child_of_node(dev->of_node, np) {
    64			dlc = devm_kzalloc(dev, 2 * sizeof(*dlc), GFP_KERNEL);
    65			if (!dlc)
    66				return -ENOMEM;
    67	
    68			link->cpus	= &dlc[0];
    69			link->platforms	= &dlc[1];
    70	
    71			link->num_cpus		= 1;
    72			link->num_platforms	= 1;
    73	
    74			ret = of_property_read_string(np, "link-name", &link->name);
    75			if (ret) {
    76				dev_err(card->dev, "error getting codec dai_link name\n");
    77				goto err;
    78			}
    79	
    80			of_property_read_u32(np, "unidirectional", &dir);
    81			if (dir == 0)
    82				link->playback_only = 1;
    83			else if (dir == 1)
    84				link->capture_only = 1;
    85	
    86			cpu = of_get_child_by_name(np, "cpu");
    87			codec = of_get_child_by_name(np, "codec");
    88	
    89			if (!cpu) {
    90				dev_err(dev, "%s: Can't find cpu DT node\n",
    91					link->name);
    92				ret = -EINVAL;
    93				goto err;
    94			}
    95	
    96			ret = of_parse_phandle_with_args(cpu, "sound-dai",
    97							 "#sound-dai-cells", 0, &args);
    98			if (ret) {
    99				dev_err(card->dev, "%s: error getting cpu phandle\n",
   100					link->name);
   101				goto err;
   102			}
   103			link->cpus->of_node = args.np;
   104			link->id = args.args[0];
   105	
   106			ret = snd_soc_of_get_dai_name(cpu, &link->cpus->dai_name);
   107			if (ret) {
   108				dev_err(card->dev, "%s: error getting cpu dai name\n",
   109					link->name);
   110				goto err;
   111			}
   112	
   113			if (codec) {
   114				ret = snd_soc_of_get_dai_link_codecs(dev, codec, link);
   115				if (ret < 0) {
   116					dev_err(card->dev, "%s: codec dai not found\n",
   117						link->name);
   118					goto err;
   119				}
   120			} else {
   121				dlc = devm_kzalloc(dev, sizeof(*dlc), GFP_KERNEL);
   122				if (!dlc)
   123					return -ENOMEM;
   124	
   125				link->codecs	 = dlc;
   126				link->num_codecs = 1;
   127	
   128				link->codecs->dai_name = "snd-soc-dummy-dai";
   129				link->codecs->name = "snd-soc-dummy";
   130			}
   131	
   132			link->platforms->of_node = link->cpus->of_node;
   133			link->stream_name = link->name;
   134			link++;
   135	
   136			of_node_put(cpu);
   137			of_node_put(codec);
   138		}
   139	
   140		return 0;
   141	err:
   142		of_node_put(np);
   143		of_node_put(cpu);
   144		of_node_put(codec);
   145		of_node_put(platform);
   146		kfree(card->dai_link);
   147		return ret;
   148	}
   149	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 71881 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-07-20 17:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-20 17:13 [chrome-os:chromeos-5.4 4/5] sound/soc/qcom/sc7180.c:26:5: warning: no previous prototype for function 'sc7180_parse_of' kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.