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

Commit df87b8fc authored by Jacob Keller's avatar Jacob Keller Committed by Jeff Kirsher
Browse files

fm10k: reduce scope of the ring variable



Reduce the scope of the ring local variable in the fm10k_assign_l2_accel
function.

This was detected by cppcheck and resolves the following warning
produced by that tool:

[fm10k_netdev.c:1447]: (style) The scope of the variable 'ring' can be
reduced.

Signed-off-by: default avatarJacob Keller <jacob.e.keller@intel.com>
Tested-by: default avatarAndrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent 8e03f26b
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1444,11 +1444,11 @@ static int __fm10k_setup_tc(struct net_device *dev, enum tc_setup_type type,
static void fm10k_assign_l2_accel(struct fm10k_intfc *interface,
				  struct fm10k_l2_accel *l2_accel)
{
	struct fm10k_ring *ring;
	int i;

	for (i = 0; i < interface->num_rx_queues; i++) {
		ring = interface->rx_ring[i];
		struct fm10k_ring *ring = interface->rx_ring[i];

		rcu_assign_pointer(ring->l2_accel, l2_accel);
	}