From: Greg KH <gregkh@linuxfoundation.org>
To: Matteo Semenzato <mattew8898@gmail.com>
Cc: lidza.louina@gmail.com, markh@compro.net,
driverdev-devel@linuxdriverproject.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Staging: dgnc: replace printk
Date: Sun, 1 Mar 2015 08:41:26 -0800 [thread overview]
Message-ID: <20150301164126.GB29474@kroah.com> (raw)
In-Reply-To: <1425198701-32702-1-git-send-email-mattew8898@gmail.com>
On Sun, Mar 01, 2015 at 09:31:41AM +0100, Matteo Semenzato wrote:
> From: Matteo Semenzato <mattew8898@gmail.com>
>
> This patch fixes the following warning:
> Prefer [subsystem eg: netdev]_err([subsystem]dev, ... then dev_err(dev,
> ... then pr_err(... to printk(KERN_ERR ...
>
> Signed-off-by: Matteo Semenzato <mattew8898@gmail.com>
> ---
> drivers/staging/dgnc/dgnc_sysfs.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/dgnc/dgnc_sysfs.c b/drivers/staging/dgnc/dgnc_sysfs.c
> index 2fd34ca..0fa2388 100644
> --- a/drivers/staging/dgnc/dgnc_sysfs.c
> +++ b/drivers/staging/dgnc/dgnc_sysfs.c
> @@ -91,7 +91,7 @@ void dgnc_create_driver_sysfiles(struct pci_driver *dgnc_driver)
> rc |= driver_create_file(driverfs, &driver_attr_maxboards);
> rc |= driver_create_file(driverfs, &driver_attr_pollrate);
> if (rc)
> - printk(KERN_ERR "DGNC: sysfs driver_create_file failed!\n");
> + pr_err("DGNC: sysfs driver_create_file failed!\n");
> }
>
>
> @@ -360,7 +360,7 @@ void dgnc_create_ports_sysfiles(struct dgnc_board *bd)
> rc |= device_create_file(&(bd->pdev->dev), &dev_attr_vpd);
> rc |= device_create_file(&(bd->pdev->dev), &dev_attr_serial_number);
> if (rc)
> - printk(KERN_ERR "DGNC: sysfs device_create_file failed!\n");
> + pr_err("DGNC: sysfs device_create_file failed!\n");
Why can't you use dev_err() here?
prev parent reply other threads:[~2015-03-01 16:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-01 8:31 Matteo Semenzato
2015-03-01 16:41 ` Greg KH [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150301164126.GB29474@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=driverdev-devel@linuxdriverproject.org \
--cc=lidza.louina@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=markh@compro.net \
--cc=mattew8898@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®