Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753664AbbBEW2n (ORCPT ); Thu, 5 Feb 2015 17:28:43 -0500 Received: from mga09.intel.com ([134.134.136.24]:2748 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751586AbbBEW2l convert rfc822-to-8bit (ORCPT ); Thu, 5 Feb 2015 17:28:41 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.09,526,1418112000"; d="scan'208";a="523299854" From: "Drokin, Oleg" To: Tal Shorer CC: "" , "Dilger, Andreas" , "" , "" , "" , "" , "" , "" Subject: Re: [PATCH] staging: lustre: fix coding style errors in drivers/staging/lustre/lustre/libcfs/linux/linux-proc.c Thread-Topic: [PATCH] staging: lustre: fix coding style errors in drivers/staging/lustre/lustre/libcfs/linux/linux-proc.c Thread-Index: AQHQQZBiskH6fu5oC0ezxpIdX6nbyZzjKQ0A Date: Thu, 5 Feb 2015 22:28:16 +0000 Message-ID: <159DFFC6-C7C3-4A11-9612-595984C9F4C3@intel.com> References: <1423174065-10829-1-git-send-email-tal.shorer@gmail.com> In-Reply-To: <1423174065-10829-1-git-send-email-tal.shorer@gmail.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.254.12.248] Content-Type: text/plain; charset="us-ascii" Content-ID: <6F84C6403F4E4B4A9E3130C6D4E75D39@intel.com> Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2402 Lines: 62 On Feb 5, 2015, at 5:07 PM, Tal Shorer wrote: > Signed-off-by: Tal Shorer > --- > drivers/staging/lustre/lustre/libcfs/linux/linux-proc.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/drivers/staging/lustre/lustre/libcfs/linux/linux-proc.c b/drivers/staging/lustre/lustre/libcfs/linux/linux-proc.c > index c539e37..acc2e10 100644 > --- a/drivers/staging/lustre/lustre/libcfs/linux/linux-proc.c > +++ b/drivers/staging/lustre/lustre/libcfs/linux/linux-proc.c > @@ -65,7 +65,7 @@ > #include > #include "../tracefile.h" > > -static struct ctl_table_header *lnet_table_header = NULL; > +static struct ctl_table_header *lnet_table_header; > extern char lnet_upcall[1024]; > /** > * The path of debug log dump upcall script. > @@ -165,7 +165,7 @@ static int proc_dobitmasks(struct ctl_table *table, int write, > __proc_dobitmasks); > } > > -static int min_watchdog_ratelimit = 0; /* disable ratelimiting */ > +static int min_watchdog_ratelimit; /* disable ratelimiting */ I think you just made this comment nonsensical by this change. = 0 is explained as that disables the rate limiting. With no assignment (I know it's a noop) it's now unclear what does the comment says and possibly needs to be expanded to say something like "0 to disable ratelimiting" or the like, but it's less readable. > static int max_watchdog_ratelimit = (24*60*60); /* limit to once per day */ In reality these two "variables" are nothing more than constants, they are never changed too. Their only purpose is to be fed into procfs code (proc_dointvec_minmax) to know the range of values to accepted. As such spelling them out makes the most sense in my view. The rest of the patch I think is good. Thanks. > static int __proc_dump_kernel(void *data, int write, > @@ -308,7 +308,7 @@ static int proc_console_backoff(struct ctl_table *table, int write, > dummy.proc_handler = &proc_dointvec; > > if (!write) { /* read */ > - backoff= libcfs_console_backoff; > + backoff = libcfs_console_backoff; > rc = proc_dointvec(&dummy, write, buffer, lenp, ppos); > return rc; > } > -- > 2.2.2 > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/