Re: [PATCH 2/2] ASoC: constify snd_soc_component_driver struct

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



Hi Javier,

kernel test robot noticed the following build errors:

[auto build test ERROR on 864b1099d16fc7e332c3ad7823058c65f890486c]

url:    https://github.com/intel-lab-lkp/linux/commits/Javier-Carrasco/media-i2c-tda1997x-constify-snd_soc_component_driver-struct/20240725-183542
base:   864b1099d16fc7e332c3ad7823058c65f890486c
patch link:    https://lore.kernel.org/r/20240725-const_snd_soc_component_driver-v1-2-3d7ee08e129b%40gmail.com
patch subject: [PATCH 2/2] ASoC: constify snd_soc_component_driver struct
config: i386-buildonly-randconfig-003-20240726 (https://download.01.org/0day-ci/archive/20240726/202407261707.8O24kg8R-lkp@xxxxxxxxx/config)
compiler: gcc-13 (Ubuntu 13.2.0-4ubuntu3) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240726/202407261707.8O24kg8R-lkp@xxxxxxxxx/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202407261707.8O24kg8R-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

   sound/soc/codecs/sti-sas.c: In function 'sti_sas_driver_probe':
>> sound/soc/codecs/sti-sas.c:450:37: error: assignment of member 'dapm_widgets' in read-only object
     450 |         sti_sas_driver.dapm_widgets = drvdata->dev_data->dapm_widgets;
         |                                     ^
>> sound/soc/codecs/sti-sas.c:451:41: error: assignment of member 'num_dapm_widgets' in read-only object
     451 |         sti_sas_driver.num_dapm_widgets = drvdata->dev_data->num_dapm_widgets;
         |                                         ^
>> sound/soc/codecs/sti-sas.c:453:36: error: assignment of member 'dapm_routes' in read-only object
     453 |         sti_sas_driver.dapm_routes = drvdata->dev_data->dapm_routes;
         |                                    ^
>> sound/soc/codecs/sti-sas.c:454:40: error: assignment of member 'num_dapm_routes' in read-only object
     454 |         sti_sas_driver.num_dapm_routes = drvdata->dev_data->num_dapm_routes;
         |                                        ^


vim +/dapm_widgets +450 sound/soc/codecs/sti-sas.c

32a726b2e089ec Arnaud Pouliquen  2015-06-22  405  
32a726b2e089ec Arnaud Pouliquen  2015-06-22  406  static int sti_sas_driver_probe(struct platform_device *pdev)
32a726b2e089ec Arnaud Pouliquen  2015-06-22  407  {
32a726b2e089ec Arnaud Pouliquen  2015-06-22  408  	struct device_node *pnode = pdev->dev.of_node;
32a726b2e089ec Arnaud Pouliquen  2015-06-22  409  	struct sti_sas_data *drvdata;
601b9d9c7bd04f Arnaud Pouliquen  2015-07-16  410  	const struct of_device_id *of_id;
32a726b2e089ec Arnaud Pouliquen  2015-06-22  411  
32a726b2e089ec Arnaud Pouliquen  2015-06-22  412  	/* Allocate device structure */
32a726b2e089ec Arnaud Pouliquen  2015-06-22  413  	drvdata = devm_kzalloc(&pdev->dev, sizeof(struct sti_sas_data),
32a726b2e089ec Arnaud Pouliquen  2015-06-22  414  			       GFP_KERNEL);
32a726b2e089ec Arnaud Pouliquen  2015-06-22  415  	if (!drvdata)
32a726b2e089ec Arnaud Pouliquen  2015-06-22  416  		return -ENOMEM;
32a726b2e089ec Arnaud Pouliquen  2015-06-22  417  
32a726b2e089ec Arnaud Pouliquen  2015-06-22  418  	/* Populate data structure depending on compatibility */
601b9d9c7bd04f Arnaud Pouliquen  2015-07-16  419  	of_id = of_match_node(sti_sas_dev_match, pnode);
601b9d9c7bd04f Arnaud Pouliquen  2015-07-16  420  	if (!of_id->data) {
92591efabc013f Arnaud Pouliquen  2016-10-24  421  		dev_err(&pdev->dev, "data associated to device is missing\n");
32a726b2e089ec Arnaud Pouliquen  2015-06-22  422  		return -EINVAL;
32a726b2e089ec Arnaud Pouliquen  2015-06-22  423  	}
32a726b2e089ec Arnaud Pouliquen  2015-06-22  424  
601b9d9c7bd04f Arnaud Pouliquen  2015-07-16  425  	drvdata->dev_data = (struct sti_sas_dev_data *)of_id->data;
32a726b2e089ec Arnaud Pouliquen  2015-06-22  426  
32a726b2e089ec Arnaud Pouliquen  2015-06-22  427  	/* Initialise device structure */
32a726b2e089ec Arnaud Pouliquen  2015-06-22  428  	drvdata->dev = &pdev->dev;
32a726b2e089ec Arnaud Pouliquen  2015-06-22  429  
32a726b2e089ec Arnaud Pouliquen  2015-06-22  430  	/* Request the DAC & SPDIF registers memory region */
32a726b2e089ec Arnaud Pouliquen  2015-06-22  431  	drvdata->dac.virt_regmap = devm_regmap_init(&pdev->dev, NULL, drvdata,
32a726b2e089ec Arnaud Pouliquen  2015-06-22  432  						    drvdata->dev_data->regmap);
e27d9ee6e709db Axel Lin          2015-07-13  433  	if (IS_ERR(drvdata->dac.virt_regmap)) {
32a726b2e089ec Arnaud Pouliquen  2015-06-22  434  		dev_err(&pdev->dev, "audio registers not enabled\n");
e27d9ee6e709db Axel Lin          2015-07-13  435  		return PTR_ERR(drvdata->dac.virt_regmap);
32a726b2e089ec Arnaud Pouliquen  2015-06-22  436  	}
32a726b2e089ec Arnaud Pouliquen  2015-06-22  437  
32a726b2e089ec Arnaud Pouliquen  2015-06-22  438  	/* Request the syscon region */
32a726b2e089ec Arnaud Pouliquen  2015-06-22  439  	drvdata->dac.regmap =
32a726b2e089ec Arnaud Pouliquen  2015-06-22  440  		syscon_regmap_lookup_by_phandle(pnode, "st,syscfg");
e27d9ee6e709db Axel Lin          2015-07-13  441  	if (IS_ERR(drvdata->dac.regmap)) {
32a726b2e089ec Arnaud Pouliquen  2015-06-22  442  		dev_err(&pdev->dev, "syscon registers not available\n");
e27d9ee6e709db Axel Lin          2015-07-13  443  		return PTR_ERR(drvdata->dac.regmap);
32a726b2e089ec Arnaud Pouliquen  2015-06-22  444  	}
32a726b2e089ec Arnaud Pouliquen  2015-06-22  445  	drvdata->spdif.regmap = drvdata->dac.regmap;
32a726b2e089ec Arnaud Pouliquen  2015-06-22  446  
32a726b2e089ec Arnaud Pouliquen  2015-06-22  447  	sti_sas_dai[STI_SAS_DAI_ANALOG_OUT].ops = drvdata->dev_data->dac_ops;
32a726b2e089ec Arnaud Pouliquen  2015-06-22  448  
32a726b2e089ec Arnaud Pouliquen  2015-06-22  449  	/* Set dapms*/
049c1bfc30f3a5 Kuninori Morimoto 2018-01-29 @450  	sti_sas_driver.dapm_widgets = drvdata->dev_data->dapm_widgets;
049c1bfc30f3a5 Kuninori Morimoto 2018-01-29 @451  	sti_sas_driver.num_dapm_widgets = drvdata->dev_data->num_dapm_widgets;
32a726b2e089ec Arnaud Pouliquen  2015-06-22  452  
049c1bfc30f3a5 Kuninori Morimoto 2018-01-29 @453  	sti_sas_driver.dapm_routes = drvdata->dev_data->dapm_routes;
049c1bfc30f3a5 Kuninori Morimoto 2018-01-29 @454  	sti_sas_driver.num_dapm_routes = drvdata->dev_data->num_dapm_routes;
32a726b2e089ec Arnaud Pouliquen  2015-06-22  455  
32a726b2e089ec Arnaud Pouliquen  2015-06-22  456  	/* Store context */
32a726b2e089ec Arnaud Pouliquen  2015-06-22  457  	dev_set_drvdata(&pdev->dev, drvdata);
32a726b2e089ec Arnaud Pouliquen  2015-06-22  458  
049c1bfc30f3a5 Kuninori Morimoto 2018-01-29  459  	return devm_snd_soc_register_component(&pdev->dev, &sti_sas_driver,
32a726b2e089ec Arnaud Pouliquen  2015-06-22  460  					sti_sas_dai,
32a726b2e089ec Arnaud Pouliquen  2015-06-22  461  					ARRAY_SIZE(sti_sas_dai));
32a726b2e089ec Arnaud Pouliquen  2015-06-22  462  }
32a726b2e089ec Arnaud Pouliquen  2015-06-22  463  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki




[Index of Archives]     [Pulseaudio]     [Linux Audio Users]     [ALSA Devel]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux