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

Commit ca0f32d5 authored by David S. Miller's avatar David S. Miller
Browse files

Merge branch 'dpaa2-eth-code-cleanup'



Ioana Ciornei says:

====================
dpaa2-eth: code cleanup

There are no functional changes in this patch set, only some cleanup
changes such as: unused parameters, uninitialized variables and
unnecessary Kconfig dependencies.
====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 5b3a5a14 b948c8c6
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
config FSL_DPAA2_ETH
	tristate "Freescale DPAA2 Ethernet"
	depends on FSL_MC_BUS && FSL_MC_DPIO
	depends on ARCH_LAYERSCAPE || COMPILE_TEST
	help
	  This is the DPAA2 Ethernet driver supporting Freescale SoCs
	  with DPAA2 (DataPath Acceleration Architecture v2).
+12 −14
Original line number Diff line number Diff line
@@ -98,8 +98,7 @@ static void free_rx_fd(struct dpaa2_eth_priv *priv,
}

/* Build a linear skb based on a single-buffer frame descriptor */
static struct sk_buff *build_linear_skb(struct dpaa2_eth_priv *priv,
					struct dpaa2_eth_channel *ch,
static struct sk_buff *build_linear_skb(struct dpaa2_eth_channel *ch,
					const struct dpaa2_fd *fd,
					void *fd_vaddr)
{
@@ -233,7 +232,7 @@ static void dpaa2_eth_rx(struct dpaa2_eth_priv *priv,
	percpu_extras = this_cpu_ptr(priv->percpu_extras);

	if (fd_format == dpaa2_fd_single) {
		skb = build_linear_skb(priv, ch, fd, vaddr);
		skb = build_linear_skb(ch, fd, vaddr);
	} else if (fd_format == dpaa2_fd_sg) {
		skb = build_frag_skb(priv, ch, buf_data);
		skb_free_frag(vaddr);
@@ -438,7 +437,7 @@ static int build_sg_fd(struct dpaa2_eth_priv *priv,
	dpaa2_fd_set_format(fd, dpaa2_fd_sg);
	dpaa2_fd_set_addr(fd, addr);
	dpaa2_fd_set_len(fd, skb->len);
	dpaa2_fd_set_ctrl(fd, FD_CTRL_PTA | FD_CTRL_PTV1);
	dpaa2_fd_set_ctrl(fd, FD_CTRL_PTA);

	if (priv->tx_tstamp && skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP)
		enable_tx_tstamp(fd, sgt_buf);
@@ -491,7 +490,7 @@ static int build_single_fd(struct dpaa2_eth_priv *priv,
	dpaa2_fd_set_offset(fd, (u16)(skb->data - buffer_start));
	dpaa2_fd_set_len(fd, skb->len);
	dpaa2_fd_set_format(fd, dpaa2_fd_single);
	dpaa2_fd_set_ctrl(fd, FD_CTRL_PTA | FD_CTRL_PTV1);
	dpaa2_fd_set_ctrl(fd, FD_CTRL_PTA);

	if (priv->tx_tstamp && skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP)
		enable_tx_tstamp(fd, buffer_start);
@@ -660,7 +659,7 @@ static netdev_tx_t dpaa2_eth_tx(struct sk_buff *skb, struct net_device *net_dev)

/* Tx confirmation frame processing routine */
static void dpaa2_eth_tx_conf(struct dpaa2_eth_priv *priv,
			      struct dpaa2_eth_channel *ch,
			      struct dpaa2_eth_channel *ch __always_unused,
			      const struct dpaa2_fd *fd,
			      struct napi_struct *napi __always_unused,
			      u16 queue_id __always_unused)
@@ -935,7 +934,7 @@ static int dpaa2_eth_poll(struct napi_struct *napi, int budget)
	struct dpaa2_eth_channel *ch;
	struct dpaa2_eth_priv *priv;
	int rx_cleaned = 0, txconf_cleaned = 0;
	enum dpaa2_eth_fq_type type;
	enum dpaa2_eth_fq_type type = 0;
	int store_cleaned;
	int err;

@@ -1002,7 +1001,7 @@ static void disable_ch_napi(struct dpaa2_eth_priv *priv)

static int link_state_update(struct dpaa2_eth_priv *priv)
{
	struct dpni_link_state state;
	struct dpni_link_state state = {0};
	int err;

	err = dpni_get_link_state(priv->mc_io, 0, priv->mc_token, &state);
@@ -1085,8 +1084,7 @@ static int dpaa2_eth_open(struct net_device *net_dev)
/* The DPIO store must be empty when we call this,
 * at the end of every NAPI cycle.
 */
static u32 drain_channel(struct dpaa2_eth_priv *priv,
			 struct dpaa2_eth_channel *ch)
static u32 drain_channel(struct dpaa2_eth_channel *ch)
{
	u32 drained = 0, total = 0;

@@ -1107,7 +1105,7 @@ static u32 drain_ingress_frames(struct dpaa2_eth_priv *priv)

	for (i = 0; i < priv->num_channels; i++) {
		ch = priv->channel[i];
		drained += drain_channel(priv, ch);
		drained += drain_channel(ch);
	}

	return drained;
@@ -1116,7 +1114,7 @@ static u32 drain_ingress_frames(struct dpaa2_eth_priv *priv)
static int dpaa2_eth_stop(struct net_device *net_dev)
{
	struct dpaa2_eth_priv *priv = netdev_priv(net_dev);
	int dpni_enabled;
	int dpni_enabled = 0;
	int retries = 10;
	u32 drained;

@@ -2172,7 +2170,7 @@ int dpaa2_eth_cls_fld_off(int prot, int field)
/* Set Rx distribution (hash or flow classification) key
 * flags is a combination of RXH_ bits
 */
int dpaa2_eth_set_dist_key(struct net_device *net_dev,
static int dpaa2_eth_set_dist_key(struct net_device *net_dev,
				  enum dpaa2_eth_rx_dist type, u64 flags)
{
	struct device *dev = net_dev->dev.parent;