fixed below checkpatch warning.
- Prefer netdev_info(netdev, ... then dev_info(dev, ... then pr_info(... to printk(KERN_INFO ...
Signed-off-by: YAMANE Toshiaki <[email protected]>
---
drivers/staging/comedi/drivers/vmk80xx.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/staging/comedi/drivers/vmk80xx.c b/drivers/staging/comedi/drivers/vmk80xx.c
index df277aa..3e77d40 100644
--- a/drivers/staging/comedi/drivers/vmk80xx.c
+++ b/drivers/staging/comedi/drivers/vmk80xx.c
@@ -1371,12 +1371,12 @@ static int vmk80xx_usb_probe(struct usb_interface *intf,
if (dev->board.model == VMK8061_MODEL) {
vmk80xx_read_eeprom(dev, IC3_VERSION);
- printk(KERN_INFO "comedi#: vmk80xx: %s\n", dev->fw.ic3_vers);
+ dev_info(&intf->dev, "%s: %s\n", __FILE__, dev->fw.ic3_vers);
if (vmk80xx_check_data_link(dev)) {
vmk80xx_read_eeprom(dev, IC6_VERSION);
- printk(KERN_INFO "comedi#: vmk80xx: %s\n",
- dev->fw.ic6_vers);
+ dev_info(&intf->dev, "%s: %s\n",
+ __FILE__, dev->fw.ic6_vers);
} else {
dbgcm("comedi#: vmk80xx: no conn. to CPU\n");
}
@@ -1387,8 +1387,8 @@ static int vmk80xx_usb_probe(struct usb_interface *intf,
dev->probed = 1;
- printk(KERN_INFO "comedi#: vmk80xx: board #%d [%s] now attached\n",
- dev->count, dev->board.name);
+ dev_info(&intf->dev, "%s: board #%d [%s] now attached\n",
+ __FILE__, dev->count, dev->board.name);
mutex_unlock(&glb_mutex);
@@ -1422,8 +1422,8 @@ static void vmk80xx_usb_disconnect(struct usb_interface *intf)
kfree(dev->usb_rx_buf);
kfree(dev->usb_tx_buf);
- printk(KERN_INFO "comedi#: vmk80xx: board #%d [%s] now detached\n",
- dev->count, dev->board.name);
+ dev_info(&intf->dev, "%s: board #%d [%s] now detached\n",
+ __FILE__, dev->count, dev->board.name);
up(&dev->limit_sem);
mutex_unlock(&glb_mutex);
--
1.7.9.5
On 2012/10/14 02:40 PM, YAMANE Toshiaki wrote:
> fixed below checkpatch warning.
> - Prefer netdev_info(netdev, ... then dev_info(dev, ... then pr_info(... to printk(KERN_INFO ...
>
> Signed-off-by: YAMANE Toshiaki <[email protected]>
> ---
> drivers/staging/comedi/drivers/vmk80xx.c | 14 +++++++-------
> 1 file changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/staging/comedi/drivers/vmk80xx.c b/drivers/staging/comedi/drivers/vmk80xx.c
> index df277aa..3e77d40 100644
> --- a/drivers/staging/comedi/drivers/vmk80xx.c
> +++ b/drivers/staging/comedi/drivers/vmk80xx.c
> @@ -1371,12 +1371,12 @@ static int vmk80xx_usb_probe(struct usb_interface *intf,
>
> if (dev->board.model == VMK8061_MODEL) {
> vmk80xx_read_eeprom(dev, IC3_VERSION);
> - printk(KERN_INFO "comedi#: vmk80xx: %s\n", dev->fw.ic3_vers);
> + dev_info(&intf->dev, "%s: %s\n", __FILE__, dev->fw.ic3_vers);
I think __FILE__ is the wrong thing to use in these logs. Better to use
vmk80xx or perhaps KBUILD_MODNAME.
>
> if (vmk80xx_check_data_link(dev)) {
> vmk80xx_read_eeprom(dev, IC6_VERSION);
> - printk(KERN_INFO "comedi#: vmk80xx: %s\n",
> - dev->fw.ic6_vers);
> + dev_info(&intf->dev, "%s: %s\n",
> + __FILE__, dev->fw.ic6_vers);
> } else {
> dbgcm("comedi#: vmk80xx: no conn. to CPU\n");
> }
> @@ -1387,8 +1387,8 @@ static int vmk80xx_usb_probe(struct usb_interface *intf,
>
> dev->probed = 1;
>
> - printk(KERN_INFO "comedi#: vmk80xx: board #%d [%s] now attached\n",
> - dev->count, dev->board.name);
> + dev_info(&intf->dev, "%s: board #%d [%s] now attached\n",
> + __FILE__, dev->count, dev->board.name);
>
> mutex_unlock(&glb_mutex);
>
> @@ -1422,8 +1422,8 @@ static void vmk80xx_usb_disconnect(struct usb_interface *intf)
> kfree(dev->usb_rx_buf);
> kfree(dev->usb_tx_buf);
>
> - printk(KERN_INFO "comedi#: vmk80xx: board #%d [%s] now detached\n",
> - dev->count, dev->board.name);
> + dev_info(&intf->dev, "%s: board #%d [%s] now detached\n",
> + __FILE__, dev->count, dev->board.name);
>
> up(&dev->limit_sem);
> mutex_unlock(&glb_mutex);
>
--
-=( Ian Abbott @ MEV Ltd. E-mail: <[email protected]> )=-
-=( Tel: +44 (0)161 477 1898 FAX: +44 (0)161 718 3587 )=-
fixed below checkpatch warning.
- Prefer netdev_info(netdev, ... then dev_info(dev, ... then pr_info(... to printk(KERN_INFO ...
Signed-off-by: YAMANE Toshiaki <[email protected]>
---
drivers/staging/comedi/drivers/vmk80xx.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/staging/comedi/drivers/vmk80xx.c b/drivers/staging/comedi/drivers/vmk80xx.c
index df277aa..3df4fcf 100644
--- a/drivers/staging/comedi/drivers/vmk80xx.c
+++ b/drivers/staging/comedi/drivers/vmk80xx.c
@@ -1371,12 +1371,12 @@ static int vmk80xx_usb_probe(struct usb_interface *intf,
if (dev->board.model == VMK8061_MODEL) {
vmk80xx_read_eeprom(dev, IC3_VERSION);
- printk(KERN_INFO "comedi#: vmk80xx: %s\n", dev->fw.ic3_vers);
+ dev_info(&intf->dev, "vmk80xx: %s\n", dev->fw.ic3_vers);
if (vmk80xx_check_data_link(dev)) {
vmk80xx_read_eeprom(dev, IC6_VERSION);
- printk(KERN_INFO "comedi#: vmk80xx: %s\n",
- dev->fw.ic6_vers);
+ dev_info(&intf->dev, "vmk80xx: %s\n",
+ dev->fw.ic6_vers);
} else {
dbgcm("comedi#: vmk80xx: no conn. to CPU\n");
}
@@ -1387,8 +1387,8 @@ static int vmk80xx_usb_probe(struct usb_interface *intf,
dev->probed = 1;
- printk(KERN_INFO "comedi#: vmk80xx: board #%d [%s] now attached\n",
- dev->count, dev->board.name);
+ dev_info(&intf->dev, "vmk80xx: board #%d [%s] now attached\n",
+ dev->count, dev->board.name);
mutex_unlock(&glb_mutex);
@@ -1422,8 +1422,8 @@ static void vmk80xx_usb_disconnect(struct usb_interface *intf)
kfree(dev->usb_rx_buf);
kfree(dev->usb_tx_buf);
- printk(KERN_INFO "comedi#: vmk80xx: board #%d [%s] now detached\n",
- dev->count, dev->board.name);
+ dev_info(&intf->dev, "vmk80xx: board #%d [%s] now detached\n",
+ dev->count, dev->board.name);
up(&dev->limit_sem);
mutex_unlock(&glb_mutex);
--
1.7.9.5
On Mon, Oct 15, 2012 at 07:58:06PM +0900, YAMANE Toshiaki wrote:
> - printk(KERN_INFO "comedi#: vmk80xx: board #%d [%s] now attached\n",
> - dev->count, dev->board.name);
> + dev_info(&intf->dev, "vmk80xx: board #%d [%s] now attached\n",
> + dev->count, dev->board.name);
The vmk80xx here is redundant, as it shows up from the dev_info()
printk. Care to fix the two places here you did that and resend?
Note, when you resend please enumerate what version of the patch this
is, otherwise I can get very confused.
thanks,
greg k-h
On Tue, Oct 23, 2012 at 4:45 AM, Greg Kroah-Hartman <[email protected]> wrote:
> Note, when you resend please enumerate what version of the patch this
> is, otherwise I can get very confused.
Sorry, I am going to watch out for it from the next.
--
Regards,
YAMANE Toshiaki
fixed below checkpatch warning.
- Prefer netdev_info(netdev, ... then dev_info(dev, ... then pr_info(... to printk(KERN_INFO ...
Signed-off-by: YAMANE Toshiaki <[email protected]>
---
drivers/staging/comedi/drivers/vmk80xx.c | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/drivers/staging/comedi/drivers/vmk80xx.c b/drivers/staging/comedi/drivers/vmk80xx.c
index df277aa..3664907 100644
--- a/drivers/staging/comedi/drivers/vmk80xx.c
+++ b/drivers/staging/comedi/drivers/vmk80xx.c
@@ -1371,12 +1371,11 @@ static int vmk80xx_usb_probe(struct usb_interface *intf,
if (dev->board.model == VMK8061_MODEL) {
vmk80xx_read_eeprom(dev, IC3_VERSION);
- printk(KERN_INFO "comedi#: vmk80xx: %s\n", dev->fw.ic3_vers);
+ dev_info(&intf->dev, "%s\n", dev->fw.ic3_vers);
if (vmk80xx_check_data_link(dev)) {
vmk80xx_read_eeprom(dev, IC6_VERSION);
- printk(KERN_INFO "comedi#: vmk80xx: %s\n",
- dev->fw.ic6_vers);
+ dev_info(&intf->dev, "%s\n", dev->fw.ic6_vers);
} else {
dbgcm("comedi#: vmk80xx: no conn. to CPU\n");
}
@@ -1387,8 +1386,8 @@ static int vmk80xx_usb_probe(struct usb_interface *intf,
dev->probed = 1;
- printk(KERN_INFO "comedi#: vmk80xx: board #%d [%s] now attached\n",
- dev->count, dev->board.name);
+ dev_info(&intf->dev, "board #%d [%s] now attached\n",
+ dev->count, dev->board.name);
mutex_unlock(&glb_mutex);
@@ -1422,8 +1421,8 @@ static void vmk80xx_usb_disconnect(struct usb_interface *intf)
kfree(dev->usb_rx_buf);
kfree(dev->usb_tx_buf);
- printk(KERN_INFO "comedi#: vmk80xx: board #%d [%s] now detached\n",
- dev->count, dev->board.name);
+ dev_info(&intf->dev, "board #%d [%s] now detached\n",
+ dev->count, dev->board.name);
up(&dev->limit_sem);
mutex_unlock(&glb_mutex);
--
1.7.9.5