Re: [PATCH v3 6/6] staging: greybus: audio: Enable GB codec, audio module compilation.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Vaibhav,

I love your patch! Perhaps something to improve:

[auto build test WARNING on 98fe05e21a6e0ca242e974650ed58b64813cb2dc]

url:    https://github.com/0day-ci/linux/commits/Vaibhav-Agarwal/Enable-Greybus-Audio-codec-driver/20200619-192443
base:    98fe05e21a6e0ca242e974650ed58b64813cb2dc
config: nds32-randconfig-r002-20200619 (attached as .config)
compiler: nds32le-linux-gcc (GCC) 9.3.0
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
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=nds32 

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

All warnings (new ones prefixed by >>, old ones prefixed by <<):

>> drivers/staging/greybus/audio_helper.c:59:5: warning: no previous prototype for 'gbaudio_dapm_link_component_dai_widgets' [-Wmissing-prototypes]
59 | int gbaudio_dapm_link_component_dai_widgets(struct snd_soc_card *card,
|     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/staging/greybus/audio_helper.c:112:5: warning: no previous prototype for 'gbaudio_dapm_free_controls' [-Wmissing-prototypes]
112 | int gbaudio_dapm_free_controls(struct snd_soc_dapm_context *dapm,
|     ^~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/staging/greybus/audio_helper.c:189:5: warning: no previous prototype for 'gbaudio_remove_component_controls' [-Wmissing-prototypes]
189 | int gbaudio_remove_component_controls(struct snd_soc_component *component,
|     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--
drivers/staging/greybus/audio_topology.c: In function 'find_gb_module':
>> drivers/staging/greybus/audio_topology.c:31:14: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
31 |  int dev_id, ret;
|              ^~~
drivers/staging/greybus/audio_topology.c: In function 'gbcodec_mixer_dapm_ctl_get':
>> drivers/staging/greybus/audio_topology.c:380:33: warning: variable 'info' set but not used [-Wunused-but-set-variable]
380 |  struct gb_audio_ctl_elem_info *info;
|                                 ^~~~

vim +/gbaudio_dapm_link_component_dai_widgets +59 drivers/staging/greybus/audio_helper.c

1939631ddc545a7 Vaibhav Agarwal 2020-06-19   58  
1939631ddc545a7 Vaibhav Agarwal 2020-06-19  @59  int gbaudio_dapm_link_component_dai_widgets(struct snd_soc_card *card,
1939631ddc545a7 Vaibhav Agarwal 2020-06-19   60  					    struct snd_soc_dapm_context *dapm)
1939631ddc545a7 Vaibhav Agarwal 2020-06-19   61  {
1939631ddc545a7 Vaibhav Agarwal 2020-06-19   62  	struct snd_soc_dapm_widget *dai_w;
1939631ddc545a7 Vaibhav Agarwal 2020-06-19   63  
1939631ddc545a7 Vaibhav Agarwal 2020-06-19   64  	/* For each DAI widget... */
1939631ddc545a7 Vaibhav Agarwal 2020-06-19   65  	list_for_each_entry(dai_w, &card->widgets, list) {
1939631ddc545a7 Vaibhav Agarwal 2020-06-19   66  		if (dai_w->dapm != dapm)
1939631ddc545a7 Vaibhav Agarwal 2020-06-19   67  			continue;
1939631ddc545a7 Vaibhav Agarwal 2020-06-19   68  		switch (dai_w->id) {
1939631ddc545a7 Vaibhav Agarwal 2020-06-19   69  		case snd_soc_dapm_dai_in:
1939631ddc545a7 Vaibhav Agarwal 2020-06-19   70  		case snd_soc_dapm_dai_out:
1939631ddc545a7 Vaibhav Agarwal 2020-06-19   71  			break;
1939631ddc545a7 Vaibhav Agarwal 2020-06-19   72  		default:
1939631ddc545a7 Vaibhav Agarwal 2020-06-19   73  			continue;
1939631ddc545a7 Vaibhav Agarwal 2020-06-19   74  		}
1939631ddc545a7 Vaibhav Agarwal 2020-06-19   75  		gbaudio_dapm_link_dai_widget(dai_w, card);
1939631ddc545a7 Vaibhav Agarwal 2020-06-19   76  	}
1939631ddc545a7 Vaibhav Agarwal 2020-06-19   77  
1939631ddc545a7 Vaibhav Agarwal 2020-06-19   78  	return 0;
1939631ddc545a7 Vaibhav Agarwal 2020-06-19   79  }
1939631ddc545a7 Vaibhav Agarwal 2020-06-19   80  
1939631ddc545a7 Vaibhav Agarwal 2020-06-19   81  static void gbaudio_dapm_free_path(struct snd_soc_dapm_path *path)
1939631ddc545a7 Vaibhav Agarwal 2020-06-19   82  {
1939631ddc545a7 Vaibhav Agarwal 2020-06-19   83  	list_del(&path->list_node[SND_SOC_DAPM_DIR_IN]);
1939631ddc545a7 Vaibhav Agarwal 2020-06-19   84  	list_del(&path->list_node[SND_SOC_DAPM_DIR_OUT]);
1939631ddc545a7 Vaibhav Agarwal 2020-06-19   85  	list_del(&path->list_kcontrol);
1939631ddc545a7 Vaibhav Agarwal 2020-06-19   86  	list_del(&path->list);
1939631ddc545a7 Vaibhav Agarwal 2020-06-19   87  	kfree(path);
1939631ddc545a7 Vaibhav Agarwal 2020-06-19   88  }
1939631ddc545a7 Vaibhav Agarwal 2020-06-19   89  
1939631ddc545a7 Vaibhav Agarwal 2020-06-19   90  static void gbaudio_dapm_free_widget(struct snd_soc_dapm_widget *w)
1939631ddc545a7 Vaibhav Agarwal 2020-06-19   91  {
1939631ddc545a7 Vaibhav Agarwal 2020-06-19   92  	struct snd_soc_dapm_path *p, *next_p;
1939631ddc545a7 Vaibhav Agarwal 2020-06-19   93  	enum snd_soc_dapm_direction dir;
1939631ddc545a7 Vaibhav Agarwal 2020-06-19   94  
1939631ddc545a7 Vaibhav Agarwal 2020-06-19   95  	list_del(&w->list);
1939631ddc545a7 Vaibhav Agarwal 2020-06-19   96  	/*
1939631ddc545a7 Vaibhav Agarwal 2020-06-19   97  	 * remove source and sink paths associated to this widget.
1939631ddc545a7 Vaibhav Agarwal 2020-06-19   98  	 * While removing the path, remove reference to it from both
1939631ddc545a7 Vaibhav Agarwal 2020-06-19   99  	 * source and sink widgets so that path is removed only once.
1939631ddc545a7 Vaibhav Agarwal 2020-06-19  100  	 */
1939631ddc545a7 Vaibhav Agarwal 2020-06-19  101  	gbaudio_dapm_for_each_direction(dir) {
1939631ddc545a7 Vaibhav Agarwal 2020-06-19  102  		snd_soc_dapm_widget_for_each_path_safe(w, dir, p, next_p)
1939631ddc545a7 Vaibhav Agarwal 2020-06-19  103  			gbaudio_dapm_free_path(p);
1939631ddc545a7 Vaibhav Agarwal 2020-06-19  104  	}
1939631ddc545a7 Vaibhav Agarwal 2020-06-19  105  
1939631ddc545a7 Vaibhav Agarwal 2020-06-19  106  	kfree(w->kcontrols);
1939631ddc545a7 Vaibhav Agarwal 2020-06-19  107  	kfree_const(w->name);
1939631ddc545a7 Vaibhav Agarwal 2020-06-19  108  	kfree_const(w->sname);
1939631ddc545a7 Vaibhav Agarwal 2020-06-19  109  	kfree(w);
1939631ddc545a7 Vaibhav Agarwal 2020-06-19  110  }
1939631ddc545a7 Vaibhav Agarwal 2020-06-19  111  
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 @112  int gbaudio_dapm_free_controls(struct snd_soc_dapm_context *dapm,
1939631ddc545a7 Vaibhav Agarwal 2020-06-19  113  			       const struct snd_soc_dapm_widget *widget,
1939631ddc545a7 Vaibhav Agarwal 2020-06-19  114  			       int num)
1939631ddc545a7 Vaibhav Agarwal 2020-06-19  115  {
1939631ddc545a7 Vaibhav Agarwal 2020-06-19  116  	int i;
1939631ddc545a7 Vaibhav Agarwal 2020-06-19  117  	struct snd_soc_dapm_widget *w, *next_w;
1939631ddc545a7 Vaibhav Agarwal 2020-06-19  118  #ifdef CONFIG_DEBUG_FS
1939631ddc545a7 Vaibhav Agarwal 2020-06-19  119  	struct dentry *parent = dapm->debugfs_dapm;
1939631ddc545a7 Vaibhav Agarwal 2020-06-19  120  	struct dentry *debugfs_w = NULL;
1939631ddc545a7 Vaibhav Agarwal 2020-06-19  121  #endif
1939631ddc545a7 Vaibhav Agarwal 2020-06-19  122  
1939631ddc545a7 Vaibhav Agarwal 2020-06-19  123  	mutex_lock(&dapm->card->dapm_mutex);
1939631ddc545a7 Vaibhav Agarwal 2020-06-19  124  	for (i = 0; i < num; i++) {
1939631ddc545a7 Vaibhav Agarwal 2020-06-19  125  		/* below logic can be optimized to identify widget pointer */
1939631ddc545a7 Vaibhav Agarwal 2020-06-19  126  		list_for_each_entry_safe(w, next_w, &dapm->card->widgets,
1939631ddc545a7 Vaibhav Agarwal 2020-06-19  127  					 list) {
1939631ddc545a7 Vaibhav Agarwal 2020-06-19  128  			if (w->dapm != dapm)
1939631ddc545a7 Vaibhav Agarwal 2020-06-19  129  				continue;
1939631ddc545a7 Vaibhav Agarwal 2020-06-19  130  			if (!strcmp(w->name, widget->name))
1939631ddc545a7 Vaibhav Agarwal 2020-06-19  131  				break;
1939631ddc545a7 Vaibhav Agarwal 2020-06-19  132  			w = NULL;
1939631ddc545a7 Vaibhav Agarwal 2020-06-19  133  		}
1939631ddc545a7 Vaibhav Agarwal 2020-06-19  134  		if (!w) {
1939631ddc545a7 Vaibhav Agarwal 2020-06-19  135  			dev_err(dapm->dev, "%s: widget not found\n",
1939631ddc545a7 Vaibhav Agarwal 2020-06-19  136  				widget->name);
1939631ddc545a7 Vaibhav Agarwal 2020-06-19  137  			return -EINVAL;
1939631ddc545a7 Vaibhav Agarwal 2020-06-19  138  		}
1939631ddc545a7 Vaibhav Agarwal 2020-06-19  139  		widget++;
1939631ddc545a7 Vaibhav Agarwal 2020-06-19  140  #ifdef CONFIG_DEBUG_FS
1939631ddc545a7 Vaibhav Agarwal 2020-06-19  141  		if (!parent)
1939631ddc545a7 Vaibhav Agarwal 2020-06-19  142  			debugfs_w = debugfs_lookup(w->name, parent);
1939631ddc545a7 Vaibhav Agarwal 2020-06-19  143  		debugfs_remove(debugfs_w);
1939631ddc545a7 Vaibhav Agarwal 2020-06-19  144  		debugfs_w = NULL;
1939631ddc545a7 Vaibhav Agarwal 2020-06-19  145  #endif
1939631ddc545a7 Vaibhav Agarwal 2020-06-19  146  		gbaudio_dapm_free_widget(w);
1939631ddc545a7 Vaibhav Agarwal 2020-06-19  147  	}
1939631ddc545a7 Vaibhav Agarwal 2020-06-19  148  	mutex_unlock(&dapm->card->dapm_mutex);
1939631ddc545a7 Vaibhav Agarwal 2020-06-19  149  	return 0;
1939631ddc545a7 Vaibhav Agarwal 2020-06-19  150  }
1939631ddc545a7 Vaibhav Agarwal 2020-06-19  151  
1939631ddc545a7 Vaibhav Agarwal 2020-06-19  152  static int gbaudio_remove_controls(struct snd_card *card, struct device *dev,
1939631ddc545a7 Vaibhav Agarwal 2020-06-19  153  				   const struct snd_kcontrol_new *controls,
1939631ddc545a7 Vaibhav Agarwal 2020-06-19  154  				   int num_controls, const char *prefix)
1939631ddc545a7 Vaibhav Agarwal 2020-06-19  155  {
1939631ddc545a7 Vaibhav Agarwal 2020-06-19  156  	int i, err;
1939631ddc545a7 Vaibhav Agarwal 2020-06-19  157  
1939631ddc545a7 Vaibhav Agarwal 2020-06-19  158  	for (i = 0; i < num_controls; i++) {
1939631ddc545a7 Vaibhav Agarwal 2020-06-19  159  		const struct snd_kcontrol_new *control = &controls[i];
1939631ddc545a7 Vaibhav Agarwal 2020-06-19  160  		struct snd_ctl_elem_id id;
1939631ddc545a7 Vaibhav Agarwal 2020-06-19  161  		struct snd_kcontrol *kctl;
1939631ddc545a7 Vaibhav Agarwal 2020-06-19  162  
1939631ddc545a7 Vaibhav Agarwal 2020-06-19  163  		if (prefix)
1939631ddc545a7 Vaibhav Agarwal 2020-06-19  164  			snprintf(id.name, sizeof(id.name), "%s %s", prefix,
1939631ddc545a7 Vaibhav Agarwal 2020-06-19  165  				 control->name);
1939631ddc545a7 Vaibhav Agarwal 2020-06-19  166  		else
1939631ddc545a7 Vaibhav Agarwal 2020-06-19  167  			strlcpy(id.name, control->name, sizeof(id.name));
1939631ddc545a7 Vaibhav Agarwal 2020-06-19  168  		id.numid = 0;
1939631ddc545a7 Vaibhav Agarwal 2020-06-19  169  		id.iface = control->iface;
1939631ddc545a7 Vaibhav Agarwal 2020-06-19  170  		id.device = control->device;
1939631ddc545a7 Vaibhav Agarwal 2020-06-19  171  		id.subdevice = control->subdevice;
1939631ddc545a7 Vaibhav Agarwal 2020-06-19  172  		id.index = control->index;
1939631ddc545a7 Vaibhav Agarwal 2020-06-19  173  		kctl = snd_ctl_find_id(card, &id);
1939631ddc545a7 Vaibhav Agarwal 2020-06-19  174  		if (!kctl) {
1939631ddc545a7 Vaibhav Agarwal 2020-06-19  175  			dev_err(dev, "%d: Failed to find %s\n", err,
1939631ddc545a7 Vaibhav Agarwal 2020-06-19  176  				control->name);
1939631ddc545a7 Vaibhav Agarwal 2020-06-19  177  			continue;
1939631ddc545a7 Vaibhav Agarwal 2020-06-19  178  		}
1939631ddc545a7 Vaibhav Agarwal 2020-06-19  179  		err = snd_ctl_remove(card, kctl);
1939631ddc545a7 Vaibhav Agarwal 2020-06-19  180  		if (err < 0) {
1939631ddc545a7 Vaibhav Agarwal 2020-06-19  181  			dev_err(dev, "%d: Failed to remove %s\n", err,
1939631ddc545a7 Vaibhav Agarwal 2020-06-19  182  				control->name);
1939631ddc545a7 Vaibhav Agarwal 2020-06-19  183  			continue;
1939631ddc545a7 Vaibhav Agarwal 2020-06-19  184  		}
1939631ddc545a7 Vaibhav Agarwal 2020-06-19  185  	}
1939631ddc545a7 Vaibhav Agarwal 2020-06-19  186  	return 0;
1939631ddc545a7 Vaibhav Agarwal 2020-06-19  187  }
1939631ddc545a7 Vaibhav Agarwal 2020-06-19  188  
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 @189  int gbaudio_remove_component_controls(struct snd_soc_component *component,

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

Attachment: .config.gz
Description: application/gzip

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux