Re: [PATCH 2/8] Add yaffs2 file system: checkpoint and ecc code

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Jesper Juhl
Date: Sunday, December 5, 2010 - 2:55 pm

On Wed, 1 Dec 2010, Charles Manning wrote:


Just a few small comments below.


[...]

Why not get rid of the redundant local variable and simply do

  *sum = (dev->checkpt_sum << 8) | (dev->checkpt_xor & 0xFF);

??


[...]

'data' is a 'const void *' and this casts away const. Probably fine, just 
makes my toes curl.


[...]

here you are not casting away const, but since 'data' is a void pointer 
the cast is just completely superfluous and should just go away.


[...]

Nitpicking, but this should be 

  if (dev->checkpt_cur_block < 0) {
    ok = 0;
  } else {
  ...

curly brace on both branches since it's used on one of them (according to 
CodingStyle).


[...]

1) nitpicking about curly braces again (see above).
2) try grep'ing the source for "todo", "xxx", "fixme" and similar, then 
check the age of those comments. If things like this are not addressed (by 
other than a "todo" comment) on initial commit they stand a good chance of 
never getting addressed...


-- 
Jesper Juhl <jj@chaosbits.net>            http://www.chaosbits.net/
Don't top-post http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please.

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 0/8] Add yaffs2 file system: Third patchset, Charles Manning, (Tue Nov 30, 2:57 pm)
[PATCH 2/8] Add yaffs2 file system: checkpoint and ecc code, Charles Manning, (Tue Nov 30, 2:57 pm)
[PATCH 3/8] Add yaffs2 file system: guts code, Charles Manning, (Tue Nov 30, 2:57 pm)
[PATCH 4/8] Add yaffs2 file system: tags handling code, Charles Manning, (Tue Nov 30, 2:57 pm)
[PATCH 6/8] Add yaffs2 file system: xattrib code, Charles Manning, (Tue Nov 30, 2:57 pm)
Re: [PATCH 3/8] Add yaffs2 file system: guts code, Arnd Bergmann, (Tue Nov 30, 3:23 pm)
Re: [PATCH 2/8] Add yaffs2 file system: checkpoint and ecc ..., Jesper Juhl, (Sun Dec 5, 2:55 pm)
Re: [PATCH 6/8] Add yaffs2 file system: xattrib code, Jesper Juhl, (Sun Dec 5, 3:20 pm)
Re: [PATCH 3/8] Add yaffs2 file system: guts code, Arnd Bergmann, (Mon Dec 6, 5:55 am)
Re: [PATCH 3/8] Add yaffs2 file system: guts code, Charles Manning, (Mon Dec 6, 3:13 pm)
Re: [PATCH 3/8] Add yaffs2 file system: guts code, Jesper Juhl, (Mon Dec 6, 3:16 pm)
Re: [PATCH 3/8] Add yaffs2 file system: guts code, Arnd Bergmann, (Mon Dec 6, 4:03 pm)
Re: [PATCH 3/8] Add yaffs2 file system: guts code, Steven Rostedt, (Mon Dec 6, 5:47 pm)
Re: [PATCH 3/8] Add yaffs2 file system: guts code, Charles Manning, (Mon Dec 6, 9:12 pm)
Re: [PATCH 3/8] Add yaffs2 file system: guts code, Steven Rostedt, (Tue Dec 7, 7:49 am)
Re: [PATCH 3/8] Add yaffs2 file system: guts code, Charles Manning, (Tue Dec 7, 1:43 pm)
Re: [PATCH 3/8] Add yaffs2 file system: guts code, Steven Rostedt, (Tue Dec 7, 3:49 pm)