Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1558062 > unrolled thread
| Started by | Oleg Drokin <oleg.drokin@intel.com> |
|---|---|
| First post | 2017-01-13 08:00 +0100 |
| Last post | 2017-01-13 08:50 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH 2/5] staging/lustre/mgc: Combine two seq_printf() calls into one call in lprocfs_mgc_rd_ir_state() Oleg Drokin <oleg.drokin@intel.com> - 2017-01-13 08:00 +0100
Re: [PATCH 2/5] staging/lustre/mgc: Combine two seq_printf() calls into one call in lprocfs_mgc_rd_ir_state() Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-01-13 08:50 +0100
| From | Oleg Drokin <oleg.drokin@intel.com> |
|---|---|
| Date | 2017-01-13 08:00 +0100 |
| Subject | Re: [PATCH 2/5] staging/lustre/mgc: Combine two seq_printf() calls into one call in lprocfs_mgc_rd_ir_state() |
| Message-ID | <sZ409-62y-5@gated-at.bofh.it> |
On Jan 1, 2017, at 11:35 AM, SF Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Sun, 1 Jan 2017 15:40:29 +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@users.sourceforge.net>
> ---
> drivers/staging/lustre/lustre/mgc/mgc_request.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/drivers/staging/lustre/lustre/mgc/mgc_request.c b/drivers/staging/lustre/lustre/mgc/mgc_request.c
> index b9c522a3c7a4..a6ca48d7e96b 100644
> --- a/drivers/staging/lustre/lustre/mgc/mgc_request.c
> +++ b/drivers/staging/lustre/lustre/mgc/mgc_request.c
> @@ -460,11 +460,8 @@ int lprocfs_mgc_rd_ir_state(struct seq_file *m, void *data)
>
> imp = obd->u.cli.cl_import;
> ocd = &imp->imp_connect_data;
> -
> - seq_printf(m, "imperative_recovery: %s\n",
> + seq_printf(m, "imperative_recovery: %s\nclient_state:\n",
> OCD_HAS_FLAG(ocd, IMP_RECOV) ? "ENABLED" : "DISABLED");
> - seq_printf(m, "client_state:\n");
> -
Ugh, do we really need this?
I know it saves one call to seq_printf, but this is not a super performance-critical
code, and two calls are actually easier to read, don't you think?
> spin_lock(&config_list_lock);
> list_for_each_entry(cld, &config_llog_list, cld_list_chain) {
> if (!cld->cld_recover)
> --
> 2.11.0
[toc] | [next] | [standalone]
| From | Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
|---|---|
| Date | 2017-01-13 08:50 +0100 |
| Subject | Re: [PATCH 2/5] staging/lustre/mgc: Combine two seq_printf() calls into one call in lprocfs_mgc_rd_ir_state() |
| Message-ID | <sZ4Mx-6xa-1@gated-at.bofh.it> |
| In reply to | #1558062 |
On Fri, Jan 13, 2017 at 01:58:37AM -0500, Oleg Drokin wrote: > > On Jan 1, 2017, at 11:35 AM, SF Markus Elfring wrote: <snip> Oleg, please realize that I have blacklisted this patch author, and don't take contributions from them, unless you, or someone else wishes to properly review and pass them on. I've found that personally, it's just a waste of time working with them, but you are free to do whatever you wish... good luck! greg k-h
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web