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] [day] [month] [year] [list]
Date:   Mon, 20 Aug 2018 10:59:19 -0700
From:   Joe Perches <joe@...ches.com>
To:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Nishad Kamdar <nishadkamdar@...il.com>
Cc:     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>
Subject: Re: [PATCH v3] staging: mt7621-mmc: Fix debug macros and their
 usages

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...

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ