OpenCloudOS-Kernel/drivers/infiniband/hw/mlx4
Leon Romanovsky 36812619d2 RDMA/mlx4: Fix truncated output warning in alias_GUID.c
[ Upstream commit 5953e0647cec703ef436ead37fed48943507b433 ]

drivers/infiniband/hw/mlx4/alias_GUID.c: In function ‘mlx4_ib_init_alias_guid_service’:
drivers/infiniband/hw/mlx4/alias_GUID.c:878:74: error: ‘%d’ directive
output may be truncated writing between 1 and 11 bytes into a region of
size 5 [-Werror=format-truncation=]
  878 |                 snprintf(alias_wq_name, sizeof alias_wq_name, "alias_guid%d", i);
      |                                                                          ^~
drivers/infiniband/hw/mlx4/alias_GUID.c:878:63: note: directive argument in the range [-2147483641, 2147483646]
  878 |                 snprintf(alias_wq_name, sizeof alias_wq_name, "alias_guid%d", i);
      |                                                               ^~~~~~~~~~~~~~
drivers/infiniband/hw/mlx4/alias_GUID.c:878:17: note: ‘snprintf’ output
between 12 and 22 bytes into a destination of size 15
  878 |                 snprintf(alias_wq_name, sizeof alias_wq_name, "alias_guid%d", i);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors

Fixes: a0c64a17ab ("mlx4: Add alias_guid mechanism")
Link: https://lore.kernel.org/r/1951c9500109ca7e36dcd523f8a5f2d0d2a608d1.1718554641.git.leon@kernel.org
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-08-03 08:53:59 +02:00
..
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
ah.c RDMA: Restore ability to fail on AH destroy 2020-09-09 13:57:22 -03:00
alias_GUID.c RDMA/mlx4: Fix truncated output warning in alias_GUID.c 2024-08-03 08:53:59 +02:00
cm.c RDMA/mlx4: Avoid flush_scheduled_work() usage 2022-05-20 11:21:00 -03:00
cq.c RDMA/mlx4: Remove unused parameter udata 2021-05-20 11:52:17 -03:00
doorbell.c RDMA: Use the sg_table directly and remove the opencoded version from umem 2021-08-24 19:52:40 -03:00
mad.c RDMA/mlx4: Fix truncated output warning in mad.c 2024-08-03 08:53:59 +02:00
main.c v6.6 merge window RDMA pull request 2023-09-01 16:49:33 -07:00
mcg.c RDMA: Manual changes for sysfs_emit and neatening 2020-10-30 21:03:52 -03:00
mlx4_ib.h mlx4: Replace the mlx4_interface.event callback with a notifier 2023-08-23 08:25:27 +01:00
mr.c IB: Set IOVA/LENGTH on IB_MR in core/uverbs layers 2022-09-22 12:46:39 +03:00
qp.c RDMA/mlx4: Make check for invalid flags stricter 2023-07-12 15:41:27 +03:00
srq.c RDMA/mlx4: remove redundant assignment to variable nreq 2022-02-01 10:55:43 -04:00
sysfs.c IB/mlx4: Fix the size of a buffer in add_port_entries() 2023-09-23 21:53:24 +03:00