* 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
@ 2024-08-29 3:54 kernel test robot
0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2024-08-29 3:54 UTC (permalink / raw)
To: Serge Semin
Cc: oe-kbuild-all, linux-kernel, Bjorn Helgaas, Lorenzo Pieralisi,
Manivannan Sadhasivam
Hi Serge,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: d5d547aa7b51467b15d9caa86b116f8c2507c72a
commit: 939fbcd568fd294034c96edc92ff5b9de1a5fce8 PCI: dwc: Add Root Port and Endpoint controller eDMA engine support
date: 1 year, 6 months ago
config: x86_64-sof-customedconfig-atom-defconfig (https://download.01.org/0day-ci/archive/20240829/202408291130.0S7KrQvL-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240829/202408291130.0S7KrQvL-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/202408291130.0S7KrQvL-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, 22]
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
^ permalink raw reply [flat|nested] 3+ messages in thread* 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
@ 2024-04-26 17:11 kernel test robot
0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2024-04-26 17:11 UTC (permalink / raw)
To: Serge Semin
Cc: oe-kbuild-all, linux-kernel, Bjorn Helgaas, Lorenzo Pieralisi,
Manivannan Sadhasivam
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 <lkp@intel.com>
| 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
^ permalink raw reply [flat|nested] 3+ messages in thread* 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
@ 2023-11-04 10:58 kernel test robot
0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2023-11-04 10:58 UTC (permalink / raw)
To: Serge Semin
Cc: oe-kbuild-all, linux-kernel, Bjorn Helgaas, Lorenzo Pieralisi,
Manivannan Sadhasivam
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 90b0c2b2edd1adff742c621e246562fbefa11b70
commit: 939fbcd568fd294034c96edc92ff5b9de1a5fce8 PCI: dwc: Add Root Port and Endpoint controller eDMA engine support
date: 9 months ago
config: x86_64-sof-customedconfig-edison-defconfig (https://download.01.org/0day-ci/archive/20231104/202311041813.mTp23LXm-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231104/202311041813.mTp23LXm-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/202311041813.mTp23LXm-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, 22]
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-08-29 3:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-29 3:54 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 kernel test robot
-- strict thread matches above, loose matches on Subject: below --
2024-04-26 17:11 kernel test robot
2023-11-04 10:58 kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.