pds_core: make pdsc_auxbus_dev_del() void
[ Upstream commit e8562da829432d04a0de1830146984c89844f35e ] Since there really is no useful return, advertising a return value is rather misleading. Make pdsc_auxbus_dev_del() a void function. Link: https://patch.msgid.link/r/20250320194412.67983-2-shannon.nelson@amd.com Reviewed-by: Leon Romanovsky <leonro@nvidia.com> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com> Reviewed-by: Dave Jiang <dave.jiang@intel.com> Signed-off-by: Shannon Nelson <shannon.nelson@amd.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com> Stable-dep-of: dfd76010f8e8 ("pds_core: remove write-after-free of client_id") Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
452fa190dd
commit
da23d7edb2
@@ -172,13 +172,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);
|
||||
|
||||
@@ -192,7 +188,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)
|
||||
|
@@ -301,7 +301,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);
|
||||
|
@@ -55,8 +55,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;
|
||||
|
Reference in New Issue
Block a user