Commit b772112c authored by Mark Starovoytov's avatar Mark Starovoytov Committed by David S. Miller

net: atlantic: make _get_sw_stats return count as return value

This patch changes aq_vec_get_sw_stats() to return count as a return
value (which was unused) instead of an out parameter.
Signed-off-by: default avatarMark Starovoytov <mstarovoitov@marvell.com>
Signed-off-by: default avatarIgor Russkikh <irusskikh@marvell.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 3624aa3c
...@@ -907,13 +907,13 @@ u64 *aq_nic_get_stats(struct aq_nic_s *self, u64 *data) ...@@ -907,13 +907,13 @@ u64 *aq_nic_get_stats(struct aq_nic_s *self, u64 *data)
aq_vec && self->aq_vecs > i; aq_vec && self->aq_vecs > i;
++i, aq_vec = self->aq_vec[i]) { ++i, aq_vec = self->aq_vec[i]) {
data += count; data += count;
aq_vec_get_sw_stats(aq_vec, tc, data, &count); count = aq_vec_get_sw_stats(aq_vec, tc, data);
} }
} }
data += count; data += count;
err_exit:; err_exit:
return data; return data;
} }
......
...@@ -380,8 +380,7 @@ static void aq_vec_get_stats(struct aq_vec_s *self, ...@@ -380,8 +380,7 @@ static void aq_vec_get_stats(struct aq_vec_s *self,
} }
} }
int aq_vec_get_sw_stats(struct aq_vec_s *self, const unsigned int tc, u64 *data, unsigned int aq_vec_get_sw_stats(struct aq_vec_s *self, const unsigned int tc, u64 *data)
unsigned int *p_count)
{ {
struct aq_ring_stats_rx_s stats_rx; struct aq_ring_stats_rx_s stats_rx;
struct aq_ring_stats_tx_s stats_tx; struct aq_ring_stats_tx_s stats_tx;
...@@ -401,8 +400,5 @@ int aq_vec_get_sw_stats(struct aq_vec_s *self, const unsigned int tc, u64 *data, ...@@ -401,8 +400,5 @@ int aq_vec_get_sw_stats(struct aq_vec_s *self, const unsigned int tc, u64 *data,
data[++count] = stats_rx.lro_packets; data[++count] = stats_rx.lro_packets;
data[++count] = stats_rx.errors; data[++count] = stats_rx.errors;
if (p_count) return ++count;
*p_count = ++count;
return 0;
} }
/* SPDX-License-Identifier: GPL-2.0-only */ /* SPDX-License-Identifier: GPL-2.0-only */
/* /* Atlantic Network Driver
* aQuantia Corporation Network Driver *
* Copyright (C) 2014-2017 aQuantia Corporation. All rights reserved * Copyright (C) 2014-2019 aQuantia Corporation
* Copyright (C) 2019-2020 Marvell International Ltd.
*/ */
/* File aq_vec.h: Definition of common structures for vector of Rx and Tx rings. /* File aq_vec.h: Definition of common structures for vector of Rx and Tx rings.
...@@ -35,7 +36,6 @@ void aq_vec_ring_free(struct aq_vec_s *self); ...@@ -35,7 +36,6 @@ void aq_vec_ring_free(struct aq_vec_s *self);
int aq_vec_start(struct aq_vec_s *self); int aq_vec_start(struct aq_vec_s *self);
void aq_vec_stop(struct aq_vec_s *self); void aq_vec_stop(struct aq_vec_s *self);
cpumask_t *aq_vec_get_affinity_mask(struct aq_vec_s *self); cpumask_t *aq_vec_get_affinity_mask(struct aq_vec_s *self);
int aq_vec_get_sw_stats(struct aq_vec_s *self, const unsigned int tc, u64 *data, unsigned int aq_vec_get_sw_stats(struct aq_vec_s *self, const unsigned int tc, u64 *data);
unsigned int *p_count);
#endif /* AQ_VEC_H */ #endif /* AQ_VEC_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment