All of lore.kernel.org
 help / color / mirror / Atom feed
From: Keerthy <j-keerthy@ti.com>
To: <w-kwok2@ti.com>, <m-karicheri2@ti.com>
Cc: <netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<stephen@networkplumber.org>, <m-scherban@ti.com>,
	<j-keerthy@ti.com>
Subject: [PATCH] net: netcp: correct netcp_get_stats function signature
Date: Tue, 10 Jan 2017 16:56:25 +0530	[thread overview]
Message-ID: <1484047585-16733-1-git-send-email-j-keerthy@ti.com> (raw)

Commit: bc1f44709cf2 - net: make ndo_get_stats64 a void function
and
Commit: 6a8162e99ef3 - net: netcp: store network statistics in 64 bits.

The commit 6a8162e99ef3 adds ndo_get_stats64 function as per old
signature which causes compilation error:

drivers/net/ethernet/ti/netcp_core.c:1951:28: error:
initialization from incompatible pointer type
  .ndo_get_stats64        = netcp_get_stats,

Hence correct netcp_get_stats function signature as per
the latest definition.

Signed-off-by: Keerthy <j-keerthy@ti.com>
Fixes: 6a8162e99ef344fc("net: netcp: store network statistics in 64 bits")
---

This is due patches crossing at the same time.
Fixes the compilation error. Only build tested. It would be
good if someone can boot test.

Applies on top of latest next branch.

 drivers/net/ethernet/ti/netcp_core.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/ti/netcp_core.c b/drivers/net/ethernet/ti/netcp_core.c
index 68a75cc..34852f2 100644
--- a/drivers/net/ethernet/ti/netcp_core.c
+++ b/drivers/net/ethernet/ti/netcp_core.c
@@ -1909,7 +1909,7 @@ static int netcp_setup_tc(struct net_device *dev, u32 handle, __be16 proto,
 	return 0;
 }
 
-static struct rtnl_link_stats64 *
+void
 netcp_get_stats(struct net_device *ndev, struct rtnl_link_stats64 *stats)
 {
 	struct netcp_intf *netcp = netdev_priv(ndev);
@@ -1938,8 +1938,6 @@ static int netcp_setup_tc(struct net_device *dev, u32 handle, __be16 proto,
 	stats->rx_errors = p->rx_errors;
 	stats->rx_dropped = p->rx_dropped;
 	stats->tx_dropped = p->tx_dropped;
-
-	return stats;
 }
 
 static const struct net_device_ops netcp_netdev_ops = {
-- 
1.9.1

             reply	other threads:[~2017-01-10 11:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-10 11:26 Keerthy [this message]
2017-01-10 16:52 ` [PATCH] net: netcp: correct netcp_get_stats function signature David Miller
2017-01-11  3:28   ` Keerthy

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=1484047585-16733-1-git-send-email-j-keerthy@ti.com \
    --to=j-keerthy@ti.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m-karicheri2@ti.com \
    --cc=m-scherban@ti.com \
    --cc=netdev@vger.kernel.org \
    --cc=stephen@networkplumber.org \
    --cc=w-kwok2@ti.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 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.