Thread (18 messages) flat view 18 messages, 4 authors, 2025-09-17

Re: [PATCH 2/8] RDMA/bng_re: Add Auxiliary interface

From: Simon Horman <horms@kernel.org>
Date: 2025-09-16 12:34:16
Also in: linux-rdma

On Fri, Aug 29, 2025 at 12:30:36PM +0000, Siva Reddy Kallam wrote:
Add basic Auxiliary interface to the driver which supports
the BCM5770X NIC family.

Signed-off-by: Siva Reddy Kallam <siva.kallam@broadcom.com>
Reviewed-by: Usman Ansari <redacted>
...
quoted hunk ↗ jump to hunk
diff --git a/drivers/infiniband/hw/bng_re/bng_dev.c b/drivers/infiniband/hw/bng_re/bng_dev.c
...
+static int bng_re_add_device(struct auxiliary_device *adev)
+{
+	struct bnge_auxr_priv *auxr_priv =
+		container_of(adev, struct bnge_auxr_priv, aux_dev);
+	struct bng_re_en_dev_info *dev_info;
+	struct bng_re_dev *rdev;
+	int rc;
+
+	dev_info = auxiliary_get_drvdata(adev);
+
+	rdev = bng_re_dev_add(adev, auxr_priv->auxr_dev);
+	if (!rdev || !rdev_to_dev(rdev)) {
Hi Siva,

Sorry if somehow this is a duplicate, it got stuck in my outbox somehow.

GCC 15.1.0 says:

  .../bng_dev.c: In function 'bng_re_add_device':
  .../bng_dev.c:54:22: warning: the comparison will always evaluate as 'true' for the address of 'dev' will never be NULL [-Waddress]
     54 |         if (!rdev || !rdev_to_dev(rdev)) {
        |                      ^
  In file included from drivers/infiniband/hw/bng_re/bng_dev.c:8:
  ./include/rdma/ib_verbs.h:2812:41: note: 'dev' declared here
   2812 |                 struct device           dev;
        |
+		rc = -ENOMEM;
+		goto exit;
+	}
+
+	dev_info->rdev = rdev;
+
+	return 0;
+exit:
+	return rc;
+}
...
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help