From: Joe Perches <joe@perches.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Nishad Kamdar <nishadkamdar@gmail.com>
Cc: NeilBrown <neil@brown.name>,
devel@driverdev.osuosl.org,
"Christian Lütke-Stetzkamp" <christian@lkamp.de>,
linux-kernel@vger.kernel.org, "John Crispin" <blogic@openwrt.org>
Subject: Re: [PATCH v3] staging: mt7621-mmc: Fix debug macros and their usages
Date: Mon, 20 Aug 2018 10:59:19 -0700 [thread overview]
Message-ID: <ecb6c8e8d1b7258b7ddc17213284afced8486f2a.camel@perches.com> (raw)
In-Reply-To: <20180819113401.GB18715@kroah.com>
On Sun, 2018-08-19 at 13:34 +0200, Greg Kroah-Hartman wrote:
> On Sun, Aug 19, 2018 at 03:35:02PM +0530, Nishad Kamdar wrote:
> > Fixed four debug macros and their usages. Replaced printk with
> > dev_<level> without __func__ or __LINE__ or current->comm and
> > current->pid. Further removed the do {} while(0) loop for single
> > statement macros.
> > Out of the four, replaced all usages of ERR_MSG and IRQ_MSG with
> > dev_err() in the code itself and dropped them from dbg.h.
> > Removed all INIT_MSG usages and dropped it from dgb.h.
> > Issues found by checkpatch.
>
> This needs to be multiple patches. One for each type of macro you are
> deleting/changing, not all lumped together into one big patch.
>
> Plaese fix that up and resend.
I'd also be tempted to add some logging macros like:
#define host_err(host, fmt, ...) \
dev_err(mmc_dev((host)->mmc, fmt, ##__VA_ARGS__)
so that the code flows a little better.
e.g.:
@@ -521,7 +517,7 @@ static void msdc_abort_data(struct msdc_host *host)> {
> struct mmc_command *stop = host->mrq->stop;
> - ERR_MSG("Need to Abort.");
> + dev_err(mmc_dev(host->mmc), "%d -> Need to Abort.\n", host->id);
> msdc_reset_hw(host);
> msdc_clr_fifo(host);
becomes
host_err(host, "%d -> Need to Abort\n", host->id);
etc...
next prev parent reply other threads:[~2018-08-20 17:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-19 10:05 Nishad Kamdar
2018-08-19 11:34 ` Greg Kroah-Hartman
2018-08-20 16:32 ` Nishad Kamdar
2018-08-20 17:59 ` Joe Perches [this message]
2018-08-20 9:22 ` Dan Carpenter
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=ecb6c8e8d1b7258b7ddc17213284afced8486f2a.camel@perches.com \
--to=joe@perches.com \
--cc=blogic@openwrt.org \
--cc=christian@lkamp.de \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=neil@brown.name \
--cc=nishadkamdar@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®