linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Klein <osstklei@de.ibm.com>
To: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Thomas Klein <tklein@de.ibm.com>,
	Jan-Bernd Themann <themann@de.ibm.com>,
	netdev@vger.kernel.org,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Christoph Raisch <raisch@de.ibm.com>,
	linux-ppc <linuxppc-dev@ozlabs.org>,
	Marcus Eder <meder@de.ibm.com>
Subject: Re: [2.6.19 PATCH 4/7] ehea: ethtool interface
Date: Fri, 18 Aug 2006 17:41:26 +0200	[thread overview]
Message-ID: <44E5DFA6.7040707@de.ibm.com> (raw)
In-Reply-To: <20060818140506.GC5201@martell.zuzino.mipt.ru>

Hi Alexey,

first of all thanks a lot for the extensive review.


Alexey Dobriyan wrote:
>> +	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.

>> +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

  reply	other threads:[~2006-08-18 15:41 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-18 11:33 [2.6.19 PATCH 4/7] ehea: ethtool interface Jan-Bernd Themann
2006-08-18 14:05 ` Alexey Dobriyan
2006-08-18 15:41   ` Thomas Klein [this message]
2006-08-18 17:45     ` Stephen Hemminger
2006-08-21  9:53       ` Thomas Klein
2006-08-19  6:18     ` Michael Ellerman
2006-08-19  6:48       ` Andy Gay
2006-08-19  8:41         ` Michael Ellerman
2006-08-19 13:47           ` Arnd Bergmann
2006-08-19 14:40         ` Jeff Garzik
2006-08-21 10:53   ` Thomas Klein
  -- strict thread matches above, loose matches on Subject: below --
2006-08-22 12:54 Jan-Bernd Themann
2006-08-23  8:57 Jan-Bernd Themann
2006-09-04 10:40 Jan-Bernd Themann
2006-09-06 13:33 Jan-Bernd Themann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=44E5DFA6.7040707@de.ibm.com \
    --to=osstklei@de.ibm.com \
    --cc=adobriyan@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=meder@de.ibm.com \
    --cc=netdev@vger.kernel.org \
    --cc=raisch@de.ibm.com \
    --cc=themann@de.ibm.com \
    --cc=tklein@de.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).