LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] staging: lustre: fix coding style errors in drivers/staging/lustre/lustre/libcfs/linux/linux-proc.c
@ 2015-02-05 22:07 Tal Shorer
2015-02-05 22:28 ` Drokin, Oleg
0 siblings, 1 reply; 2+ messages in thread
From: Tal Shorer @ 2015-02-05 22:07 UTC (permalink / raw)
To: linux-kernel
Cc: oleg.drokin, andreas.dilger, gregkh, dan.carpenter, tal.shorer,
luca, clabbe.montjoie, PDD-discuss, devel
Signed-off-by: Tal Shorer <tal.shorer@gmail.com>
---
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 <asm/div64.h>
#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 */
static int max_watchdog_ratelimit = (24*60*60); /* limit to once per day */
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] staging: lustre: fix coding style errors in drivers/staging/lustre/lustre/libcfs/linux/linux-proc.c
2015-02-05 22:07 [PATCH] staging: lustre: fix coding style errors in drivers/staging/lustre/lustre/libcfs/linux/linux-proc.c Tal Shorer
@ 2015-02-05 22:28 ` Drokin, Oleg
0 siblings, 0 replies; 2+ messages in thread
From: Drokin, Oleg @ 2015-02-05 22:28 UTC (permalink / raw)
To: Tal Shorer
Cc: <linux-kernel@vger.kernel.org>,
Dilger, Andreas, <gregkh@linuxfoundation.org>,
<dan.carpenter@oracle.com>, <luca@lucaceresoli.net>,
<clabbe.montjoie@gmail.com>,
<PDD-discuss@lists.01.org>,
<devel@driverdev.osuosl.org>
On Feb 5, 2015, at 5:07 PM, Tal Shorer wrote:
> Signed-off-by: Tal Shorer <tal.shorer@gmail.com>
> ---
> 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 <asm/div64.h>
> #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
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-02-05 22:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-05 22:07 [PATCH] staging: lustre: fix coding style errors in drivers/staging/lustre/lustre/libcfs/linux/linux-proc.c Tal Shorer
2015-02-05 22:28 ` Drokin, Oleg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).