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: <1425486739.2712.12.camel@perches.com>
Date:	Wed, 04 Mar 2015 08:32:19 -0800
From:	Joe Perches <joe@...ches.com>
To:	Tao Chen <boby.chen@...wei.com>
Cc:	jgross@...e.com, konrad.wilk@...cle.com,
	boris.ostrovsky@...cle.com, david.vrabel@...rix.com,
	xen-devel@...ts.xenproject.org, linux-scsi@...r.kernel.org,
	linux-kernel@...r.kernel.org, wu.wubin@...wei.com,
	rudy.zhangmin@...wei.com
Subject: Re: [PATCH v2] xen-scsiback: use DRV_PFX in the pr macros and
 DPRINTK

On Wed, 2015-03-04 at 18:32 +0000, Tao Chen wrote:
> Defined the string of {xen-pvscsi: } as DRV_PFX, then use it in the pr sentences and DPRINTK.
> Also fixed up some comments just as eliminate redundant white spaces and format the code.
> These will make the code easier to read.

It'd probaby be better just to use pr_fmt
before any include and remove all the DRV_PRV uses

#define pr_fmt(fmt) "xen-pvscsi: " fmt

> diff --git a/drivers/xen/xen-scsiback.c b/drivers/xen/xen-scsiback.c
[]
> @@ -69,8 +69,10 @@
>  #include <xen/interface/grant_table.h>
>  #include <xen/interface/io/vscsiif.h>
>  
> +#define DRV_PFX "xen-pvscsi: "
>  #define DPRINTK(_f, _a...)			\
> -	pr_debug("(file=%s, line=%d) " _f, __FILE__ , __LINE__ , ## _a)
> +	pr_debug(DRV_PFX "(file=%s, line=%d) " _f,	\
> +			__FILE__ , __LINE__ , ## _a)

I'd also remove DPRINTK and just use pr_debug directly
as dynamic_debug can emit file and line as desired.

> @@ -84,7 +86,7 @@ struct ids_tuple {
>  
>  struct v2p_entry {
>  	struct ids_tuple v;		/* translate from */
> -	struct scsiback_tpg *tpg;	/* translate to   */
> +	struct scsiback_tpg *tpg;	/* translate to */

superfluous change.


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ