Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

pds_core: make pdsc_auxbus_dev_del() void

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>

authored by

Shannon Nelson and committed by
Jason Gunthorpe
e8562da8 0e18a6ec

+6 -9
+1 -6
drivers/net/ethernet/amd/pds_core/auxbus.c
··· 175 175 return padev; 176 176 } 177 177 178 - int pdsc_auxbus_dev_del(struct pdsc *cf, struct pdsc *pf) 178 + void pdsc_auxbus_dev_del(struct pdsc *cf, struct pdsc *pf) 179 179 { 180 180 struct pds_auxiliary_dev *padev; 181 - int err = 0; 182 - 183 - if (!cf) 184 - return -ENODEV; 185 181 186 182 mutex_lock(&pf->config_lock); 187 183 ··· 191 195 pf->vfs[cf->vf_id].padev = NULL; 192 196 193 197 mutex_unlock(&pf->config_lock); 194 - return err; 195 198 } 196 199 197 200 int pdsc_auxbus_dev_add(struct pdsc *cf, struct pdsc *pf)
+1 -1
drivers/net/ethernet/amd/pds_core/core.h
··· 304 304 void pdsc_unregister_notify(struct notifier_block *nb); 305 305 void pdsc_notify(unsigned long event, void *data); 306 306 int pdsc_auxbus_dev_add(struct pdsc *cf, struct pdsc *pf); 307 - int pdsc_auxbus_dev_del(struct pdsc *cf, struct pdsc *pf); 307 + void pdsc_auxbus_dev_del(struct pdsc *cf, struct pdsc *pf); 308 308 309 309 void pdsc_process_adminq(struct pdsc_qcq *qcq); 310 310 void pdsc_work_thread(struct work_struct *work);
+4 -2
drivers/net/ethernet/amd/pds_core/devlink.c
··· 56 56 for (vf_id = 0; vf_id < pdsc->num_vfs; vf_id++) { 57 57 struct pdsc *vf = pdsc->vfs[vf_id].vf; 58 58 59 - err = ctx->val.vbool ? pdsc_auxbus_dev_add(vf, pdsc) : 60 - pdsc_auxbus_dev_del(vf, pdsc); 59 + if (ctx->val.vbool) 60 + err = pdsc_auxbus_dev_add(vf, pdsc); 61 + else 62 + pdsc_auxbus_dev_del(vf, pdsc); 61 63 } 62 64 63 65 return err;