devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Keguang Zhang via B4 Relay
	<devnull+keguang.zhang.gmail.com@kernel.org>,
	Keguang Zhang <keguang.zhang@gmail.com>,
	Vinod Koul <vkoul@kernel.org>, Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>
Cc: oe-kbuild-all@lists.linux.dev, linux-mips@vger.kernel.org,
	dmaengine@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Jiaxun Yang <jiaxun.yang@flygoat.com>
Subject: Re: [PATCH v11 2/2] dmaengine: Loongson1: Add Loongson-1 APB DMA driver
Date: Mon, 5 Aug 2024 12:58:49 +0800	[thread overview]
Message-ID: <202408051242.8kGK28W7-lkp@intel.com> (raw)
In-Reply-To: <20240802-loongson1-dma-v11-2-85392357d4e0@gmail.com>

Hi Keguang,

kernel test robot noticed the following build warnings:

[auto build test WARNING on 048d8cb65cde9fe7534eb4440bcfddcf406bb49c]

url:    https://github.com/intel-lab-lkp/linux/commits/Keguang-Zhang-via-B4-Relay/dt-bindings-dma-Add-Loongson-1-APB-DMA/20240803-111220
base:   048d8cb65cde9fe7534eb4440bcfddcf406bb49c
patch link:    https://lore.kernel.org/r/20240802-loongson1-dma-v11-2-85392357d4e0%40gmail.com
patch subject: [PATCH v11 2/2] dmaengine: Loongson1: Add Loongson-1 APB DMA driver
config: sparc64-randconfig-r063-20240804 (https://download.01.org/0day-ci/archive/20240805/202408051242.8kGK28W7-lkp@intel.com/config)
compiler: sparc64-linux-gcc (GCC) 14.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240805/202408051242.8kGK28W7-lkp@intel.com/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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202408051242.8kGK28W7-lkp@intel.com/

All warnings (new ones prefixed by >>):

   drivers/dma/loongson1-apb-dma.c: In function 'ls1x_dma_chan_probe':
>> drivers/dma/loongson1-apb-dma.c:520:34: warning: '%u' directive writing between 1 and 10 bytes into a region of size 2 [-Wformat-overflow=]
     520 |         sprintf(pdev_irqname, "ch%u", chan_id);
         |                                  ^~
   drivers/dma/loongson1-apb-dma.c:520:31: note: directive argument in the range [0, 2147483646]
     520 |         sprintf(pdev_irqname, "ch%u", chan_id);
         |                               ^~~~~~
   drivers/dma/loongson1-apb-dma.c:520:9: note: 'sprintf' output between 4 and 13 bytes into a destination of size 4
     520 |         sprintf(pdev_irqname, "ch%u", chan_id);
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


vim +520 drivers/dma/loongson1-apb-dma.c

   510	
   511	static int ls1x_dma_chan_probe(struct platform_device *pdev,
   512				       struct ls1x_dma *dma, int chan_id)
   513	{
   514		struct device *dev = &pdev->dev;
   515		struct ls1x_dma_chan *chan = &dma->chan[chan_id];
   516		char pdev_irqname[4];
   517		char *irqname;
   518		int ret;
   519	
 > 520		sprintf(pdev_irqname, "ch%u", chan_id);
   521		chan->irq = platform_get_irq_byname(pdev, pdev_irqname);
   522		if (chan->irq < 0)
   523			return -ENODEV;
   524	
   525		irqname = devm_kasprintf(dev, GFP_KERNEL, "%s:%s",
   526					 dev_name(dev), pdev_irqname);
   527		if (!irqname)
   528			return -ENOMEM;
   529	
   530		ret = devm_request_irq(dev, chan->irq, ls1x_dma_irq_handler,
   531				       IRQF_SHARED, irqname, chan);
   532		if (ret)
   533			return dev_err_probe(dev, ret, "failed to request IRQ %u\n",
   534					     chan->irq);
   535	
   536		chan->reg_base = dma->reg_base;
   537		chan->vchan.desc_free = ls1x_dma_free_desc;
   538		vchan_init(&chan->vchan, &dma->ddev);
   539		dev_info(dev, "%s (irq %d) initialized\n", pdev_irqname, chan->irq);
   540	
   541		return 0;
   542	}
   543	

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

  reply	other threads:[~2024-08-05  4:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-02 11:08 [PATCH v11 0/2] Add support for Loongson1 APB DMA Keguang Zhang via B4 Relay
2024-08-02 11:08 ` [PATCH v11 1/2] dt-bindings: dma: Add Loongson-1 " Keguang Zhang via B4 Relay
2024-08-02 11:08 ` [PATCH v11 2/2] dmaengine: Loongson1: Add Loongson-1 APB DMA driver Keguang Zhang via B4 Relay
2024-08-05  4:58   ` kernel test robot [this message]
2024-08-05 16:40     ` Vinod Koul
2024-08-06  2:07       ` Keguang Zhang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202408051242.8kGK28W7-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=devnull+keguang.zhang.gmail.com@kernel.org \
    --cc=dmaengine@vger.kernel.org \
    --cc=jiaxun.yang@flygoat.com \
    --cc=keguang.zhang@gmail.com \
    --cc=krzk@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=robh@kernel.org \
    --cc=vkoul@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).