Re: [PATCH v1.2.26] wan: new driver retina

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Matti Linnanvuori <mattilinn@...>
Cc: <jgarzik@...>, <netdev@...>
Date: Wednesday, May 28, 2008 - 8:30 am

Few quick notes. I'd Cc: linux-kernel@vger.kernel.org next time as
this is a non-network character device driver as well.

"Matti Linnanvuori" <mattilinn@gmail.com> writes:


 *      THESE IOCTLS ARE _DEPRECATED_ AND WILL DISAPPEAR IN 2.5.X -DaveM
 */
 
#define SIOCDEVPRIVATE  0x89F0  /* to 89FF */

They haven't disappered yet but I'd rather use something else.
Personally, sysfs stuff, unless you need to do it frequently/fast.


Why such artificial limit?


Doesn't seem to be used anywhere.


I'm not sure SetPageReserved() etc. belong to drivers.


Why not use a dynamic setting? ip link set XXX arp on|off?


Is this PID checking needed at all? It sure creates many problems,
such as process' death and number wrapping.


Why not dynamic?


That won't work race-free, use owner field.


Why not just BUG_ON(!virtual_address)?


As a side note, it shows why the 80 columns limit is damaging us.


Some comments about real_mailbox values maybe?


So why exactly is the above useful?


Some locking maybe? That seems like a great recipe for races.
I'd check the recent discussions about the big kernel lock too.


Looks dangerous.


If you move this "unsigned i" (or better unsigned v or something as
"i" is usually used for pure ints) to the start of this function,
the code will look much better.


Unneeded?


 +	if (PCI_FUNC(pdev->devfn) != 0)

Don't you plan multi-function cards? :-)


Same comment about moving variable to the start (of the parent block
maybe). If you want it to be a separate function then do that.



Wouldn't it be better to return -EBUSY instead?


Statistics maybe?


You don't need "else" due to "continue", right? More space for you.


If you use the built-in net_device_stats you don't need the function.


Seems unused.
-- 
Krzysztof Halasa
--
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 v1.2.26] wan: new driver retina, Matti Linnanvuori, (Wed May 28, 6:42 am)
Re: [PATCH v1.2.26] wan: new driver retina, Krzysztof Halasa, (Wed May 28, 8:30 am)
Re: [PATCH v1.2.26] wan: new driver retina, Matti Linnanvuori, (Fri May 30, 8:52 am)
Re: [PATCH v1.2.26] wan: new driver retina, Krzysztof Halasa, (Fri May 30, 12:15 pm)
Re: [PATCH v1.2.26] wan: new driver retina, Matti Linnanvuori, (Tue Jun 3, 8:08 am)
Re: [PATCH v1.2.26] wan: new driver retina, Matti Linnanvuori, (Sun Jun 1, 1:59 am)