summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2026-06-02 16:04:34 +0200
committerJason Gunthorpe <jgg@nvidia.com>2026-06-05 12:38:42 -0300
commit0ee8ac903e5aa100a70bef8d0afc19a336ffa775 (patch)
tree27a8b491a016ee14e5c57fbc2f10a65339c50b5b /include
parent55d984dae65262fbb0a673cff7cc9824a5e19bdb (diff)
downloadlwn-0ee8ac903e5aa100a70bef8d0afc19a336ffa775.tar.gz
lwn-0ee8ac903e5aa100a70bef8d0afc19a336ffa775.zip
RDMA/hfi1: Open-code rvt_set_ibdev_name()
clang warns about a function missing a printf attribute: include/rdma/rdma_vt.h:457:47: error: diagnostic behavior may be improved by adding the 'format(printf, 2, 3)' attribute to the declaration of 'rvt_set_ibdev_name' [-Werror,-Wmissing-format-attribute] 447 | static inline void rvt_set_ibdev_name(struct rvt_dev_info *rdi, | __attribute__((format(printf, 2, 3))) 448 | const char *fmt, const char *name, 449 | const int unit) The helper was originally added as an abstraction for the hfi1 and qib drivers needing the same thing, but now qib is gone, and hfi1 is the only remaining user of rdma_vt. Avoid the warning and allow the compiler to check the format string by open-coding the helper and directly assigning the device name. Fixes: 5084c8ff21f2 ("IB/{rdmavt, hfi1, qib}: Self determine driver name") Link: https://patch.msgid.link/r/20260602140453.3542427-1-arnd@kernel.org Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Kees Cook <kees@kernel.org> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'include')
-rw-r--r--include/rdma/rdma_vt.h20
1 files changed, 0 insertions, 20 deletions
diff --git a/include/rdma/rdma_vt.h b/include/rdma/rdma_vt.h
index 7d8de561f71b..7ffc83262a01 100644
--- a/include/rdma/rdma_vt.h
+++ b/include/rdma/rdma_vt.h
@@ -439,26 +439,6 @@ struct rvt_dev_info {
};
/**
- * rvt_set_ibdev_name - Craft an IB device name from client info
- * @rdi: pointer to the client rvt_dev_info structure
- * @name: client specific name
- * @unit: client specific unit number.
- */
-static inline void rvt_set_ibdev_name(struct rvt_dev_info *rdi,
- const char *fmt, const char *name,
- const int unit)
-{
- /*
- * FIXME: rvt and its users want to touch the ibdev before
- * registration and have things like the name work. We don't have the
- * infrastructure in the core to support this directly today, hack it
- * to work by setting the name manually here.
- */
- dev_set_name(&rdi->ibdev.dev, fmt, name, unit);
- strscpy(rdi->ibdev.name, dev_name(&rdi->ibdev.dev), IB_DEVICE_NAME_MAX);
-}
-
-/**
* rvt_get_ibdev_name - return the IB name
* @rdi: rdmavt device
*