Message ID | 20200626130525.389469-8-lee.jones@linaro.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Fix a bunch of W=1 warnings in Misc | expand |
On Fri, Jun 26, 2020 at 3:05 PM Lee Jones <lee.jones@linaro.org> wrote: > > Hasn't been checked since its conception 2 years ago. > > Squashes W=1 warning: > > drivers/misc/mic/vop/vop_main.c: In function ‘_vop_scan_devices’: > drivers/misc/mic/vop/vop_main.c:617:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable] > 617 | int ret; > | ^~~ > > Cc: Sudeep Dutt <sudeep.dutt@intel.com> > Cc: Ashutosh Dixit <ashutosh.dixit@intel.com> > Cc: Christian Borntraeger <borntraeger@de.ibm.com> > Signed-off-by: Lee Jones <lee.jones@linaro.org> This is a correct change, but I'd take it one step further and make the _vop_remove_device() function return 'void' if you don't mind respinning the patch. Either way Acked-by: Arnd Bergmann <arnd@arndb.de>
On Fri, 26 Jun 2020, Arnd Bergmann wrote: > On Fri, Jun 26, 2020 at 3:05 PM Lee Jones <lee.jones@linaro.org> wrote: > > > > Hasn't been checked since its conception 2 years ago. > > > > Squashes W=1 warning: > > > > drivers/misc/mic/vop/vop_main.c: In function ‘_vop_scan_devices’: > > drivers/misc/mic/vop/vop_main.c:617:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable] > > 617 | int ret; > > | ^~~ > > > > Cc: Sudeep Dutt <sudeep.dutt@intel.com> > > Cc: Ashutosh Dixit <ashutosh.dixit@intel.com> > > Cc: Christian Borntraeger <borntraeger@de.ibm.com> > > Signed-off-by: Lee Jones <lee.jones@linaro.org> > > This is a correct change, but I'd take it one step further and make the > _vop_remove_device() function return 'void' if you don't mind > respinning the patch. > > Either way > > Acked-by: Arnd Bergmann <arnd@arndb.de> Thanks. Do you mind if I handle your request as a subsequent patch?
On Fri, Jun 26, 2020 at 5:29 PM Lee Jones <lee.jones@linaro.org> wrote: > On Fri, 26 Jun 2020, Arnd Bergmann wrote: > > On Fri, Jun 26, 2020 at 3:05 PM Lee Jones <lee.jones@linaro.org> wrote: > > This is a correct change, but I'd take it one step further and make the > > _vop_remove_device() function return 'void' if you don't mind > > respinning the patch. > > > > Either way > > > > Acked-by: Arnd Bergmann <arnd@arndb.de> > > Do you mind if I handle your request as a subsequent patch? That also works for me, thanks! Arnd
diff --git a/drivers/misc/mic/vop/vop_main.c b/drivers/misc/mic/vop/vop_main.c index 85942f6717c57..4e63cb1360921 100644 --- a/drivers/misc/mic/vop/vop_main.c +++ b/drivers/misc/mic/vop/vop_main.c @@ -614,7 +614,6 @@ static void _vop_scan_devices(void __iomem *dp, struct vop_device *vpdev, struct mic_device_desc __iomem *d; struct mic_device_ctrl __iomem *dc; struct device *dev; - int ret; for (i = sizeof(struct mic_bootparam); i < MIC_DP_SIZE; i += _vop_total_desc_size(d)) { @@ -644,7 +643,7 @@ static void _vop_scan_devices(void __iomem *dp, struct vop_device *vpdev, &dc->config_change); put_device(dev); _vop_handle_config_change(d, i, vpdev); - ret = _vop_remove_device(d, i, vpdev); + _vop_remove_device(d, i, vpdev); if (remove) { iowrite8(0, &dc->config_change); iowrite8(0, &dc->guest_ack);
Hasn't been checked since its conception 2 years ago. Squashes W=1 warning: drivers/misc/mic/vop/vop_main.c: In function ‘_vop_scan_devices’: drivers/misc/mic/vop/vop_main.c:617:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable] 617 | int ret; | ^~~ Cc: Sudeep Dutt <sudeep.dutt@intel.com> Cc: Ashutosh Dixit <ashutosh.dixit@intel.com> Cc: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> --- drivers/misc/mic/vop/vop_main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)