pcmcia/i82092: Refactored dprintk macro for pr_debug().
PATCH 1/1 pcmcia/i82092: Refactored dprintk macro for pr_debug().
As pointed out in https://kernelnewbies.org/KernelJanitors/Todo
this patch replaces the outdated macro of DPRINTK for pr_debug()
To: Dominik Brodowski <[email protected]>
To: Thomas Gleixner <[email protected]>
To: Greg Kroah-Hartman <[email protected]>
To: Adam Zerella <[email protected]>
To: [email protected]
--- drivers/pcmcia/i82092.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/pcmcia/i82092.c +3 -3
@@ -117,9 +117,9 @@ static int i82092aa_pci_probe(struct pci_dev *dev, const struct pci_device_id *iif (card_present (i)) { sockets[i].card_state =3 ; -dprintk (KERN_DEBUG "i82092aa: slot %i is occupied\n" ,i); +pr_debug ("i82092aa: slot %i is occupied\n" , i); }else { -dprintk (KERN_DEBUG "i82092aa: slot %i is vacant\n" ,i); +pr_debug ("i82092aa: slot %i is vacant\n" , i); } }
@@ -128,7 +128,7 @@ static int i82092aa_pci_probe(struct pci_dev *dev, const struct pci_device_id *ipci_write_config_byte (dev,0x50 , configbyte);/* PCI Interrupt Routing Register */ /* Register the interrupt handler */ -dprintk (KERN_DEBUG "Requesting interrupt %i \n" ,dev->irq); +pr_debug ("Requesting interrupt %i\n" , dev->irq);if ((ret =request_irq (dev->irq, i82092aa_interrupt,IRQF_SHARED ,"i82092aa" , i82092aa_interrupt))) {printk (KERN_ERR "i82092aa: Failed to register IRQ %d, aborting\n" , dev->irq); goto err_out_free_res;
Signature · 1 line
2.20.1
Quoted 18 lines · Adam Zerella
As pointed out in https://kernelnewbies.org/KernelJanitors/Todo
this patch replaces the outdated macro of DPRINTK forpr_debug()To: Dominik Brodowski <[email protected]>
To: Thomas Gleixner <[email protected]>
To: Greg Kroah-Hartman <[email protected]>
To: Adam Zerella <[email protected]>
To: [email protected]Signed-off-by Adam Zerella <[email protected]>--- drivers/pcmcia/i82092.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)drivers/pcmcia/i82092.c +0
-0
drivers/pcmcia/i82092.c static int i82092aa_pci_probe(struct pci_dev *dev, const struct pci_device_id *i · line 122
Quoted 8 lines
drivers/pcmcia/i82092.c +2
-2@@ -117,9 +117,9 @@ static int i82092aa_pci_probe(struct pci_dev *dev, const struct pci_device_id *iif (card_present (i)) { sockets[i].card_state =3 ; -dprintk (KERN_DEBUG "i82092aa: slot %i is occupied\n" ,i); +pr_debug ("i82092aa: slot %i is occupied\n" , i); }else { -dprintk (KERN_DEBUG "i82092aa: slot %i is vacant\n" ,i); +pr_debug ("i82092aa: slot %i is vacant\n" , i);
These really should use dev_dbg() instead, as this is a driver and you have access to a real device here.
drivers/pcmcia/i82092.c static int i82092aa_pci_probe(struct pci_dev *dev, const struct pci_device_id *i · line 131
Quoted 9 lines
drivers/pcmcia/i82092.c +1
-1} }@@ -128,7 +128,7 @@ static int i82092aa_pci_probe(struct pci_dev *dev, const struct pci_device_id *ipci_write_config_byte (dev,0x50 , configbyte);/* PCI Interrupt Routing Register */ /* Register the interrupt handler */ -dprintk (KERN_DEBUG "Requesting interrupt %i \n" ,dev->irq); +pr_debug ("Requesting interrupt %i\n" , dev->irq);
Same here.
thanks,
greg k-h
PATCH v2 1/1 pcmcia/i82092: Refactored dprintk macro for dev_dbg().
As suggested in https://kernelnewbies.org/KernelJanitors/Todo
this patch replaces the outdated macro of DPRINTK for dev_dbg()
To: Dominik Brodowski <[email protected]>
To: Thomas Gleixner <[email protected]>
To: Greg Kroah-Hartman <[email protected]>
To: Adam Zerella <[email protected]>
To: [email protected]
---
Changes in v2:
- Swap pr_debug() for dev_dbg()
- Clarify commit summary message
drivers/pcmcia/i82092.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/pcmcia/i82092.c +3 -3
@@ -117,9 +117,9 @@ static int i82092aa_pci_probe(struct pci_dev *dev, const struct pci_device_id *iif (card_present (i)) { sockets[i].card_state =3 ; -dprintk (KERN_DEBUG "i82092aa: slot %i is occupied\n" ,i); +dev_dbg (&dev->dev,"i82092aa: slot %i is occupied\n" , i); }else { -dprintk (KERN_DEBUG "i82092aa: slot %i is vacant\n" ,i); +dev_dbg (&dev->dev,"i82092aa: slot %i is vacant\n" , i); } }
@@ -128,7 +128,7 @@ static int i82092aa_pci_probe(struct pci_dev *dev, const struct pci_device_id *ipci_write_config_byte (dev,0x50 , configbyte);/* PCI Interrupt Routing Register */ /* Register the interrupt handler */ -dprintk (KERN_DEBUG "Requesting interrupt %i \n" ,dev->irq); +dev_dbg (&dev->dev,"Requesting interrupt %i\n" , dev->irq);if ((ret =request_irq (dev->irq, i82092aa_interrupt,IRQF_SHARED ,"i82092aa" , i82092aa_interrupt))) {printk (KERN_ERR "i82092aa: Failed to register IRQ %d, aborting\n" , dev->irq); goto err_out_free_res;
Signature · 1 line
2.20.1