Thread (11 messages) flat view 11 messages, 8 authors, 2006-08-21

Re: [2.6.19 PATCH 4/7] ehea: ethtool interface

From: Thomas Klein <hidden>
Date: 2006-08-18 15:41:32
Also in: linuxppc-dev, lkml

Hi Alexey,

first of all thanks a lot for the extensive review.


Alexey Dobriyan wrote:
quoted
+	u64 hret = H_HARDWARE;
Useless assignment here and everywhere.
Initializing returncodes to errorstate is a cheap way to prevent
accidentally returning (uninitalized) success returncodes which
can lead to catastrophic misbehaviour.
quoted
+static void netdev_get_drvinfo(struct net_device *dev,
+			       struct ethtool_drvinfo *info)
+{
+	strncpy(info->driver, DRV_NAME, sizeof(info->driver) - 1);
+	strncpy(info->version, DRV_VERSION, sizeof(info->version) - 1);
Use strlcpy() to not forget -1 accidently.
I agree.

Kind regards
Thomas
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help