From: Joe Perches <joe@perches.com>
To: Johannes Schilling <of82ecuq@cip.cs.fau.de>
Cc: linux-kernel@vger.kernel.org, linux-kernel@i4.cs.fau.de,
Al Cho <acho@novell.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Amarjargal Gundjalam <amarjargal16@gmail.com>,
Kurt Kanzenbach <shifty91@gmail.com>,
devel@driverdev.osuosl.org,
Laura Lawniczak <laura.lawniczak@googlemail.com>,
Dan Carpenter <dan.carpenter@oracle.com>
Subject: Re: [PATCH 3/6] keucr: migrate printk to dev_dbg/info/warn/err
Date: Thu, 06 Jun 2013 10:53:20 -0700 [thread overview]
Message-ID: <1370541200.2209.6.camel@joe-AO722> (raw)
In-Reply-To: <1370535050-7167-4-git-send-email-of82ecuq@cip.cs.fau.de>
On Thu, 2013-06-06 at 18:10 +0200, Johannes Schilling wrote:
> From: Laura Lawniczak <laura.lawniczak@googlemail.com>
[]
> diff --git a/drivers/staging/keucr/init.c b/drivers/staging/keucr/init.c
[]
> @@ -19,13 +19,13 @@ int ENE_InitMedia(struct us_data *us)
[]
> - printk(KERN_INFO "MiscReg03 = %x\n", MiscReg03);
> + dev_info(&us->pusb_dev->dev, "MiscReg03 = %x\n", MiscReg03);
I suggest adding a few convenience macros to make
this a bit shorter and more likely to fit on a single
line without exceeding 80 cols.
Adding something like:
#define us_<level>(us, fmt, ...) \
dev_<level>(&us->pusb_dev->dev, fmt, ##__VA_ARGS__)
so these uses become
us_info(us, "MiscReg03\n", MiscReg03);
which is shorter and more readable.
> diff --git a/drivers/staging/keucr/smilsub.c b/drivers/staging/keucr/smilsub.c
[]
> @@ -214,7 +214,7 @@ int Ssfdc_D_ReadSect(struct us_data *us, BYTE *buf, BYTE *redundant)
>
> result = ENE_LoadBinCode(us, SM_RW_PATTERN);
> if (result != USB_STOR_XFER_GOOD) {
> - printk("Load SM RW Code Fail !!\n");
> + dev_err(&us->pusb_dev->dev, "Load SM RW Code Fail !!\n");
Also, there's no need to shout in the logs.
These are reported at KERN_ERR level, so using
us_err(us, "loading SM RW code failed\n")
would be fine.
next prev parent reply other threads:[~2013-06-06 17:53 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-05 8:50 [PATCH 0/6] keucr: checkpatch fixes Johannes Schilling
2013-06-05 8:50 ` [PATCH 1/6] keucr: remove some unneccesary typedefs Johannes Schilling
2013-06-05 9:25 ` Dan Carpenter
2013-06-05 8:50 ` [PATCH 2/6] keucr: fix some camelCase warnings Johannes Schilling
2013-06-05 9:23 ` Dan Carpenter
2013-06-05 9:48 ` Dan Carpenter
2013-06-05 8:50 ` [PATCH 3/6] keucr: migrate printk to dev_dbg/info/warn/err Johannes Schilling
2013-06-05 9:32 ` Dan Carpenter
2013-06-05 8:50 ` [PATCH 4/6] keucr: make error messages less aggressive Johannes Schilling
2013-06-05 9:36 ` Dan Carpenter
2013-06-05 8:50 ` [PATCH 5/6] keucr: fix some alignment- and whitespace-problems Johannes Schilling
2013-06-05 8:50 ` [PATCH 6/6] keucr: use more specific max_t(int, Johannes Schilling
2013-06-05 9:45 ` Dan Carpenter
2013-06-06 16:10 ` [PATCH 0/6] keucr: checkpatch fixes Johannes Schilling
2013-06-06 16:10 ` [PATCH 1/6] keucr: remove some unneccesary typedefs Johannes Schilling
2013-06-06 16:10 ` [PATCH 2/6] keucr: use more specific max_t(int, Johannes Schilling
2013-06-06 16:10 ` [PATCH 3/6] keucr: migrate printk to dev_dbg/info/warn/err Johannes Schilling
2013-06-06 17:53 ` Joe Perches [this message]
2013-06-06 21:11 ` Dan Carpenter
2013-06-06 21:23 ` Joe Perches
2013-06-06 22:07 ` Dan Carpenter
2013-06-06 21:14 ` Dan Carpenter
2013-06-06 16:10 ` [PATCH 4/6] keucr: more readable and friendly error messages Johannes Schilling
2013-06-06 21:48 ` Dan Carpenter
2013-06-06 16:10 ` [PATCH 5/6] keucr: moved function to other file Johannes Schilling
2013-06-06 21:23 ` Dan Carpenter
2013-06-06 16:10 ` [PATCH 6/6] keucr: fix some alignment- and whitespace-problems Johannes Schilling
2013-06-06 18:03 ` Joe Perches
2013-06-06 21:44 ` Dan Carpenter
2013-06-06 18:47 ` [PATCH 0/6] keucr: checkpatch fixes Greg Kroah-Hartman
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=1370541200.2209.6.camel@joe-AO722 \
--to=joe@perches.com \
--cc=acho@novell.com \
--cc=amarjargal16@gmail.com \
--cc=dan.carpenter@oracle.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=laura.lawniczak@googlemail.com \
--cc=linux-kernel@i4.cs.fau.de \
--cc=linux-kernel@vger.kernel.org \
--cc=of82ecuq@cip.cs.fau.de \
--cc=shifty91@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®