Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit acbff8e3 authored by Ioana Radulescu's avatar Ioana Radulescu Committed by Greg Kroah-Hartman
Browse files

staging: fsl-dpaa2/eth: Add "static" keyword where needed



Make a couple of locally used functions and structures static.
Issue found through static analysis tool.

Signed-off-by: default avatarIoana Radulescu <ruxandra.radulescu@nxp.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 7bf1e44f
Loading
Loading
Loading
Loading
+3 −3
Original line number Original line Diff line number Diff line
@@ -1162,7 +1162,7 @@ static int dpaa2_eth_set_addr(struct net_device *net_dev, void *addr)
/** Fill in counters maintained by the GPP driver. These may be different from
/** Fill in counters maintained by the GPP driver. These may be different from
 * the hardware counters obtained by ethtool.
 * the hardware counters obtained by ethtool.
 */
 */
void dpaa2_eth_get_stats(struct net_device *net_dev,
static void dpaa2_eth_get_stats(struct net_device *net_dev,
				struct rtnl_link_stats64 *stats)
				struct rtnl_link_stats64 *stats)
{
{
	struct dpaa2_eth_priv *priv = netdev_priv(net_dev);
	struct dpaa2_eth_priv *priv = netdev_priv(net_dev);
@@ -1958,7 +1958,7 @@ static const struct dpaa2_eth_hash_fields hash_fields[] = {
/* Set RX hash options
/* Set RX hash options
 * flags is a combination of RXH_ bits
 * flags is a combination of RXH_ bits
 */
 */
int dpaa2_eth_set_hash(struct net_device *net_dev, u64 flags)
static int dpaa2_eth_set_hash(struct net_device *net_dev, u64 flags)
{
{
	struct device *dev = net_dev->dev.parent;
	struct device *dev = net_dev->dev.parent;
	struct dpaa2_eth_priv *priv = netdev_priv(net_dev);
	struct dpaa2_eth_priv *priv = netdev_priv(net_dev);
+0 −2
Original line number Original line Diff line number Diff line
@@ -339,8 +339,6 @@ struct dpaa2_eth_priv {
extern const struct ethtool_ops dpaa2_ethtool_ops;
extern const struct ethtool_ops dpaa2_ethtool_ops;
extern const char dpaa2_eth_drv_version[];
extern const char dpaa2_eth_drv_version[];


int dpaa2_eth_set_hash(struct net_device *net_dev, u64 flags);

static int dpaa2_eth_queue_count(struct dpaa2_eth_priv *priv)
static int dpaa2_eth_queue_count(struct dpaa2_eth_priv *priv)
{
{
	return priv->dpni_attrs.num_queues;
	return priv->dpni_attrs.num_queues;
+2 −2
Original line number Original line Diff line number Diff line
@@ -34,7 +34,7 @@
#include "dpaa2-eth.h"
#include "dpaa2-eth.h"


/* To be kept in sync with DPNI statistics */
/* To be kept in sync with DPNI statistics */
char dpaa2_ethtool_stats[][ETH_GSTRING_LEN] = {
static char dpaa2_ethtool_stats[][ETH_GSTRING_LEN] = {
	"rx frames",
	"rx frames",
	"rx bytes",
	"rx bytes",
	"rx mcast frames",
	"rx mcast frames",
@@ -56,7 +56,7 @@ char dpaa2_ethtool_stats[][ETH_GSTRING_LEN] = {


#define DPAA2_ETH_NUM_STATS	ARRAY_SIZE(dpaa2_ethtool_stats)
#define DPAA2_ETH_NUM_STATS	ARRAY_SIZE(dpaa2_ethtool_stats)


char dpaa2_ethtool_extras[][ETH_GSTRING_LEN] = {
static char dpaa2_ethtool_extras[][ETH_GSTRING_LEN] = {
	/* per-cpu stats */
	/* per-cpu stats */
	"tx conf frames",
	"tx conf frames",
	"tx conf bytes",
	"tx conf bytes",