* [PATCH 1/2] Staging: comedi: fix printk() issue in adv_pci1710.c
[not found] <[PATCH]Staging: comedi:fix printk() issue in adv_pci1710.c>
@ 2011-07-18 13:33 ` Ravishankar
2011-07-18 17:23 ` Dan Carpenter
0 siblings, 1 reply; 2+ messages in thread
From: Ravishankar @ 2011-07-18 13:33 UTC (permalink / raw)
To: gregkh, wfp5p; +Cc: devel, linux-kernel, Ravishankar, Ravishankar
From: Ravishankar <ravi.shankar@greenturtles.in>
This is a patch to the adv_pci1710.c file that fixes up a printk() warning found by the checkpatch.pl tool
Signed-off-by: Ravishankar <ravishankarkm32@gmail.com>
---
drivers/staging/comedi/drivers/adv_pci1710.c | 20 ++++++++++----------
1 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/drivers/staging/comedi/drivers/adv_pci1710.c b/drivers/staging/comedi/drivers/adv_pci1710.c
index fd71cc6..093b9e6 100644
--- a/drivers/staging/comedi/drivers/adv_pci1710.c
+++ b/drivers/staging/comedi/drivers/adv_pci1710.c
@@ -1396,14 +1396,14 @@ static int pci1710_attach(struct comedi_device *dev,
int i;
int board_index;
- printk("comedi%d: adv_pci1710: ", dev->minor);
+ printk(KERN_INFO "comedi%d: adv_pci1710: ", dev->minor);
opt_bus = it->options[0];
opt_slot = it->options[1];
ret = alloc_private(dev, sizeof(struct pci1710_private));
if (ret < 0) {
- printk(" - Allocation failed!\n");
+ printk(KERN_INFO " - Allocation failed!\n");
return -ENOMEM;
}
@@ -1451,10 +1451,10 @@ static int pci1710_attach(struct comedi_device *dev,
if (!pcidev) {
if (opt_bus || opt_slot) {
- printk(" - Card at b:s %d:%d %s\n",
+ printk(KERN_ERR " - Card at b:s %d:%d %s\n",
opt_bus, opt_slot, errstr);
} else {
- printk(" - Card %s\n", errstr);
+ printk(KERN_ERR " - Card %s\n", errstr);
}
return -EIO;
}
@@ -1465,7 +1465,7 @@ static int pci1710_attach(struct comedi_device *dev,
irq = pcidev->irq;
iobase = pci_resource_start(pcidev, 2);
- printk(", b:s:f=%d:%d:%d, io=0x%4lx", pci_bus, pci_slot, pci_func,
+ printk(KERN_INFO ", b:s:f=%d:%d:%d, io=0x%4lx", pci_bus, pci_slot,
+ pci_func, iobase);
dev->iobase = iobase;
@@ -1487,7 +1487,7 @@ static int pci1710_attach(struct comedi_device *dev,
ret = alloc_subdevices(dev, n_subdevices);
if (ret < 0) {
- printk(" - Allocation failed!\n");
+ printk(KERN_INFO " - Allocation failed!\n");
return ret;
}
@@ -1499,14 +1499,14 @@ static int pci1710_attach(struct comedi_device *dev,
IRQF_SHARED, "Advantech PCI-1710",
dev)) {
printk
- (", unable to allocate IRQ %d, DISABLING IT",
+ (KERN_CONT ", unable to allocate IRQ %d, DISABLING IT",
irq);
irq = 0; /* Can't use IRQ */
} else {
- printk(", irq=%u", irq);
+ printk(KERN_CONT ", irq=%u", irq);
}
} else {
- printk(", IRQ disabled");
+ printk(KERN_CONT ", IRQ disabled");
}
} else {
irq = 0;
@@ -1514,7 +1514,7 @@ static int pci1710_attach(struct comedi_device *dev,
dev->irq = irq;
- printk(".\n");
+ printk(KERN_CONT ".\n");
subdev = 0;
--
1.6.5.2
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH 1/2] Staging: comedi: fix printk() issue in adv_pci1710.c
2011-07-18 13:33 ` [PATCH 1/2] Staging: comedi: fix printk() issue in adv_pci1710.c Ravishankar
@ 2011-07-18 17:23 ` Dan Carpenter
0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2011-07-18 17:23 UTC (permalink / raw)
To: Ravishankar; +Cc: gregkh, wfp5p, devel, linux-kernel, Ravishankar
On Mon, Jul 18, 2011 at 07:03:29PM +0530, Ravishankar wrote:
> --- a/drivers/staging/comedi/drivers/adv_pci1710.c
> +++ b/drivers/staging/comedi/drivers/adv_pci1710.c
> @@ -1396,14 +1396,14 @@ static int pci1710_attach(struct comedi_device *dev,
> int i;
> int board_index;
>
> - printk("comedi%d: adv_pci1710: ", dev->minor);
> + printk(KERN_INFO "comedi%d: adv_pci1710: ", dev->minor);
>
> opt_bus = it->options[0];
> opt_slot = it->options[1];
>
> ret = alloc_private(dev, sizeof(struct pci1710_private));
> if (ret < 0) {
> - printk(" - Allocation failed!\n");
> + printk(KERN_INFO " - Allocation failed!\n");
This is on the same line as the previous printk() so KERN_INFO isn't
correct.
regards,
dan carpenter
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-07-18 17:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <[PATCH]Staging: comedi:fix printk() issue in adv_pci1710.c>
2011-07-18 13:33 ` [PATCH 1/2] Staging: comedi: fix printk() issue in adv_pci1710.c Ravishankar
2011-07-18 17:23 ` Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®