netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Simon Horman <horms@kernel.org>
To: Siva Reddy Kallam <siva.kallam@broadcom.com>
Cc: leonro@nvidia.com, jgg@nvidia.com, linux-rdma@vger.kernel.org,
	netdev@vger.kernel.org, vikas.gupta@broadcom.com,
	selvin.xavier@broadcom.com, anand.subramanian@broadcom.com,
	Usman Ansari <usman.ansari@broadcom.com>
Subject: Re: [PATCH 2/8] RDMA/bng_re: Add Auxiliary interface
Date: Tue, 16 Sep 2025 13:34:12 +0100	[thread overview]
Message-ID: <20250916123412.GZ224143@horms.kernel.org> (raw)
In-Reply-To: <20250829123042.44459-3-siva.kallam@broadcom.com>

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 <usman.ansari@broadcom.com>

...

> 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;
> +}

...

  reply	other threads:[~2025-09-16 12:34 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-29 12:30 [PATCH 0/8] Introducing Broadcom BNG_RE RoCE Driver Siva Reddy Kallam
2025-08-29 12:30 ` [PATCH 1/8] bng_en: Add RoCE aux device support Siva Reddy Kallam
2025-09-01 19:10   ` Jakub Kicinski
2025-08-29 12:30 ` [PATCH 2/8] RDMA/bng_re: Add Auxiliary interface Siva Reddy Kallam
2025-09-16 12:34   ` Simon Horman [this message]
2025-09-17  9:17     ` Siva Reddy Kallam
2025-08-29 12:30 ` [PATCH 3/8] RDMA/bng_re: Register and get the resources from bnge driver Siva Reddy Kallam
2025-08-29 12:30 ` [PATCH 4/8] RDMA/bng_re: Allocate required memory resources for Firmware channel Siva Reddy Kallam
2025-08-29 12:30 ` [PATCH 5/8] RDMA/bng_re: Add infrastructure for enabling " Siva Reddy Kallam
2025-09-12  8:39   ` Simon Horman
2025-09-15  8:44     ` Siva Reddy Kallam
2025-09-15  9:00       ` Leon Romanovsky
2025-09-15 10:09         ` Siva Reddy Kallam
2025-08-29 12:30 ` [PATCH 6/8] RDMA/bng_re: Enable Firmware channel and query device attributes Siva Reddy Kallam
2025-09-12  8:42   ` Simon Horman
2025-09-15  8:46     ` Siva Reddy Kallam
2025-08-29 12:30 ` [PATCH 7/8] RDMA/bng_re: Add basic debugfs infrastructure Siva Reddy Kallam
2025-08-29 12:30 ` [PATCH 8/8] RDMA/bng_re: Initialize the Firmware and Hardware Siva Reddy Kallam

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250916123412.GZ224143@horms.kernel.org \
    --to=horms@kernel.org \
    --cc=anand.subramanian@broadcom.com \
    --cc=jgg@nvidia.com \
    --cc=leonro@nvidia.com \
    --cc=linux-rdma@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=selvin.xavier@broadcom.com \
    --cc=siva.kallam@broadcom.com \
    --cc=usman.ansari@broadcom.com \
    --cc=vikas.gupta@broadcom.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).