From: Dave Jiang <dave.jiang@intel.com>
To: Shannon Nelson <shannon.nelson@amd.com>,
jgg@nvidia.com, andrew.gospodarek@broadcom.com,
aron.silverton@oracle.com, dan.j.williams@intel.com,
daniel.vetter@ffwll.ch, dsahern@kernel.org,
gregkh@linuxfoundation.org, hch@infradead.org,
itayavr@nvidia.com, jiri@nvidia.com, Jonathan.Cameron@huawei.com,
kuba@kernel.org, lbloch@nvidia.com, leonro@nvidia.com,
linux-cxl@vger.kernel.org, linux-rdma@vger.kernel.org,
netdev@vger.kernel.org, saeedm@nvidia.com
Cc: brett.creeley@amd.com
Subject: Re: [PATCH v3 1/6] pds_core: make pdsc_auxbus_dev_del() void
Date: Mon, 10 Mar 2025 09:58:03 -0700 [thread overview]
Message-ID: <a3b9c248-94de-4237-8ab4-f425bfc66258@intel.com> (raw)
In-Reply-To: <20250307185329.35034-2-shannon.nelson@amd.com>
On 3/7/25 11:53 AM, Shannon Nelson wrote:
> Since there really is no useful return, advertising a return value
> is rather misleading. Make pdsc_auxbus_dev_del() a void function.
>
> Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
> Signed-off-by: Shannon Nelson <shannon.nelson@amd.com>
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
> ---
> drivers/net/ethernet/amd/pds_core/auxbus.c | 7 +------
> drivers/net/ethernet/amd/pds_core/core.h | 2 +-
> drivers/net/ethernet/amd/pds_core/devlink.c | 6 ++++--
> 3 files changed, 6 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/net/ethernet/amd/pds_core/auxbus.c b/drivers/net/ethernet/amd/pds_core/auxbus.c
> index 2babea110991..78fba368e797 100644
> --- a/drivers/net/ethernet/amd/pds_core/auxbus.c
> +++ b/drivers/net/ethernet/amd/pds_core/auxbus.c
> @@ -175,13 +175,9 @@ static struct pds_auxiliary_dev *pdsc_auxbus_dev_register(struct pdsc *cf,
> return padev;
> }
>
> -int pdsc_auxbus_dev_del(struct pdsc *cf, struct pdsc *pf)
> +void pdsc_auxbus_dev_del(struct pdsc *cf, struct pdsc *pf)
> {
> struct pds_auxiliary_dev *padev;
> - int err = 0;
> -
> - if (!cf)
> - return -ENODEV;
>
> mutex_lock(&pf->config_lock);
>
> @@ -195,7 +191,6 @@ int pdsc_auxbus_dev_del(struct pdsc *cf, struct pdsc *pf)
> pf->vfs[cf->vf_id].padev = NULL;
>
> mutex_unlock(&pf->config_lock);
> - return err;
> }
>
> int pdsc_auxbus_dev_add(struct pdsc *cf, struct pdsc *pf)
> diff --git a/drivers/net/ethernet/amd/pds_core/core.h b/drivers/net/ethernet/amd/pds_core/core.h
> index 14522d6d5f86..631a59cfdd7e 100644
> --- a/drivers/net/ethernet/amd/pds_core/core.h
> +++ b/drivers/net/ethernet/amd/pds_core/core.h
> @@ -304,7 +304,7 @@ int pdsc_register_notify(struct notifier_block *nb);
> void pdsc_unregister_notify(struct notifier_block *nb);
> void pdsc_notify(unsigned long event, void *data);
> int pdsc_auxbus_dev_add(struct pdsc *cf, struct pdsc *pf);
> -int pdsc_auxbus_dev_del(struct pdsc *cf, struct pdsc *pf);
> +void pdsc_auxbus_dev_del(struct pdsc *cf, struct pdsc *pf);
>
> void pdsc_process_adminq(struct pdsc_qcq *qcq);
> void pdsc_work_thread(struct work_struct *work);
> diff --git a/drivers/net/ethernet/amd/pds_core/devlink.c b/drivers/net/ethernet/amd/pds_core/devlink.c
> index 44971e71991f..4e2b92ddef6f 100644
> --- a/drivers/net/ethernet/amd/pds_core/devlink.c
> +++ b/drivers/net/ethernet/amd/pds_core/devlink.c
> @@ -56,8 +56,10 @@ int pdsc_dl_enable_set(struct devlink *dl, u32 id,
> for (vf_id = 0; vf_id < pdsc->num_vfs; vf_id++) {
> struct pdsc *vf = pdsc->vfs[vf_id].vf;
>
> - err = ctx->val.vbool ? pdsc_auxbus_dev_add(vf, pdsc) :
> - pdsc_auxbus_dev_del(vf, pdsc);
> + if (ctx->val.vbool)
> + err = pdsc_auxbus_dev_add(vf, pdsc);
> + else
> + pdsc_auxbus_dev_del(vf, pdsc);
> }
>
> return err;
next prev parent reply other threads:[~2025-03-10 16:58 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-07 18:53 [PATCH v3 0/6] pds_fwctl: fwctl for AMD/Pensando core devices Shannon Nelson
2025-03-07 18:53 ` [PATCH v3 1/6] pds_core: make pdsc_auxbus_dev_del() void Shannon Nelson
2025-03-10 16:58 ` Dave Jiang [this message]
2025-03-07 18:53 ` [PATCH v3 2/6] pds_core: specify auxiliary_device to be created Shannon Nelson
2025-03-10 17:26 ` Dave Jiang
2025-03-17 22:30 ` Nelson, Shannon
2025-03-07 18:53 ` [PATCH v3 3/6] pds_core: add new fwctl auxiliary_device Shannon Nelson
2025-03-10 17:33 ` Dave Jiang
2025-03-17 22:37 ` Nelson, Shannon
2025-03-12 18:22 ` Jonathan Cameron
2025-03-07 18:53 ` [PATCH v3 4/6] pds_fwctl: initial driver framework Shannon Nelson
2025-03-10 18:28 ` Dave Jiang
2025-03-17 22:40 ` Nelson, Shannon
2025-03-12 18:25 ` Jonathan Cameron
2025-03-07 18:53 ` [PATCH v3 5/6] pds_fwctl: add rpc and query support Shannon Nelson
2025-03-07 23:38 ` Jason Gunthorpe
2025-03-17 22:24 ` Nelson, Shannon
2025-03-12 18:29 ` Jonathan Cameron
2025-03-07 18:53 ` [PATCH v3 6/6] pds_fwctl: add Documentation entries Shannon Nelson
2025-03-10 20:27 ` Dave Jiang
2025-03-17 22:41 ` Nelson, Shannon
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=a3b9c248-94de-4237-8ab4-f425bfc66258@intel.com \
--to=dave.jiang@intel.com \
--cc=Jonathan.Cameron@huawei.com \
--cc=andrew.gospodarek@broadcom.com \
--cc=aron.silverton@oracle.com \
--cc=brett.creeley@amd.com \
--cc=dan.j.williams@intel.com \
--cc=daniel.vetter@ffwll.ch \
--cc=dsahern@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=hch@infradead.org \
--cc=itayavr@nvidia.com \
--cc=jgg@nvidia.com \
--cc=jiri@nvidia.com \
--cc=kuba@kernel.org \
--cc=lbloch@nvidia.com \
--cc=leonro@nvidia.com \
--cc=linux-cxl@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=saeedm@nvidia.com \
--cc=shannon.nelson@amd.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).