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]
Date:   Fri, 13 Jan 2017 01:59:51 -0500
From:   Oleg Drokin <oleg.drokin@...el.com>
To:     SF Markus Elfring <elfring@...rs.sourceforge.net>
Cc:     <devel@...verdev.osuosl.org>, <lustre-devel@...ts.lustre.org>,
        "Andreas Dilger" <andreas.dilger@...el.com>,
        Ben Evans <bevans@...y.com>, Bobi Jam <bobijam.xu@...el.com>,
        Emoly Liu <emoly.liu@...el.com>, Fan Yong <fan.yong@...el.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Gregoire Pichon <gregoire.pichon@...l.net>,
        Henri Doreau <henri.doreau@....fr>,
        James Simmons <jsimmons@...radead.org>,
        Jinshan Xiong <jinshan.xiong@...el.com>,
        "John L. Hammond" <john.hammond@...el.com>,
        "Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
        Lai Siyao <lai.siyao@...el.com>,
        Sebastien Buisson <sbuisson@....com>,
        Stephen Champion <schamp@....com>, wang di <di.wang@...el.com>,
        LKML <linux-kernel@...r.kernel.org>,
        <kernel-janitors@...r.kernel.org>
Subject: Re: [PATCH 4/5] staging/lustre/obdclass: Combine two seq_printf() calls into one call in lprocfs_rd_state()


On Jan 1, 2017, at 11:38 AM, SF Markus Elfring wrote:

> From: Markus Elfring <elfring@...rs.sourceforge.net>
> Date: Sun, 1 Jan 2017 16:26:36 +0100
> 
> Some data were printed into a sequence by two separate function calls.
> Print the same data by a single function call instead.
> 
> This issue was detected by using the Coccinelle software.
> 
> Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net>
> ---
> drivers/staging/lustre/lustre/obdclass/lprocfs_status.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/staging/lustre/lustre/obdclass/lprocfs_status.c b/drivers/staging/lustre/lustre/obdclass/lprocfs_status.c
> index 3f6fcab5a1fc..a167cbe8a50e 100644
> --- a/drivers/staging/lustre/lustre/obdclass/lprocfs_status.c
> +++ b/drivers/staging/lustre/lustre/obdclass/lprocfs_status.c
> @@ -853,10 +853,8 @@ int lprocfs_rd_state(struct seq_file *m, void *data)
> 		return rc;
> 
> 	imp = obd->u.cli.cl_import;
> -
> -	seq_printf(m, "current_state: %s\n",
> +	seq_printf(m, "current_state: %s\nstate_history:\n",
> 		   ptlrpc_import_state_name(imp->imp_state));
> -	seq_printf(m, "state_history:\n");

same as in that other patch - this actually makes the code a bit harder to read,
what's the perceived benefit to make a change like this?

> 	k = imp->imp_state_hist_idx;
> 	for (j = 0; j < IMP_STATE_HIST_LEN; j++) {
> 		struct import_state_hist *ish =
> -- 
> 2.11.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ