Received: by 2002:ab2:1c04:0:b0:1f7:53ba:1ebe with SMTP id f4csp116308lqg; Fri, 26 Apr 2024 10:12:20 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUHTl51MAJ1iWjd/NXce0mNN8N99M1F4aUY2/TugKxrce8DJovqusQaXEsH2zxbLnb2BEfaaLp1FEtkbIkhBmu07RV35K1KdBEXdPPNjA== X-Google-Smtp-Source: AGHT+IE5vAi2SZg9my0NOUo3IgpC6okskYYk9H3pxVhNNnEX6EChZi5p4+Y0nb+PbDbTrvYP2j2w X-Received: by 2002:a50:bb0c:0:b0:56b:a03c:4eb with SMTP id y12-20020a50bb0c000000b0056ba03c04ebmr3364051ede.31.1714151540704; Fri, 26 Apr 2024 10:12:20 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714151540; cv=pass; d=google.com; s=arc-20160816; b=p8TESUqbyCkIi6Evsp0RI6wRBywsdFml6uDT3iCkgRGv/zabyHirkQtnNH1GYme1VT rR60PDzOGczeWSD20groEt5WTzEsR4nuZzYcu6JC32E1yQlO8ZhcLwEj5kpcVs1owNHK sdrCPOjqcN09eaJxbtTZR6UrMp6ABl1Kl5DvDcxGaSH+AoNxUcQuBHgkhr+7tvY99Tkb eF47R94zEeX/pxk1AIEoNHuAYFDiVP03xhm/WdqeLAY+gLlDPML94IMlRGmVglJS5/vi WutB5cUzTdy7SN86H/3TImqFoE3nYeAjD8IcKiIRk6QWTv1l26zd/AgTXyZ4o+mS4JqU q/5A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-disposition:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:message-id:subject:cc:to:from:date :dkim-signature; bh=pfQAvXlvkAg4gJWjEaHJGdyWM/JtV10Eqluv7pVi70I=; fh=cn533Ylr0ka3K9tQ4Q9NLoT1iDPL/ZYJUzhRww49yg8=; b=Gjej/0QB3g4k3WowkMxct7H2WwH4/hoRKDcIlvt4wJnUqY5/v2B3M50run1hLoPZym VJophCTYUHJEd05tkys8fEz9ewt6T2SzzdnaGgeXolkxtb/Uy7TQOkw8izWJw3iaSRGp ux/pmxtiOxFp4oFEN4O2oSreDEfi4wsVKvLkDa2E+PZ76K5od76Uz6OyhIn7si9LRM9Q djKh1toJs7NuD5l6eFqkjZgGJAFbzJJNlwht/sINnhNMaSY48N5HxQXm9dwSCudKgi9q nNOj1r7hKsHzXR4UdMOLmo/G4HDfOVXgNvzMV2xjXQ2vA+0pPCKonNQkqG/Zm4u8fRx3 QRjA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=KZ7m4PVa; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-160451-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-160451-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id 26-20020a508e1a000000b0056e1193a35dsi10872748edw.257.2024.04.26.10.12.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Apr 2024 10:12:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-160451-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=KZ7m4PVa; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-160451-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-160451-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id C1F281F238DC for ; Fri, 26 Apr 2024 17:12:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AFA3915B15E; Fri, 26 Apr 2024 17:12:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="KZ7m4PVa" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 270B915AACD for ; Fri, 26 Apr 2024 17:12:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.11 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714151523; cv=none; b=OxgGoVL+59ckNID/l/bJGe5df/Aw/0stmZl9vOWvQxJWQhU9Q+B2eIZZ9qWbjUh08DrADCuHD1oljZmHbD287aVidYSyD2m5zv2go7q8rarO3EXU2mbftyW3Jbpe2u3hLmUlEov6qRdhwqEnPYSq6LHu8nt54gAOKbn4l65usno= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714151523; c=relaxed/simple; bh=3Pd/l/+E5Qm5+7Ld6em+fLyRN0LjhCMbADm7ZQPuL/w=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition; b=sG3QfWChVTKgW+QJKafhgkKP0A32r5ula/fy1YuLa2fIZUlODpSz+696kPa+1tSrssdH0PUjc5HGlC6+ccyPM/uFVTxnrmEKGDw2hRNR94jEcVqf/CJpksulTDGk1sLLmpGvs6GCwlHxVIRTDr+p/1cqtgV76q6OhemgpEYxiE4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=KZ7m4PVa; arc=none smtp.client-ip=198.175.65.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1714151522; x=1745687522; h=date:from:to:cc:subject:message-id:mime-version; bh=3Pd/l/+E5Qm5+7Ld6em+fLyRN0LjhCMbADm7ZQPuL/w=; b=KZ7m4PVaAxVVQNDBQnwBmaMjEl261TCRY/Iycqko/Pyc63UgvFNt26Dl i2KbbOL+EUdfIrM9dk0Dg/5eR5AHCNfWrGWwKtyJuD4RJ/ok8R0jT0b/H IQ6gDX5n2yuYnEfIj86LFImQmTDwLqfj055jYcfqI4MmvS5Gexon3uT8J 8QZS9aC6rLD/Y2K0qp1oxLO6SQNE08kal5vB8fbOR4aczh4alSFk7iu80 G4u3ar1pzmsIAhtS1hJULWw45GcEgXknskKf8tlZQLwACZrTIMMxQDjQE QEzN80OkqjizIMNWdI2Ynozbwa1Q2+1TqDEZaeqGbvCcDU3yMAFXggKGq g==; X-CSE-ConnectionGUID: xYK1N6ntSjSzj4bjCZZz6Q== X-CSE-MsgGUID: 4raaSl2nS+GvEbBkROUMOA== X-IronPort-AV: E=McAfee;i="6600,9927,11056"; a="20449274" X-IronPort-AV: E=Sophos;i="6.07,233,1708416000"; d="scan'208";a="20449274" Received: from fmviesa009.fm.intel.com ([10.60.135.149]) by orvoesa103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Apr 2024 10:12:02 -0700 X-CSE-ConnectionGUID: 7A0i5Nk8R1SFT6S1ocLM+Q== X-CSE-MsgGUID: YZxipWCARm25Dx49Iw6AIg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,233,1708416000"; d="scan'208";a="25451311" Received: from lkp-server01.sh.intel.com (HELO e434dd42e5a1) ([10.239.97.150]) by fmviesa009.fm.intel.com with ESMTP; 26 Apr 2024 10:12:00 -0700 Received: from kbuild by e434dd42e5a1 with local (Exim 4.96) (envelope-from ) id 1s0P77-0003zy-2O; Fri, 26 Apr 2024 17:11:57 +0000 Date: Sat, 27 Apr 2024 01:11:10 +0800 From: kernel test robot To: Serge Semin Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org, Bjorn Helgaas , Lorenzo Pieralisi , Manivannan Sadhasivam Subject: drivers/pci/controller/dwc/pcie-designware.c:898:50: error: '%d' directive output may be truncated writing between 1 and 11 bytes into a region of size 3 Message-ID: <202404270143.m5ItVzEF-lkp@intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi Serge, FYI, the error/warning still remains. tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: c942a0cd3603e34dd2d7237e064d9318cb7f9654 commit: 939fbcd568fd294034c96edc92ff5b9de1a5fce8 PCI: dwc: Add Root Port and Endpoint controller eDMA engine support date: 1 year, 2 months ago config: x86_64-sof-customedconfig-bpf-defconfig (https://download.01.org/0day-ci/archive/20240427/202404270143.m5ItVzEF-lkp@intel.com/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/20240427/202404270143.m5ItVzEF-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 | Closes: https://lore.kernel.org/oe-kbuild-all/202404270143.m5ItVzEF-lkp@intel.com/ All errors (new ones prefixed by >>): drivers/pci/controller/dwc/pcie-designware.c: In function 'dw_pcie_edma_detect': >> drivers/pci/controller/dwc/pcie-designware.c:898:50: error: '%d' directive output may be truncated writing between 1 and 11 bytes into a region of size 3 [-Werror=format-truncation=] 898 | snprintf(name, sizeof(name), "dma%d", pci->edma.nr_irqs); | ^~ In function 'dw_pcie_edma_irq_verify', inlined from 'dw_pcie_edma_detect' at drivers/pci/controller/dwc/pcie-designware.c:949:8: drivers/pci/controller/dwc/pcie-designware.c:898:46: note: directive argument in the range [-2147483648, 15] 898 | snprintf(name, sizeof(name), "dma%d", pci->edma.nr_irqs); | ^~~~~~~ drivers/pci/controller/dwc/pcie-designware.c:898:17: note: 'snprintf' output between 5 and 15 bytes into a destination of size 6 898 | snprintf(name, sizeof(name), "dma%d", pci->edma.nr_irqs); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors vim +898 drivers/pci/controller/dwc/pcie-designware.c 878 879 static int dw_pcie_edma_irq_verify(struct dw_pcie *pci) 880 { 881 struct platform_device *pdev = to_platform_device(pci->dev); 882 u16 ch_cnt = pci->edma.ll_wr_cnt + pci->edma.ll_rd_cnt; 883 char name[6]; 884 int ret; 885 886 if (pci->edma.nr_irqs == 1) 887 return 0; 888 else if (pci->edma.nr_irqs > 1) 889 return pci->edma.nr_irqs != ch_cnt ? -EINVAL : 0; 890 891 ret = platform_get_irq_byname_optional(pdev, "dma"); 892 if (ret > 0) { 893 pci->edma.nr_irqs = 1; 894 return 0; 895 } 896 897 for (; pci->edma.nr_irqs < ch_cnt; pci->edma.nr_irqs++) { > 898 snprintf(name, sizeof(name), "dma%d", pci->edma.nr_irqs); 899 900 ret = platform_get_irq_byname_optional(pdev, name); 901 if (ret <= 0) 902 return -EINVAL; 903 } 904 905 return 0; 906 } 907 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki