staging/comedi: Use dev_ printks in drivers/usbdux.c
PATCH 1/1 staging/comedi: Use dev_ printks in drivers/usbdux.c
fixed below checkpatch warning.
- WARNING: Prefer netdev_err(netdev, ... then dev_err(dev, ... then pr_err(... to printk(KERN_ERR ...
Signed-off-by YAMANE Toshiaki <[email protected]>
--- drivers/staging/comedi/drivers/usbdux.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)
drivers/staging/comedi/drivers/usbdux.c +4 -6
@@ -2386,14 +2386,12 @@ static int usbdux_attach_usb(struct comedi_device *dev,down (&start_stop_sem); this_usbduxsub =usb_get_intfdata (uinterf);if (!this_usbduxsub || !this_usbduxsub->probed) { -printk (KERN_ERR -"comedi%d: usbdux: error: attach_usb failed, not connected\n" , - dev->minor); +dev_err (dev->class_dev, +"usbdux: error: attach_usb failed, not connected\n" ); ret = -ENODEV ; }else if (this_usbduxsub->attached) { -printk (KERN_ERR -"comedi%d: usbdux: error: attach_usb failed, already attached\n" , - dev->minor); +dev_err (dev->class_dev, +"error: attach_usb failed, already attached\n" ); ret = -ENODEV ; }else ret =usbdux_attach_common (dev, this_usbduxsub);
Signature · 1 line
1.7.9.5
PATCH 1/1 staging/comedi: Use dev_ printks in drivers/usbdux.c
fixed below checkpatch warning.
- WARNING: Prefer netdev_err(netdev, ... then dev_err(dev, ... then pr_err(... to printk(KERN_ERR ...
Signed-off-by YAMANE Toshiaki <[email protected]>
--- drivers/staging/comedi/drivers/usbdux.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)
drivers/staging/comedi/drivers/usbdux.c +4 -6
@@ -2386,14 +2386,12 @@ static int usbdux_attach_usb(struct comedi_device *dev,down (&start_stop_sem); this_usbduxsub =usb_get_intfdata (uinterf);if (!this_usbduxsub || !this_usbduxsub->probed) { -printk (KERN_ERR -"comedi%d: usbdux: error: attach_usb failed, not connected\n" , - dev->minor); +dev_err (&uinterf->dev, +"usbdux: error: attach_usb failed, not connected\n" ); ret = -ENODEV ; }else if (this_usbduxsub->attached) { -printk (KERN_ERR -"comedi%d: usbdux: error: attach_usb failed, already attached\n" , - dev->minor); +dev_err (&uinterf->dev, +"error: attach_usb failed, already attached\n" ); ret = -ENODEV ; }else ret =usbdux_attach_common (dev, this_usbduxsub);
Signature · 1 line
1.7.9.5
Quoted 32 lines · YAMANE Toshiaki
fixed below checkpatch warning.
- WARNING: Prefer netdev_err(netdev, ... then dev_err(dev, ... then pr_err(... to printk(KERN_ERR ...Signed-off-by YAMANE Toshiaki <[email protected]>--- drivers/staging/comedi/drivers/usbdux.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)drivers/staging/comedi/drivers/usbdux.c +4
-7@@ -2386,14 +2386,12 @@ static int usbdux_attach_usb(struct comedi_device *dev,down (&start_stop_sem); this_usbduxsub =usb_get_intfdata (uinterf);if (!this_usbduxsub || !this_usbduxsub->probed) { -printk (KERN_ERR -"comedi%d: usbdux: error: attach_usb failed, not connected\n" , - dev->minor); +dev_err (&uinterf->dev, +"usbdux: error: attach_usb failed, not connected\n" ); ret = -ENODEV ; }else if (this_usbduxsub->attached) { -printk (KERN_ERR -"comedi%d: usbdux: error: attach_usb failed, already attached\n" , - dev->minor); +dev_err (&uinterf->dev, +"error: attach_usb failed, already attached\n" ); ret = -ENODEV ; }else ret =usbdux_attach_common (dev, this_usbduxsub); --
Quoted 2 lines
1.7.9.5
I cannot judge which is better or not ...
Signature · 3 lines
Regards, YAMANE Toshiaki