mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Nishad Kamdar <nishadkamdar@gmail.com>
Cc: "Dan Carpenter" <dan.carpenter@oracle.com>,
	devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
	"Joe Perches" <joe@perches.com>, NeilBrown <neil@brown.name>,
	"Christian Lütke-Stetzkamp" <christian@lkamp.de>,
	"John Crispin" <blogic@openwrt.org>
Subject: Re: [PATCH v4 1/4] staging: mt7621-mmc: Fix debug macro N_MSG
Date: Wed, 22 Aug 2018 13:26:41 +0200	[thread overview]
Message-ID: <20180822112641.GA21716@kroah.com> (raw)
In-Reply-To: <20180822111052.GA2675@nishad>

On Wed, Aug 22, 2018 at 04:40:56PM +0530, Nishad Kamdar wrote:
> On Wed, Aug 22, 2018 at 12:09:36PM +0300, Dan Carpenter wrote:
> > On Wed, Aug 22, 2018 at 02:04:55PM +0530, Nishad Kamdar wrote:
> > > This patch fixes the debug macro N_MSG. Replaces printk with
> > > dev_<level> without __func__ or __LINE__ or current->comm and
> > > current->pid. Removes the do {} while(0) loop for the single
> > > statement macro. Issue found by checkpatch.
> > > 
> > > Signed-off-by: Nishad Kamdar <nishadkamdar@gmail.com>
> > > ---
> > >  drivers/staging/mt7621-mmc/dbg.h | 11 ++++-------
> > >  1 file changed, 4 insertions(+), 7 deletions(-)
> > > 
> > > diff --git a/drivers/staging/mt7621-mmc/dbg.h b/drivers/staging/mt7621-mmc/dbg.h
> > > index 2f2c56b73987..c56fb896617a 100644
> > > --- a/drivers/staging/mt7621-mmc/dbg.h
> > > +++ b/drivers/staging/mt7621-mmc/dbg.h
> > > @@ -104,13 +104,10 @@ do { \
> > >  
> > >  #define N_MSG(evt, fmt, args...)
> > >  /*
> > > -do {    \
> > > -    if ((DBG_EVT_##evt) & sd_debug_zone[host->id]) { \
> > > -        printk(KERN_ERR TAG"%d -> "fmt" <- %s() : L<%d> PID<%s><0x%x>\n", \
> > > -            host->id,  ##args , __FUNCTION__, __LINE__, current->comm, current->pid);	\
> > > -    } \
> > > -} while(0)
> > > -*/
> > > + *if ((DBG_EVT_##evt) & sd_debug_zone[host->id]) { \
> > > + *    dev_err(mmc_dev(host->mmc), "%d -> " fmt "\n", host->id, ##args) \
> > > + *}
> > > + */
> > 
> > I don't understand what you're trying to do here.  You just commented
> > out the macro and turned it into a no-op.  That's not what the patch
> > description says.
> > 
> > To me the original code seems fine.
> > 
> > regards,
> > dan carpenter
> >
> 
> Ok. But the macro definition was already commented.
> I just changed printk to dev_err and gave it a better
> block comment format.
> Should I leave the older version as it is ?

No, delete the whole thing if it is not being used, don't "convert" code
that is commented out.

thanks,

greg k-h

  reply	other threads:[~2018-08-22 11:26 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-22  8:33 [PATCH v4 0/4] Fix debug macros and their usages Nishad Kamdar
2018-08-22  8:34 ` [PATCH v4 1/4] staging: mt7621-mmc: Fix debug macro N_MSG Nishad Kamdar
2018-08-22  9:09   ` Dan Carpenter
2018-08-22 11:10     ` Nishad Kamdar
2018-08-22 11:26       ` Greg Kroah-Hartman [this message]
2018-08-23 17:13         ` Nishad Kamdar
2018-08-22 11:38       ` Dan Carpenter
2018-08-23 17:19         ` Nishad Kamdar
2018-08-22  8:43 ` [PATCH v4 2/4] staging: mt7621-mmc: Fix debug macro ERR_MSG and its usages Nishad Kamdar
2018-08-22  9:13   ` Dan Carpenter
2018-08-22 11:16     ` Nishad Kamdar
2018-08-23 17:15     ` Nishad Kamdar
2018-08-22  8:45 ` [PATCH v4 3/4] staging: mt7621-mmc: Remove macro INIT_MSG " Nishad Kamdar
2018-08-22  8:47 ` [PATCH v4 4/4] staging: mt7621-mmc: Fix debug macro IRQ_MSG " Nishad Kamdar

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=20180822112641.GA21716@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=blogic@openwrt.org \
    --cc=christian@lkamp.de \
    --cc=dan.carpenter@oracle.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=joe@perches.com \
    --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

Powered by JetHome