* [PATCH] staging/comedi: Use dev_ printks in drivers/adl_pci8164.c
@ 2012-10-05 0:07 YAMANE Toshiaki
2012-10-05 9:15 ` Ian Abbott
2012-10-06 5:32 ` YAMANE Toshiaki
0 siblings, 2 replies; 4+ messages in thread
From: YAMANE Toshiaki @ 2012-10-05 0:07 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: Ian Abbott, Frank Mori Hess, linux-kernel, 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 <yamanetoshi@gmail.com>
---
drivers/staging/comedi/drivers/adl_pci8164.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/comedi/drivers/adl_pci8164.c b/drivers/staging/comedi/drivers/adl_pci8164.c
index 05e06e7..6dbe465 100644
--- a/drivers/staging/comedi/drivers/adl_pci8164.c
+++ b/drivers/staging/comedi/drivers/adl_pci8164.c
@@ -89,9 +89,9 @@ static void adl_pci8164_insn_read(struct comedi_device *dev,
}
data[0] = inw(dev->iobase + axis_reg + offset);
- printk(KERN_DEBUG "comedi: pci8164 %s read -> "
- "%04X:%04X on axis %s\n",
- action, data[0], data[1], axisname);
+ dev_dbg(dev->class_dev,
+ "comedi: pci8164 %s read -> %04X:%04X on axis %s\n",
+ action, data[0], data[1], axisname);
}
static int adl_pci8164_insn_read_msts(struct comedi_device *dev,
@@ -170,9 +170,9 @@ static void adl_pci8164_insn_out(struct comedi_device *dev,
outw(data[0], dev->iobase + axis_reg + offset);
- printk(KERN_DEBUG "comedi: pci8164 %s write -> "
- "%04X:%04X on axis %s\n",
- action, data[0], data[1], axisname);
+ dev_dbg(dev->class_dev,
+ "comedi: pci8164 %s write -> %04X:%04X on axis %s\n",
+ action, data[0], data[1], axisname);
}
--
1.7.9.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] staging/comedi: Use dev_ printks in drivers/adl_pci8164.c
2012-10-05 0:07 [PATCH] staging/comedi: Use dev_ printks in drivers/adl_pci8164.c YAMANE Toshiaki
@ 2012-10-05 9:15 ` Ian Abbott
2012-10-05 9:36 ` Toshiaki Yamane
2012-10-06 5:32 ` YAMANE Toshiaki
1 sibling, 1 reply; 4+ messages in thread
From: Ian Abbott @ 2012-10-05 9:15 UTC (permalink / raw)
To: YAMANE Toshiaki
Cc: Greg Kroah-Hartman, Ian Abbott, Frank Mori Hess, linux-kernel
On 2012-10-05 01:07, YAMANE Toshiaki wrote:
> 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 <yamanetoshi@gmail.com>
> ---
> drivers/staging/comedi/drivers/adl_pci8164.c | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/staging/comedi/drivers/adl_pci8164.c b/drivers/staging/comedi/drivers/adl_pci8164.c
> index 05e06e7..6dbe465 100644
> --- a/drivers/staging/comedi/drivers/adl_pci8164.c
> +++ b/drivers/staging/comedi/drivers/adl_pci8164.c
> @@ -89,9 +89,9 @@ static void adl_pci8164_insn_read(struct comedi_device *dev,
> }
>
> data[0] = inw(dev->iobase + axis_reg + offset);
> - printk(KERN_DEBUG "comedi: pci8164 %s read -> "
> - "%04X:%04X on axis %s\n",
> - action, data[0], data[1], axisname);
> + dev_dbg(dev->class_dev,
> + "comedi: pci8164 %s read -> %04X:%04X on axis %s\n",
> + action, data[0], data[1], axisname);
> }
The "comedi: " prefix is superfluous, so should be removed. The
dev_dbg() call will emit the word "comedi" twice already without the
extra prefix.
>
> static int adl_pci8164_insn_read_msts(struct comedi_device *dev,
> @@ -170,9 +170,9 @@ static void adl_pci8164_insn_out(struct comedi_device *dev,
>
> outw(data[0], dev->iobase + axis_reg + offset);
>
> - printk(KERN_DEBUG "comedi: pci8164 %s write -> "
> - "%04X:%04X on axis %s\n",
> - action, data[0], data[1], axisname);
> + dev_dbg(dev->class_dev,
> + "comedi: pci8164 %s write -> %04X:%04X on axis %s\n",
> + action, data[0], data[1], axisname);
>
> }
Same here.
--
-=( Ian Abbott @ MEV Ltd. E-mail: <abbotti@mev.co.uk> )=-
-=( Tel: +44 (0)161 477 1898 FAX: +44 (0)161 718 3587 )=-
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] staging/comedi: Use dev_ printks in drivers/adl_pci8164.c
2012-10-05 9:15 ` Ian Abbott
@ 2012-10-05 9:36 ` Toshiaki Yamane
0 siblings, 0 replies; 4+ messages in thread
From: Toshiaki Yamane @ 2012-10-05 9:36 UTC (permalink / raw)
To: Ian Abbott; +Cc: Greg Kroah-Hartman, Ian Abbott, Frank Mori Hess, linux-kernel
On Fri, Oct 5, 2012 at 6:15 PM, Ian Abbott <abbotti@mev.co.uk> wrote:
> On 2012-10-05 01:07, YAMANE Toshiaki wrote:
>>
>> 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 <yamanetoshi@gmail.com>
>> ---
>> drivers/staging/comedi/drivers/adl_pci8164.c | 12 ++++++------
>> 1 file changed, 6 insertions(+), 6 deletions(-)
>>
>> diff --git a/drivers/staging/comedi/drivers/adl_pci8164.c
>> b/drivers/staging/comedi/drivers/adl_pci8164.c
>> index 05e06e7..6dbe465 100644
>> --- a/drivers/staging/comedi/drivers/adl_pci8164.c
>> +++ b/drivers/staging/comedi/drivers/adl_pci8164.c
>> @@ -89,9 +89,9 @@ static void adl_pci8164_insn_read(struct comedi_device
>> *dev,
>> }
>>
>> data[0] = inw(dev->iobase + axis_reg + offset);
>> - printk(KERN_DEBUG "comedi: pci8164 %s read -> "
>> - "%04X:%04X on axis
>> %s\n",
>> - action, data[0], data[1], axisname);
>> + dev_dbg(dev->class_dev,
>> + "comedi: pci8164 %s read -> %04X:%04X on axis %s\n",
>> + action, data[0], data[1], axisname);
>> }
>
>
> The "comedi: " prefix is superfluous, so should be removed. The dev_dbg()
> call will emit the word "comedi" twice already without the extra prefix.
>
>
>>
>> static int adl_pci8164_insn_read_msts(struct comedi_device *dev,
>> @@ -170,9 +170,9 @@ static void adl_pci8164_insn_out(struct comedi_device
>> *dev,
>>
>> outw(data[0], dev->iobase + axis_reg + offset);
>>
>> - printk(KERN_DEBUG "comedi: pci8164 %s write -> "
>> - "%04X:%04X on axis %s\n",
>> - action, data[0], data[1], axisname);
>> + dev_dbg(dev->class_dev,
>> + "comedi: pci8164 %s write -> %04X:%04X on axis %s\n",
>> + action, data[0], data[1], axisname);
>>
>> }
>
>
> Same here.
Ian-san,
Thank you for pointing out my mistakes.
I will try to fix it.
--
Regards,
YAMANE Toshiaki
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] staging/comedi: Use dev_ printks in drivers/adl_pci8164.c
2012-10-05 0:07 [PATCH] staging/comedi: Use dev_ printks in drivers/adl_pci8164.c YAMANE Toshiaki
2012-10-05 9:15 ` Ian Abbott
@ 2012-10-06 5:32 ` YAMANE Toshiaki
1 sibling, 0 replies; 4+ messages in thread
From: YAMANE Toshiaki @ 2012-10-06 5:32 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: Ian Abbott, Frank Mori Hess, linux-kernel, YAMANE Toshiaki
fixed below checkpatch warning.
- WARNING: Prefer netdev_dbg(netdev, ... then dev_dbg(dev, ... then pr_debug(... to printk(KERN_DEBUG ...
Signed-off-by: YAMANE Toshiaki <yamanetoshi@gmail.com>
---
drivers/staging/comedi/drivers/adl_pci8164.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/comedi/drivers/adl_pci8164.c b/drivers/staging/comedi/drivers/adl_pci8164.c
index 05e06e7..5a6d6d2 100644
--- a/drivers/staging/comedi/drivers/adl_pci8164.c
+++ b/drivers/staging/comedi/drivers/adl_pci8164.c
@@ -89,9 +89,9 @@ static void adl_pci8164_insn_read(struct comedi_device *dev,
}
data[0] = inw(dev->iobase + axis_reg + offset);
- printk(KERN_DEBUG "comedi: pci8164 %s read -> "
- "%04X:%04X on axis %s\n",
- action, data[0], data[1], axisname);
+ dev_dbg(dev->class_dev,
+ "pci8164 %s read -> %04X:%04X on axis %s\n",
+ action, data[0], data[1], axisname);
}
static int adl_pci8164_insn_read_msts(struct comedi_device *dev,
@@ -170,9 +170,9 @@ static void adl_pci8164_insn_out(struct comedi_device *dev,
outw(data[0], dev->iobase + axis_reg + offset);
- printk(KERN_DEBUG "comedi: pci8164 %s write -> "
- "%04X:%04X on axis %s\n",
- action, data[0], data[1], axisname);
+ dev_dbg(dev->class_dev,
+ "pci8164 %s write -> %04X:%04X on axis %s\n",
+ action, data[0], data[1], axisname);
}
--
1.7.9.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-10-06 5:32 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-05 0:07 [PATCH] staging/comedi: Use dev_ printks in drivers/adl_pci8164.c YAMANE Toshiaki
2012-10-05 9:15 ` Ian Abbott
2012-10-05 9:36 ` Toshiaki Yamane
2012-10-06 5:32 ` YAMANE Toshiaki
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).