login
Header Space

 
 

Re: [PATCH 02/12] handle multiple network paths to AoE device

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Ed L. Cashin <ecashin@...>
Cc: <linux-kernel@...>, Greg K-H <greg@...>
Date: Tuesday, July 3, 2007 - 12:29 am

On Tue, 26 Jun 2007 14:50:10 -0400 "Ed L. Cashin" <ecashin@coraid.com> wrote:


whats that?
  

bug: this will only zero eight bytes.


There are multiple little coding-style warts here.  scripts/checkpatch.pl
will point them out.


interruptible sleep?  Does this code work as intended when there's a signal
pending?  (Maybe that's what the interruptible sleep is for: don't know,
and am not inclined to work it out given the (low) level of comments in
here and the (lower) level of changelogging).


ugh.  Do this:

	do {
		if (t == d->htgt)
			continue;
		if (!(*t)->ifp->nd)
			continue;
		if ((*t)->nout >= (*t)->maxout)
			continue;
			
		<stuff>
	} while (++t ...)



This could be implemented as a (possibly inlined) C function, therefore it
shuld be implemented that way.


poease find a way to avoid pulling this stunt.


here too.


more.


more.  Just use &&?




Wow.

Perhaps there are so few comments because nobody understands what it's all
doing


Is the GFP_ATOMIC unavoidable?  It is vastly less reliable than GFP_KERNEL.


Oh dear.  Please, use an `if' statement rather than party tricks like this.


kfree(NULL) is legal.


No, more likely a GFP_ATOMIC allocation failed.  Returning -ENOMEM is
better than just guessing.



Preferred style is

		ifp = addif(t, skb->dev);
		if (!ifp) {

(checkpatch will report this)


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

Messages in current thread:
[PATCH 01/12] bring driver version number to 47, Ed L. Cashin, (Tue Jun 26, 2:50 pm)
[PATCH 12/12] the aoeminor doesn't need a long format, Ed L. Cashin, (Tue Jun 26, 2:50 pm)
[PATCH 08/12] only schedule work once, Ed L. Cashin, (Tue Jun 26, 2:50 pm)
Re: [PATCH 08/12] only schedule work once, Andrew Morton, (Tue Jul 3, 12:37 am)
[PATCH 05/12] eliminate goto and improve readability, Ed L. Cashin, (Tue Jun 26, 2:50 pm)
[PATCH 04/12] clean up udev configuration example, Ed L. Cashin, (Tue Jun 26, 2:50 pm)
Re: [PATCH 02/12] handle multiple network paths to AoE device, Andrew Morton, (Tue Jul 3, 12:29 am)
speck-geostationary