The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH 1/1] fs/jffs2/compr.c: remove 0 assignment on static
@ 2014-05-19 19:31 Fabian Frederick
  2014-05-19 19:53 ` Joe Perches
  0 siblings, 1 reply; 4+ messages in thread
From: Fabian Frederick @ 2014-05-19 19:31 UTC (permalink / raw)
  To: linux-kernel; +Cc: akpm, David Woodhouse

static values are automatically initialized to NULL

Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Fabian Frederick <fabf@skynet.be>
---
 fs/jffs2/compr.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/fs/jffs2/compr.c b/fs/jffs2/compr.c
index 4849a4c..a673221 100644
--- a/fs/jffs2/compr.c
+++ b/fs/jffs2/compr.c
@@ -25,7 +25,8 @@ static LIST_HEAD(jffs2_compressor_list);
 static int jffs2_compression_mode = JFFS2_COMPR_MODE_PRIORITY;
 
 /* Statistics for blocks stored without compression */
-static uint32_t none_stat_compr_blocks=0,none_stat_decompr_blocks=0,none_stat_compr_size=0;
+static uint32_t none_stat_compr_blocks, none_stat_decompr_blocks,
+		none_stat_compr_size;
 
 
 /*
-- 
1.8.4.5


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/1] fs/jffs2/compr.c: remove 0 assignment on static
  2014-05-19 19:31 [PATCH 1/1] fs/jffs2/compr.c: remove 0 assignment on static Fabian Frederick
@ 2014-05-19 19:53 ` Joe Perches
  2014-05-19 19:56   ` David Woodhouse
  0 siblings, 1 reply; 4+ messages in thread
From: Joe Perches @ 2014-05-19 19:53 UTC (permalink / raw)
  To: Fabian Frederick; +Cc: linux-kernel, akpm, David Woodhouse

On Mon, 2014-05-19 at 21:31 +0200, Fabian Frederick wrote:
> static values are automatically initialized to NULL
[]
> diff --git a/fs/jffs2/compr.c b/fs/jffs2/compr.c
[]
> @@ -25,7 +25,8 @@ static LIST_HEAD(jffs2_compressor_list);
>  static int jffs2_compression_mode = JFFS2_COMPR_MODE_PRIORITY;
>  
>  /* Statistics for blocks stored without compression */
> -static uint32_t none_stat_compr_blocks=0,none_stat_decompr_blocks=0,none_stat_compr_size=0;
> +static uint32_t none_stat_compr_blocks, none_stat_decompr_blocks,
> +		none_stat_compr_size;

Maybe nicer on 3 lines.

static uint32_t none_stat_compr_blocks;
static uint32_t none_stat_decompr_blocks,
static uint32_t none_stat_compr_size;

These none_stat_<foo> variables seem to
be write only so it'd probably be better
to remove them instead.

Maybe all the uint32_t uses in fs/jffs2/
would be nicer as u32.



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/1] fs/jffs2/compr.c: remove 0 assignment on static
  2014-05-19 19:53 ` Joe Perches
@ 2014-05-19 19:56   ` David Woodhouse
  2014-05-19 20:01     ` Joe Perches
  0 siblings, 1 reply; 4+ messages in thread
From: David Woodhouse @ 2014-05-19 19:56 UTC (permalink / raw)
  To: Joe Perches; +Cc: Fabian Frederick, linux-kernel, akpm

[-- Attachment #1: Type: text/plain, Size: 222 bytes --]

On Mon, 2014-05-19 at 12:53 -0700, Joe Perches wrote:
> Maybe all the uint32_t uses in fs/jffs2/
> would be nicer as u32.

No thanks. We prefer this code in standard C.
1999 is a long time ago now...

-- 
dwmw2


[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 5745 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/1] fs/jffs2/compr.c: remove 0 assignment on static
  2014-05-19 19:56   ` David Woodhouse
@ 2014-05-19 20:01     ` Joe Perches
  0 siblings, 0 replies; 4+ messages in thread
From: Joe Perches @ 2014-05-19 20:01 UTC (permalink / raw)
  To: David Woodhouse; +Cc: Fabian Frederick, linux-kernel, akpm

On Mon, 2014-05-19 at 20:56 +0100, David Woodhouse wrote:
> On Mon, 2014-05-19 at 12:53 -0700, Joe Perches wrote:
> > Maybe all the uint32_t uses in fs/jffs2/
> > would be nicer as u32.
> 
> No thanks. We prefer this code in standard C.
> 1999 is a long time ago now...

That's certainly your choice you nonconformist...

$ git grep -w u32 | wc -l
138805
$ git grep -w uint32_t | wc -l
20420

But I gather you don't like to party?



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-05-19 20:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-19 19:31 [PATCH 1/1] fs/jffs2/compr.c: remove 0 assignment on static Fabian Frederick
2014-05-19 19:53 ` Joe Perches
2014-05-19 19:56   ` David Woodhouse
2014-05-19 20:01     ` Joe Perches

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox