Re: [PATCH v1 1/1] iommu/vt-d: Increase buffer size for device name

From: Baolu Lu
Date: Tue Oct 29 2024 - 00:40:44 EST


On 2024/10/14 18:45, Andy Shevchenko wrote:
GCC is not happy with the current code, e.g.:

.../iommu/intel/dmar.c:1063:9: note: ‘sprintf’ output between 6 and 15 bytes into a destination of size 13
1063 | sprintf(iommu->name, "dmar%d", iommu->seq_id);

When `make W=1` is supplied, this prevents kernel building. Fix it by
increasing the buffer size for device name and use sizeoF() instead of
hard coded constants.

Signed-off-by: Andy Shevchenko<andriy.shevchenko@xxxxxxxxxxxxxxx>
---
drivers/iommu/intel/dmar.c | 2 +-
drivers/iommu/intel/iommu.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

Queued for v6.13. Thank you!

--
baolu