lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180823171336.GA18185@nishad>
Date:   Thu, 23 Aug 2018 22:43:38 +0530
From:   Nishad Kamdar <nishadkamdar@...il.com>
To:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:     Joe Perches <joe@...ches.com>, NeilBrown <neil@...wn.name>,
        devel@...verdev.osuosl.org,
        Christian Lütke-Stetzkamp <christian@...mp.de>,
        linux-kernel@...r.kernel.org, John Crispin <blogic@...nwrt.org>,
        Dan Carpenter <dan.carpenter@...cle.com>
Subject: Re: [PATCH v4 1/4] staging: mt7621-mmc: Fix debug macro N_MSG

On Wed, Aug 22, 2018 at 01:26:41PM +0200, Greg Kroah-Hartman wrote:
> 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@...il.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

Ok, I'll do that.

Thanks for the review.

regards,
nishad

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ