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: Mon, 21 Aug 2006 12:53:26 +0200	[thread overview]
Message-ID: <44E990A6.90806@de.ibm.com> (raw)
In-Reply-To: <20060818140506.GC5201@martell.zuzino.mipt.ru>


Alexey Dobriyan wrote:
 > On Fri, Aug 18, 2006 at 01:33:22PM +0200, Jan-Bernd Themann wrote:
 >> --- linux-2.6.18-rc4-orig/drivers/net/ehea/ehea_ethtool.c
 >> +++ kernel/drivers/net/ehea/ehea_ethtool.c
 >> +{
 >> +    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.

Done.

 >
 >> +static u32 netdev_get_msglevel(struct net_device *dev)
 >                        ^^^^^^^^
 >> +{
 >> +    struct ehea_port *port = netdev_priv(dev);
 >> +    return port->msg_enable;
 >                        ^^^^^^
 >
 > Something is mis-named here.

The kernel requires a structure member of that name.

 >> +struct ethtool_ops ehea_ethtool_ops = {
 >> +    .get_settings = netdev_get_settings,
 >> +    .get_drvinfo = netdev_get_drvinfo,
 >> +    .get_msglevel = netdev_get_msglevel,
 >> +    .set_msglevel = netdev_set_msglevel,
 >> +        .get_link = ethtool_op_get_link,
 >> +        .get_tx_csum = ethtool_op_get_tx_csum,
 >
 > Whitespace breakage.

Fixed.

 >> +    .set_settings = NULL,
 >> +    .nway_reset = NULL,
 >> +    .get_pauseparam = NULL,
 >> +    .set_pauseparam = NULL,
 >> +    .get_rx_csum = NULL,
 >> +    .set_rx_csum = NULL,
 >> +    .phys_id = NULL,
 >> +    .self_test = NULL,
 >> +    .self_test_count = NULL
 >
 > If you don't use them, don't mention them at all. Compiler will DTRT.

Agreed. Assignments removed.

Thanks again :-)
Thomas

  parent reply	other threads:[~2006-08-21 10:53 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
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 [this message]
  -- 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=44E990A6.90806@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).