diff mbox series

[24/37] lustre: lu_object: remove extra newline from debug printing.

Message ID 155053494611.24125.2469014113532688461.stgit@noble.brown (mailing list archive)
State New, archived
Headers show
Series More lustre patches from obdclass | expand

Commit Message

NeilBrown Feb. 19, 2019, 12:09 a.m. UTC
In lu_cdebug_printer(), is "complete" is true, then
key->lck_area ends with a newline, so there is no need to
include on in the format too.

Signed-off-by: NeilBrown <neilb@suse.com>
---
 drivers/staging/lustre/lustre/obdclass/lu_object.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

James Simmons Feb. 24, 2019, 7:08 p.m. UTC | #1
> In lu_cdebug_printer(), is "complete" is true, then
> key->lck_area ends with a newline, so there is no need to
> include on in the format too.

We thought we found all those extra or missing newlines. Thanks
for finding it.

Reviewed-by: James Simmons <jsimmons@infradead.org>
 
> Signed-off-by: NeilBrown <neilb@suse.com>
> ---
>  drivers/staging/lustre/lustre/obdclass/lu_object.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/lustre/lustre/obdclass/lu_object.c b/drivers/staging/lustre/lustre/obdclass/lu_object.c
> index d4f1eddd96ca..3e23babb329a 100644
> --- a/drivers/staging/lustre/lustre/obdclass/lu_object.c
> +++ b/drivers/staging/lustre/lustre/obdclass/lu_object.c
> @@ -526,7 +526,7 @@ int lu_cdebug_printer(const struct lu_env *env,
>  		  ARRAY_SIZE(key->lck_area) - used, format, args);
>  	if (complete) {
>  		if (cfs_cdebug_show(msgdata->msg_mask, msgdata->msg_subsys))
> -			libcfs_debug_msg(msgdata, "%s\n", key->lck_area);
> +			libcfs_debug_msg(msgdata, "%s", key->lck_area);
>  		key->lck_area[0] = 0;
>  	}
>  	va_end(args);
> 
> 
>
Andreas Dilger Feb. 25, 2019, 6:16 p.m. UTC | #2
On Feb 18, 2019, at 16:09, NeilBrown <neilb@suse.com> wrote:
> 
> In lu_cdebug_printer(), is "complete" is true, then
> key->lck_area ends with a newline, so there is no need to
> include on in the format too.
> 
> Signed-off-by: NeilBrown <neilb@suse.com>

Reviewed-by: Andreas Dilger <adilger@whamcloud.com>

Cheers, Andreas
---
Andreas Dilger
Principal Lustre Architect
Whamcloud
diff mbox series

Patch

diff --git a/drivers/staging/lustre/lustre/obdclass/lu_object.c b/drivers/staging/lustre/lustre/obdclass/lu_object.c
index d4f1eddd96ca..3e23babb329a 100644
--- a/drivers/staging/lustre/lustre/obdclass/lu_object.c
+++ b/drivers/staging/lustre/lustre/obdclass/lu_object.c
@@ -526,7 +526,7 @@  int lu_cdebug_printer(const struct lu_env *env,
 		  ARRAY_SIZE(key->lck_area) - used, format, args);
 	if (complete) {
 		if (cfs_cdebug_show(msgdata->msg_mask, msgdata->msg_subsys))
-			libcfs_debug_msg(msgdata, "%s\n", key->lck_area);
+			libcfs_debug_msg(msgdata, "%s", key->lck_area);
 		key->lck_area[0] = 0;
 	}
 	va_end(args);