Re: [PATCHv4] ASoC: xilinx: formatter_pcm: use more devm in probe

kernel test robot <[email protected]>
Newsgroups dev.linux.lists.oe-kbuild-all,org.infradead.lists.linux-arm-kernel,org.kernel.vger.linux-kernel,org.kernel.vger.linux-sound
Message-ID <[email protected]>
Hi Rosen,

kernel test robot noticed the following build errors:

[auto build test ERROR on v7.2]
[also build test ERROR on linus/master next-20260821]
[cannot apply to xilinx-xlnx/master]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Rosen-Penev/ASoC-xilinx-formatter_pcm-use-more-devm-in-probe/20260822-220012
base:   v7.2
patch link:    https://lore.kernel.org/r/20260823050012.17067-1-rosenp%40gmail.com
patch subject: [PATCHv4] ASoC: xilinx: formatter_pcm: use more devm in probe
config: csky-allmodconfig (https://download.01.org/0day-ci/archive/20260825/[email protected]/config)
compiler: csky-linux-gcc (GCC) 16.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260825/[email protected]/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 <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

All errors (new ones prefixed by >>):

   sound/soc/xilinx/xlnx_formatter_pcm.c: In function 'xlnx_formatter_pcm_probe':
>> sound/soc/xilinx/xlnx_formatter_pcm.c:632:51: error: passing argument 2 of 'dev_err_probe' makes integer from pointer without a cast [-Wint-conversion]
     632 |                         return dev_err_probe(dev, "audio formatter reset failed\n");
         |                                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         |                                                   |
         |                                                   char *
   In file included from include/linux/device.h:15,
                    from include/sound/soc.h:15,
                    from sound/soc/xilinx/xlnx_formatter_pcm.c:17:
   include/linux/dev_printk.h:278:64: note: expected 'int' but argument is of type 'char *'
     278 | __printf(3, 4) int dev_err_probe(const struct device *dev, int err, const char *fmt, ...);
         |                                                            ~~~~^~~
>> sound/soc/xilinx/xlnx_formatter_pcm.c:632:32: error: too few arguments to function 'dev_err_probe'; expected at least 3, have 2
     632 |                         return dev_err_probe(dev, "audio formatter reset failed\n");
         |                                ^~~~~~~~~~~~~
   include/linux/dev_printk.h:278:20: note: declared here
     278 | __printf(3, 4) int dev_err_probe(const struct device *dev, int err, const char *fmt, ...);
         |                    ^~~~~~~~~~~~~


vim +/dev_err_probe +632 sound/soc/xilinx/xlnx_formatter_pcm.c

   584	
   585	static int xlnx_formatter_pcm_probe(struct platform_device *pdev)
   586	{
   587		int ret;
   588		u32 val;
   589		struct xlnx_pcm_drv_data *aud_drv_data;
   590		struct device *dev = &pdev->dev;
   591		struct clk *axi_clk;
   592	
   593		axi_clk = devm_clk_get_enabled(dev, "s_axi_lite_aclk");
   594		if (IS_ERR(axi_clk))
   595			return dev_err_probe(dev, PTR_ERR(axi_clk), "failed to get s_axi_lite_aclk");
   596	
   597		aud_drv_data = devm_kzalloc(dev, sizeof(*aud_drv_data), GFP_KERNEL);
   598		if (!aud_drv_data)
   599			return -ENOMEM;
   600	
   601		aud_drv_data->mmio = devm_platform_ioremap_resource(pdev, 0);
   602		if (IS_ERR(aud_drv_data->mmio))
   603			return PTR_ERR(aud_drv_data->mmio);
   604	
   605		val = readl(aud_drv_data->mmio + XLNX_AUD_CORE_CONFIG);
   606		if (val & AUD_CFG_MM2S_MASK) {
   607			aud_drv_data->mm2s_presence = true;
   608			ret = xlnx_formatter_pcm_reset(aud_drv_data->mmio +
   609						       XLNX_MM2S_OFFSET);
   610			if (ret)
   611				return dev_err_probe(dev, ret, "audio formatter reset failed\n");
   612			xlnx_formatter_disable_irqs(aud_drv_data->mmio +
   613						    XLNX_MM2S_OFFSET,
   614						    SNDRV_PCM_STREAM_PLAYBACK);
   615	
   616			aud_drv_data->mm2s_irq = platform_get_irq_byname(pdev,
   617									 "irq_mm2s");
   618			if (aud_drv_data->mm2s_irq < 0)
   619				return aud_drv_data->mm2s_irq;
   620	
   621			ret = devm_request_irq(dev, aud_drv_data->mm2s_irq,
   622					       xlnx_mm2s_irq_handler, 0,
   623					       "xlnx_formatter_pcm_mm2s_irq", aud_drv_data);
   624			if (ret)
   625				return ret;
   626		}
   627		if (val & AUD_CFG_S2MM_MASK) {
   628			aud_drv_data->s2mm_presence = true;
   629			ret = xlnx_formatter_pcm_reset(aud_drv_data->mmio +
   630						       XLNX_S2MM_OFFSET);
   631			if (ret)
 > 632				return dev_err_probe(dev, "audio formatter reset failed\n");
   633			xlnx_formatter_disable_irqs(aud_drv_data->mmio +
   634						    XLNX_S2MM_OFFSET,
   635						    SNDRV_PCM_STREAM_CAPTURE);
   636	
   637			aud_drv_data->s2mm_irq = platform_get_irq_byname(pdev,
   638									 "irq_s2mm");
   639			if (aud_drv_data->s2mm_irq < 0)
   640				return aud_drv_data->s2mm_irq;
   641	
   642			ret = devm_request_irq(dev, aud_drv_data->s2mm_irq,
   643					       xlnx_s2mm_irq_handler, 0,
   644					       "xlnx_formatter_pcm_s2mm_irq",
   645					       aud_drv_data);
   646			if (ret)
   647				return ret;
   648		}
   649	
   650		dev_set_drvdata(dev, aud_drv_data);
   651	
   652		return devm_snd_soc_register_component(dev, &xlnx_asoc_component, NULL, 0);
   653	}
   654	

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.