linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] pcmcia/i82092: Refactored dprintk macro for pr_debug().
@ 2019-08-23  6:29 Adam Zerella
  2019-08-23 17:43 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 3+ messages in thread
From: Adam Zerella @ 2019-08-23  6:29 UTC (permalink / raw)
  Cc: Adam Zerella, Dominik Brodowski, Greg Kroah-Hartman,
	Thomas Gleixner, linux-kernel

As pointed out in https://kernelnewbies.org/KernelJanitors/Todo
this patch replaces the outdated macro of DPRINTK for pr_debug()

To: Dominik Brodowski <linux@dominikbrodowski.net>
To: Thomas Gleixner <tglx@linutronix.de>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Adam Zerella <adam.zerella@gmail.com>
To: linux-kernel@vger.kernel.org
Signed-off-by: Adam Zerella <adam.zerella@gmail.com>
---
 drivers/pcmcia/i82092.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/pcmcia/i82092.c b/drivers/pcmcia/i82092.c
index ec54a2aa5cb8..e1929520c20e 100644
--- a/drivers/pcmcia/i82092.c
+++ b/drivers/pcmcia/i82092.c
@@ -117,9 +117,9 @@ static int i82092aa_pci_probe(struct pci_dev *dev, const struct pci_device_id *i
 		
 		if (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 *i
 	pci_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;
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] pcmcia/i82092: Refactored dprintk macro for pr_debug().
  2019-08-23  6:29 [PATCH] pcmcia/i82092: Refactored dprintk macro for pr_debug() Adam Zerella
@ 2019-08-23 17:43 ` Greg Kroah-Hartman
  2019-08-25  5:35   ` [PATCH v2] pcmcia/i82092: Refactored dprintk macro for dev_dbg() Adam Zerella
  0 siblings, 1 reply; 3+ messages in thread
From: Greg Kroah-Hartman @ 2019-08-23 17:43 UTC (permalink / raw)
  To: Adam Zerella; +Cc: Dominik Brodowski, Thomas Gleixner, linux-kernel

On Fri, Aug 23, 2019 at 04:29:49PM +1000, Adam Zerella wrote:
> As pointed out in https://kernelnewbies.org/KernelJanitors/Todo
> this patch replaces the outdated macro of DPRINTK for pr_debug()
> 
> To: Dominik Brodowski <linux@dominikbrodowski.net>
> To: Thomas Gleixner <tglx@linutronix.de>
> To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> To: Adam Zerella <adam.zerella@gmail.com>
> To: linux-kernel@vger.kernel.org
> Signed-off-by: Adam Zerella <adam.zerella@gmail.com>
> ---
>  drivers/pcmcia/i82092.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/pcmcia/i82092.c b/drivers/pcmcia/i82092.c
> index ec54a2aa5cb8..e1929520c20e 100644
> --- a/drivers/pcmcia/i82092.c
> +++ b/drivers/pcmcia/i82092.c
> @@ -117,9 +117,9 @@ static int i82092aa_pci_probe(struct pci_dev *dev, const struct pci_device_id *i
>  		
>  		if (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.


>  		}
>  	}
>  		
> @@ -128,7 +128,7 @@ static int i82092aa_pci_probe(struct pci_dev *dev, const struct pci_device_id *i
>  	pci_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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH v2] pcmcia/i82092: Refactored dprintk macro for dev_dbg().
  2019-08-23 17:43 ` Greg Kroah-Hartman
@ 2019-08-25  5:35   ` Adam Zerella
  0 siblings, 0 replies; 3+ messages in thread
From: Adam Zerella @ 2019-08-25  5:35 UTC (permalink / raw)
  Cc: Adam Zerella, Dominik Brodowski, Thomas Gleixner,
	Greg Kroah-Hartman, linux-kernel

As suggested in https://kernelnewbies.org/KernelJanitors/Todo
this patch replaces the outdated macro of DPRINTK for dev_dbg()

To: Dominik Brodowski <linux@dominikbrodowski.net>
To: Thomas Gleixner <tglx@linutronix.de>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Adam Zerella <adam.zerella@gmail.com>
To: linux-kernel@vger.kernel.org
Signed-off-by: Adam Zerella <adam.zerella@gmail.com>
---
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(-)

diff --git a/drivers/pcmcia/i82092.c b/drivers/pcmcia/i82092.c
index ec54a2aa5cb8..245d60189375 100644
--- a/drivers/pcmcia/i82092.c
+++ b/drivers/pcmcia/i82092.c
@@ -117,9 +117,9 @@ static int i82092aa_pci_probe(struct pci_dev *dev, const struct pci_device_id *i
 		
 		if (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 *i
 	pci_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;
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-08-25  5:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-23  6:29 [PATCH] pcmcia/i82092: Refactored dprintk macro for pr_debug() Adam Zerella
2019-08-23 17:43 ` Greg Kroah-Hartman
2019-08-25  5:35   ` [PATCH v2] pcmcia/i82092: Refactored dprintk macro for dev_dbg() Adam Zerella

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).