All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: madalin.bucur@freescale.com
Cc: netdev@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH RFC 06/10] dpaa_eth: add ethtool functionality
Date: Wed, 01 Apr 2015 10:11:39 -0700	[thread overview]
Message-ID: <1427908299.31790.51.camel@perches.com> (raw)
In-Reply-To: <1427905196-27778-5-git-send-email-madalin.bucur@freescale.com>

On Wed, 2015-04-01 at 19:19 +0300, Madalin Bucur wrote:
> Add support for basic ethtool operations.

> diff --git a/drivers/net/ethernet/freescale/dpaa/dpaa_ethtool.c b/drivers/net/ethernet/freescale/dpaa/dpaa_ethtool.c
[]
> +static int __cold dpa_get_settings(struct net_device *net_dev,
> +				   struct ethtool_cmd *et_cmd)
> +{
> +	int			 _errno;

Using a variable name of _errno is misleading at best,
(btw: the only return value for phy_ethtool_gset is 0)

> +static void __cold dpa_get_drvinfo(struct net_device *net_dev,
> +				   struct ethtool_drvinfo *drvinfo)
> +{
> +	int		 _errno;
> +
> +	strncpy(drvinfo->driver, KBUILD_MODNAME,
> +		sizeof(drvinfo->driver) - 1)[sizeof(drvinfo->driver) - 1] = 0;

That's a really odd and unusual construct
more commonly written as strlcpy

> +	_errno = snprintf(drvinfo->version, sizeof(drvinfo->version),

Using errno here is especially misleading as that's
not the return value of an snprintf

  parent reply	other threads:[~2015-04-01 17:11 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-01 16:19 [PATCH RFC 02/10] dpaa_eth: add support for DPAA Ethernet Madalin Bucur
2015-04-01 16:19 ` Madalin Bucur
2015-04-01 16:19 ` [PATCH RFC 03/10] dpaa_eth: add configurable bpool thresholds Madalin Bucur
2015-04-01 16:19   ` Madalin Bucur
2015-04-01 16:19   ` [PATCH RFC 04/10] dpaa_eth: add support for S/G frames Madalin Bucur
2015-04-01 16:19     ` Madalin Bucur
2015-04-01 16:19     ` [PATCH RFC 05/10] dpaa_eth: add driver's Tx queue selection mechanism Madalin Bucur
2015-04-01 16:19       ` Madalin Bucur
2015-04-01 16:19       ` [PATCH RFC 06/10] dpaa_eth: add ethtool functionality Madalin Bucur
2015-04-01 16:19         ` Madalin Bucur
2015-04-01 16:19         ` [PATCH RFC 07/10] dpaa_eth: add sysfs exports Madalin Bucur
2015-04-01 16:19           ` Madalin Bucur
2015-04-01 16:19           ` [PATCH RFC 08/10] dpaa_eth: add debugfs counters Madalin Bucur
2015-04-01 16:19             ` Madalin Bucur
2015-04-01 16:19             ` [PATCH RFC 09/10] dpaa_eth: add debugfs entries Madalin Bucur
2015-04-01 16:19               ` Madalin Bucur
2015-04-01 16:19               ` [PATCH RFC 10/10] dpaa_eth: add trace points Madalin Bucur
2015-04-01 16:19                 ` Madalin Bucur
2015-04-03 16:47                 ` Joe Perches
2015-04-03 16:47                   ` Joe Perches
2015-04-03 17:29                   ` Madalin-Cristian Bucur
2015-04-03 17:29                     ` Madalin-Cristian Bucur
2015-04-03 17:53                     ` Joe Perches
2015-04-03 17:53                       ` Joe Perches
2015-04-03 18:36                       ` [PATCH] checkpatch: Add #define foo "string" long line exception Joe Perches
2015-04-01 17:11         ` Joe Perches [this message]
2015-04-01 17:11 ` [PATCH RFC 02/10] dpaa_eth: add support for DPAA Ethernet Joe Perches
2015-04-02 10:44 ` Paul Bolle
2015-04-03  8:58   ` Madalin-Cristian Bucur
2015-04-03  8:58     ` Madalin-Cristian Bucur
2015-04-03  8:58     ` Madalin-Cristian Bucur
2015-07-20  7:54 ` Joakim Tjernlund
2015-07-20  7:54   ` Joakim Tjernlund
2015-07-20  7:57   ` Joakim Tjernlund
2015-07-20  7:57     ` Joakim Tjernlund
2015-07-20 12:18     ` Madalin-Cristian Bucur
2015-07-20 12:18       ` Madalin-Cristian Bucur
2015-07-20 12:46       ` Joakim Tjernlund
2015-07-20 12:46         ` Joakim Tjernlund
  -- strict thread matches above, loose matches on Subject: below --
2015-04-03  8:54 [PATCH RFC 06/10] dpaa_eth: add ethtool functionality Madalin-Cristian Bucur
2015-04-03  8:54 ` Madalin-Cristian Bucur

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=1427908299.31790.51.camel@perches.com \
    --to=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=madalin.bucur@freescale.com \
    --cc=netdev@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.