Re: [PATCH 1/15] BE NIC driver - header and initialization functions

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Subbu Seetharaman <subbus@...>
Cc: Netdev <netdev@...>
Date: Friday, May 16, 2008 - 5:54 am

On Thu, 15 May 2008, Subbu Seetharaman wrote:





...We can well figure this out without such comments, same goes for couple 
of other here below, please remove obvious comments as they just waste 
screen space and thereby make the logic harder to follow (please remove 
such comments elsewhere too, not just in this function):



kfree does NULL checks already for you.


See what linux/kernel.h provides for you already and use it.

I would rewrite it to something like this:

	len = pnob->event_q_len * sizeof(struct EQ_ENTRY_AMAP);
	n = max(DIV_ROUND_UP(len, PAGE_SIZE), 2);

n is then obviously a number of pages, no need to comment that anymore.


...First of all, points from using standard converters instead of 
inventing your own :-).

But alas, it won't be accepted by sparse. You need to use appropriate 
le/be8/16/32/64 types when dealing with endianesses and then make sparse 
happy too by using conversion in proper places. 


Ditto.


...ditto, please fix the rest as well. Though I would consider some kind 
of way to avoid all this code duplication.


Doesn't this leak something?



...Cool, this time they are without dead obvious comments :-).



What is this?


...Use appropriate type here then.


...ditto + rest I cut.


-- 
 i.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 1/15] BE NIC driver - header and initialization funct..., Subbu Seetharaman, (Thu May 15, 5:02 am)
Re: [PATCH 1/15] BE NIC driver - header and initialization f..., Ilpo Järvinen, (Fri May 16, 5:54 am)
Re: [PATCH 1/15] BE NIC driver - header and initialization f..., Christoph Hellwig, (Fri May 16, 6:06 am)