drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c:237:56: warning: '%u' directive output may be truncated writing between 1 and 5 bytes into a region of size between 3 and 11
kernel test robot
build bottree: https://git.kernel.org/pub/scm/linux/kernel/git/will/linux.git for-joerg/arm-smmu/updates head: 070e326f327a8d32669b5bf9b50a12c2cd8277ff commit: 918eb5c856f6ce4cf93b4b38e4b5e156905c5943 [13/17] iommu/arm-smmu-v3: Add in-kernel support for NVIDIA Tegra241 (Grace) CMDQV config: arm64-randconfig-004-20240902 (https://download.01.org/0day-ci/archive/20240902/[email protected]/config) compiler: aarch64-linux-gcc (GCC) 14.1.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240902/[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 warnings (new ones prefixed by >>):
drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c: In function 'tegra241_vintf_alloc_lvcmdq':
>> drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c:237:56: warning: '%u' directive output may be truncated writing between 1 and 5 bytes into a region of size between 3 and 11 [-Wformat-truncation=]
237 | snprintf(header, hlen, "VINTF%u: VCMDQ%u/LVCMDQ%u: ",
| ^~
In function 'lvcmdq_error_header',
inlined from 'tegra241_vintf_alloc_lvcmdq' at drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c:557:2:
drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c:237:32: note: directive argument in the range [0, 65535]
237 | snprintf(header, hlen, "VINTF%u: VCMDQ%u/LVCMDQ%u: ",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c:237:9: note: 'snprintf' output between 25 and 37 bytes into a destination of size 32
237 | snprintf(header, hlen, "VINTF%u: VCMDQ%u/LVCMDQ%u: ",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
238 | vcmdq->vintf->idx, vcmdq->idx, vcmdq->lidx);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c: In function 'tegra241_vintf_free_lvcmdq':
>> drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c:237:56: warning: '%u' directive output may be truncated writing between 1 and 5 bytes into a region of size between 3 and 11 [-Wformat-truncation=]
237 | snprintf(header, hlen, "VINTF%u: VCMDQ%u/LVCMDQ%u: ",
| ^~
In function 'lvcmdq_error_header',
inlined from 'tegra241_vintf_free_lvcmdq' at drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c:531:2:
drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c:237:32: note: directive argument in the range [0, 65535]
237 | snprintf(header, hlen, "VINTF%u: VCMDQ%u/LVCMDQ%u: ",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c:237:9: note: 'snprintf' output between 25 and 37 bytes into a destination of size 32
237 | snprintf(header, hlen, "VINTF%u: VCMDQ%u/LVCMDQ%u: ",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
238 | vcmdq->vintf->idx, vcmdq->idx, vcmdq->lidx);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c: In function 'tegra241_vcmdq_hw_deinit':
>> drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c:237:56: warning: '%u' directive output may be truncated writing between 1 and 5 bytes into a region of size between 3 and 11 [-Wformat-truncation=]
237 | snprintf(header, hlen, "VINTF%u: VCMDQ%u/LVCMDQ%u: ",
| ^~
In function 'lvcmdq_error_header',
inlined from 'tegra241_vcmdq_hw_deinit' at drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c:338:24:
drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c:237:32: note: directive argument in the range [0, 65535]
237 | snprintf(header, hlen, "VINTF%u: VCMDQ%u/LVCMDQ%u: ",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c:237:9: note: 'snprintf' output between 25 and 37 bytes into a destination of size 32
237 | snprintf(header, hlen, "VINTF%u: VCMDQ%u/LVCMDQ%u: ",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
238 | vcmdq->vintf->idx, vcmdq->idx, vcmdq->lidx);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c: In function 'tegra241_vcmdq_hw_deinit':
>> drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c:237:56: warning: '%u' directive output may be truncated writing between 1 and 5 bytes into a region of size between 3 and 11 [-Wformat-truncation=]
237 | snprintf(header, hlen, "VINTF%u: VCMDQ%u/LVCMDQ%u: ",
| ^~
In function 'lvcmdq_error_header',
inlined from 'vcmdq_write_config' at drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c:244:24,
inlined from 'tegra241_vcmdq_hw_deinit' at drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c:341:6:
drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c:237:32: note: directive argument in the range [0, 65535]
237 | snprintf(header, hlen, "VINTF%u: VCMDQ%u/LVCMDQ%u: ",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c:237:9: note: 'snprintf' output between 25 and 37 bytes into a destination of size 32
237 | snprintf(header, hlen, "VINTF%u: VCMDQ%u/LVCMDQ%u: ",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
238 | vcmdq->vintf->idx, vcmdq->idx, vcmdq->lidx);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c: In function 'tegra241_vintf_hw_init.constprop':
>> drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c:237:56: warning: '%u' directive output may be truncated writing between 1 and 5 bytes into a region of size between 3 and 11 [-Wformat-truncation=]
237 | snprintf(header, hlen, "VINTF%u: VCMDQ%u/LVCMDQ%u: ",
| ^~
In function 'lvcmdq_error_header',
inlined from 'tegra241_vcmdq_hw_init' at drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c:366:24,
inlined from 'tegra241_vintf_hw_init.constprop' at drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c:418:10:
drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c:237:32: note: directive argument in the range [0, 65535]
237 | snprintf(header, hlen, "VINTF%u: VCMDQ%u/LVCMDQ%u: ",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c:237:9: note: 'snprintf' output between 25 and 37 bytes into a destination of size 32
237 | snprintf(header, hlen, "VINTF%u: VCMDQ%u/LVCMDQ%u: ",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
238 | vcmdq->vintf->idx, vcmdq->idx, vcmdq->lidx);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c: In function 'tegra241_vintf_hw_init.constprop':
>> drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c:237:56: warning: '%u' directive output may be truncated writing between 1 and 5 bytes into a region of size between 3 and 11 [-Wformat-truncation=]
237 | snprintf(header, hlen, "VINTF%u: VCMDQ%u/LVCMDQ%u: ",
| ^~
In function 'lvcmdq_error_header',
inlined from 'vcmdq_write_config' at drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c:244:24,
inlined from 'tegra241_vcmdq_hw_init' at drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c:375:8,
inlined from 'tegra241_vintf_hw_init.constprop' at drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c:418:10:
drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c:237:32: note: directive argument in the range [0, 65535]
237 | snprintf(header, hlen, "VINTF%u: VCMDQ%u/LVCMDQ%u: ",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c:237:9: note: 'snprintf' output between 25 and 37 bytes into a destination of size 32
237 | snprintf(header, hlen, "VINTF%u: VCMDQ%u/LVCMDQ%u: ",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
238 | vcmdq->vintf->idx, vcmdq->idx, vcmdq->lidx);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~vim +237 drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c
230
231 static inline char *lvcmdq_error_header(struct tegra241_vcmdq *vcmdq,
232 char *header, int hlen)
233 {
234 WARN_ON(hlen < 32);
235 if (WARN_ON(!vcmdq->vintf))
236 return "";
> 237 snprintf(header, hlen, "VINTF%u: VCMDQ%u/LVCMDQ%u: ",
238 vcmdq->vintf->idx, vcmdq->idx, vcmdq->lidx);
239 return header;
240 }
241
Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki