| To: | Ganesh Venkatesan <ganesh.venkatesan@xxxxxxxxx> |
|---|---|
| Subject: | Re: [PATCH netdev-2.6 8/10] ixgb: Ethtool_ops support |
| From: | "Randy.Dunlap" <rddunlap@xxxxxxxx> |
| Date: | Fri, 29 Oct 2004 08:25:47 -0700 |
| Cc: | "jgarzik@xxxxxxxxx" <jgarzik@xxxxxxxxx>, netdev <netdev@xxxxxxxxxxx> |
| In-reply-to: | <Pine.LNX.4.44.0410290500450.26064-100000@xxxxxxxxxxxxxxxxxxxx> |
| Organization: | OSDL |
| References: | <Pine.LNX.4.44.0410290500450.26064-100000@xxxxxxxxxxxxxxxxxxxx> |
| Sender: | netdev-bounce@xxxxxxxxxxx |
| User-agent: | Mozilla Thunderbird 0.8 (X11/20040913) |
_Many_ cases where "if(" should be "if (" (same for "for").
> +static int
> +ixgb_get_regs_len(struct net_device *netdev)
> +{
> +#define IXGB_REG_DUMP_LEN 136*sizeof(uint32_t)
> + return IXGB_REG_DUMP_LEN;
> +}
Might as well #undef this constant if you want it to be "local".
There are several places where an if () also does an assignment
without doing a comparison. sparse will beep/gong on those.
Have you tried sparse? E.g.:
+ if((err = ixgb_up(adapter)))
+ return err;
Instead of using double parens to appease gcc, do this:
if ((err = ixgb_up(adapter) != 0)
return err;
--
~Randy
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | RE: [PATCH netdev-2.6 7/10] ixgb: Replace kmalloc with vmalloc to allocate driver local data structures, Venkatesan, Ganesh |
|---|---|
| Next by Date: | Re: [PATCH] sk98lin: Driver update v7.09, Mirko Lindner |
| Previous by Thread: | [PATCH netdev-2.6 8/10] ixgb: Ethtool_ops support, Ganesh Venkatesan |
| Next by Thread: | [PATCH netdev-2.6 9/10] ixgb: Version number update, Ganesh Venkatesan |
| Indexes: | [Date] [Thread] [Top] [All Lists] |