* [PATCH] Staging: dgnc: Replace printk() with dev_info()
@ 2015-02-27 14:53 Cristina Opriceana
2015-02-27 14:59 ` [Outreachy kernel] " Greg KH
0 siblings, 1 reply; 2+ messages in thread
From: Cristina Opriceana @ 2015-02-27 14:53 UTC (permalink / raw)
To: outreachy-kernel
This patch replaces printk() with dev_info() in order to avoid the
suggestion of using a more specific function.
Warning found by checkpatch.pl
Signed-off-by: Cristina Opriceana <cristina.opriceana@gmail.com>
---
drivers/staging/dgnc/dgnc_driver.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/dgnc/dgnc_driver.c b/drivers/staging/dgnc/dgnc_driver.c
index ace2af6..cd349cd 100644
--- a/drivers/staging/dgnc/dgnc_driver.c
+++ b/drivers/staging/dgnc/dgnc_driver.c
@@ -364,7 +364,7 @@ static void dgnc_cleanup_board(struct dgnc_board *brd)
spin_lock_irqsave(&dgnc_global_lock, flags);
brd->msgbuf = NULL;
- printk("%s", brd->msgbuf_head);
+ dev_info(&brd->pdev->dev, "dgnc : %s\n", brd->msgbuf_head);
kfree(brd->msgbuf_head);
brd->msgbuf_head = NULL;
spin_unlock_irqrestore(&dgnc_global_lock, flags);
@@ -612,7 +612,7 @@ static int dgnc_found_board(struct pci_dev *pdev, int id)
spin_lock_irqsave(&dgnc_global_lock, flags);
brd->msgbuf = NULL;
- printk("%s", brd->msgbuf_head);
+ dev_info(&brd->pdev->dev, "dgnc : %s\n", brd->msgbuf_head);
kfree(brd->msgbuf_head);
brd->msgbuf_head = NULL;
spin_unlock_irqrestore(&dgnc_global_lock, flags);
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [Outreachy kernel] [PATCH] Staging: dgnc: Replace printk() with dev_info()
2015-02-27 14:53 [PATCH] Staging: dgnc: Replace printk() with dev_info() Cristina Opriceana
@ 2015-02-27 14:59 ` Greg KH
0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2015-02-27 14:59 UTC (permalink / raw)
To: Cristina Opriceana; +Cc: outreachy-kernel
On Fri, Feb 27, 2015 at 04:53:22PM +0200, Cristina Opriceana wrote:
> This patch replaces printk() with dev_info() in order to avoid the
> suggestion of using a more specific function.
> Warning found by checkpatch.pl
>
> Signed-off-by: Cristina Opriceana <cristina.opriceana@gmail.com>
> ---
> drivers/staging/dgnc/dgnc_driver.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/dgnc/dgnc_driver.c b/drivers/staging/dgnc/dgnc_driver.c
> index ace2af6..cd349cd 100644
> --- a/drivers/staging/dgnc/dgnc_driver.c
> +++ b/drivers/staging/dgnc/dgnc_driver.c
> @@ -364,7 +364,7 @@ static void dgnc_cleanup_board(struct dgnc_board *brd)
>
> spin_lock_irqsave(&dgnc_global_lock, flags);
> brd->msgbuf = NULL;
> - printk("%s", brd->msgbuf_head);
> + dev_info(&brd->pdev->dev, "dgnc : %s\n", brd->msgbuf_head);
If you use dev_info, there is no need for the "dgnc : " portion of the
string, it will show up automatically.
And this really looks like debugging information, why not use dev_dbg()
instead?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-02-27 14:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-27 14:53 [PATCH] Staging: dgnc: Replace printk() with dev_info() Cristina Opriceana
2015-02-27 14:59 ` [Outreachy kernel] " Greg KH
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.