AF:
NF:0
PS:10
SRH:1
SFN:
DSR:
MID:<20070525155051.54d62954@ripper.onstor.net>
CFG:
PT:0
S:andy.sharp@onstor.com
RQ:
SSV:onstor-exch02.onstor.net
NSV:
SSH:
R:<richard.beck@onstor.com>,<maxim.kozlovsky@onstor.com>
MAID:1
X-Sylpheed-Privacy-System:
X-Sylpheed-Sign:0
SCF:#mh/Mailbox/sent
RMID:#imap/andys@onstor.net@onstor-exch02.onstor.net/INBOX	0	BB375AF679D4A34E9CA8DFA650E2B04E031D8862@onstor-exch02.onstor.net
X-Sylpheed-End-Special-Headers: 1
Date: Fri, 25 May 2007 15:51:01 -0700
From: Andrew Sharp <andy.sharp@onstor.com>
To: "Richard Beck" <richard.beck@onstor.com>
Cc: Maxim Kozlovsky <maxim.kozlovsky@onstor.com>
Subject: Re: neteee files for review
Message-ID: <20070525155101.7a676c73@ripper.onstor.net>
In-Reply-To: <BB375AF679D4A34E9CA8DFA650E2B04E031D8862@onstor-exch02.onstor.net>
References: <BB375AF679D4A34E9CA8DFA650E2B04E031D8862@onstor-exch02.onstor.net>
Organization: Onstor
X-Mailer: Sylpheed-Claws 2.6.0 (GTK+ 2.8.20; x86_64-pc-linux-gnu)
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

On Mon, 21 May 2007 13:55:39 -0700 "Richard Beck"
<richard.beck@onstor.com> wrote:

> Changelist:  	24011 =EF=BB=BF
> Client: 		=EF=BB=BFrichardb-linux
>=20
> --rb

file by file review follows.  unless it says "looks good" or "ok" or
something for a file, then it needs more work before it can be checked
in.  there is a bunch of style related stuff that needs fixing, but
that should be quick.  the other stuff you might need to discuss with
me.  feel free.

I'm cc'ing max, only because after you take care of these changes, you
need to resubmit for re-review, please add max to the email recipients
so that he and I can co-review it.

Thanks,

a

linux/kernel/linux-mips-2.6/arch/s390/defconfig

     nope.  do not modify any defconfigs, especially for arch's that
     aren't being built by our make system.

linux/kernel/linux-mips-2.6/bobcat-config

     CONFIG_MGMT_BUS=3Dy is not used anywhere, is it?  axe it.  add it
	 later if it is added later.  if you see what i mean.
	 if CONFIG_MMEMAP_NETEEE or whatever

linux/kernel/linux-mips-2.6/include/asm-mips/socket.h

     please follow the spacing conventions for this file

linux/kernel/linux-mips-2.6/include/linux/socket.h

     line 289, please don't put your name in there, and also conform to
            the spacing convention for the rest of the file.

     spacing convention, lines 191, 192, 226

linux/kernel/linux-mips-2.6/include/net/neteee/eee.h

     line 41, trailing whitespace

     lines 76 & 78, no space between function name and open paren

     lines 75 and 77, what these doing here?  can't they be deleted?

     this __P() stuff doesn't look necessary to me.  can you point me to
          another place in the kernel that uses this?

     line 23,24 , no studly caps in kernel code, please.

linux/kernel/linux-mips-2.6/include/net/neteee/eee_if.h

     line 37 trailing whitespace



linux/kernel/linux-mips-2.6/include/net/neteee/eee_pcb.h

     line 11, 48, space covered by tab

     line 14, why are we using TAILQ_ENTRY instead of standard kernel
		list macros?  this goes for lots of places we are using
		TAILQ_whatev, which I assume we are defining ourselves
		some place.

     more of this __P stuff

linux/kernel/linux-mips-2.6/include/net/neteee/eee_var.h

     line 68, space covered by tab



linux/kernel/linux-mips-2.6/include/net/neteee/queue.h

     line 43, trailing whitespace

     line 96, 99, 104, garbage whitespace

     line 292, 293, 396, trailing whitespace

     I would like to know why we are using these custom macros for list
     and queue manipulation instead of standard kernel macros.  I don't
     want this BSD macro stuff glued to our code for all time.  We then
     have to maintain it and debug it w.r.t. to interrupts, signals,
     preemption and so forth, whereas all that has already been done
     with standard Linux kernel list and queue macros.

linux/kernel/linux-mips-2.6/net/Kconfig

     see comments for net/neteee/Kconfig

linux/kernel/linux-mips-2.6/net/Makefile

     see comments for net/neteee/Kconfig

linux/kernel/linux-mips-2.6/net/neteee/Kconfig

     lines 5, 20 trailing space

     unfortunately, not all the changes for neteee have been covered by
     this config item, so there is no point in having it.  the neteee
     stuff should be part of the modules for CONFIG_NET=3Dy and this stuff
     thrown away, or all changes made for neteee should be covered by
     this. one or the other.

     i don't know if the neteee_mmap stuff has this same problem or not
     since i haven't gotten to anything that involves it yet.

linux/kernel/linux-mips-2.6/net/neteee/Makefile

     see comments for net/neteee/Kconfig

linux/kernel/linux-mips-2.6/net/neteee/neteee.c

     garbage whitespace all over: trailing white space, tab covered
     spaces, etc.

     get rid of the Version: $Id crap

     add Onstor copyright notice

     line 62, 76, macros starting with CONFIG_ are reserved for the
            Kbuild system, so you need to rename this.  in fact, there
            doesn't seem to be any point to these macros, they are
            always defined, so remove them.

     line 230, please no lines longer than 80 columns.  wrap at first
                space.

     line 322, curly braces on same line as if statement, geez
		else on same line as curly, etc.

     line 348, 618, 729, 734 spaces separate operators and variables
		if(len > dev->mtu + dev->hard_header_len)

		NOT

		if(len>dev->mtu+dev->hard_header_len)

		and put paren's around the math subexpression please.
		please fix everywhere.

     line 374, 382 please make comment format consistent.  go through
          the whole file and make them consistent.
		/*
		 * comment
		 */
		is probably the best

     line 400, no paren's around return value.  return is not a
           function call.

     line 411,905,928, wrap please
		a good idea, and style-acceptable is to put the scope
                and type stuff on a separate line:

	static inline unsigned
	run_filter(struct sk_buff *skb, struct sock *sk, unsigned res)
	{
	}

     line 440, 545, wrap please

     line 476, variable definitions at the beginning of a block should
             be separated from the code in the block by a blank line.
             throughout the file.

     line 652, why do we need an mb() here?

     line 654, er, huh?  why separate block?  this code looks all wrong
      anyway. please, if you could, explain it's existence?  i'm
      inclined to let it be if it's really needed, but i'm not clear
      on why it would be.

     line 968 i'm not sure comment makes sense.  remove attribution
              -andys


that's enough for now.  please clean up this stuff and i'll
re-review the whole file then.

