mirror of
https://github.com/torvalds/linux.git
synced 2026-05-30 10:04:04 +02:00
net: intel: fm10k: Fix parameter idx set but not used
Variable idx is set in the loop, but is never used resulting in dead code. Building with GCC 16, which enables -Werror=unused-but-set-parameter= by default results in build error. This patch removes the idx parameter, since all the callers of the fm10k_unbind_hw_stats_q as 0 as idx anyways. Suggested-by: Vadim Fedorenko <vadim.fedorenko@linux.dev> Signed-off-by: Brahmajit Das <listout@listout.xyz> Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
This commit is contained in:
parent
a460f96709
commit
99e9c5ffbb
|
|
@ -447,17 +447,16 @@ void fm10k_update_hw_stats_q(struct fm10k_hw *hw, struct fm10k_hw_stats_q *q,
|
|||
/**
|
||||
* fm10k_unbind_hw_stats_q - Unbind the queue counters from their queues
|
||||
* @q: pointer to the ring of hardware statistics queue
|
||||
* @idx: index pointing to the start of the ring iteration
|
||||
* @count: number of queues to iterate over
|
||||
*
|
||||
* Function invalidates the index values for the queues so any updates that
|
||||
* may have happened are ignored and the base for the queue stats is reset.
|
||||
**/
|
||||
void fm10k_unbind_hw_stats_q(struct fm10k_hw_stats_q *q, u32 idx, u32 count)
|
||||
void fm10k_unbind_hw_stats_q(struct fm10k_hw_stats_q *q, u32 count)
|
||||
{
|
||||
u32 i;
|
||||
|
||||
for (i = 0; i < count; i++, idx++, q++) {
|
||||
for (i = 0; i < count; i++, q++) {
|
||||
q->rx_stats_idx = 0;
|
||||
q->tx_stats_idx = 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,6 +43,6 @@ u32 fm10k_read_hw_stats_32b(struct fm10k_hw *hw, u32 addr,
|
|||
void fm10k_update_hw_stats_q(struct fm10k_hw *hw, struct fm10k_hw_stats_q *q,
|
||||
u32 idx, u32 count);
|
||||
#define fm10k_unbind_hw_stats_32b(s) ((s)->base_h = 0)
|
||||
void fm10k_unbind_hw_stats_q(struct fm10k_hw_stats_q *q, u32 idx, u32 count);
|
||||
void fm10k_unbind_hw_stats_q(struct fm10k_hw_stats_q *q, u32 count);
|
||||
s32 fm10k_get_host_state_generic(struct fm10k_hw *hw, bool *host_ready);
|
||||
#endif /* _FM10K_COMMON_H_ */
|
||||
|
|
|
|||
|
|
@ -1389,7 +1389,7 @@ static void fm10k_rebind_hw_stats_pf(struct fm10k_hw *hw,
|
|||
fm10k_unbind_hw_stats_32b(&stats->nodesc_drop);
|
||||
|
||||
/* Unbind Queue Statistics */
|
||||
fm10k_unbind_hw_stats_q(stats->q, 0, hw->mac.max_queues);
|
||||
fm10k_unbind_hw_stats_q(stats->q, hw->mac.max_queues);
|
||||
|
||||
/* Reinitialize bases for all stats */
|
||||
fm10k_update_hw_stats_pf(hw, stats);
|
||||
|
|
|
|||
|
|
@ -465,7 +465,7 @@ static void fm10k_rebind_hw_stats_vf(struct fm10k_hw *hw,
|
|||
struct fm10k_hw_stats *stats)
|
||||
{
|
||||
/* Unbind Queue Statistics */
|
||||
fm10k_unbind_hw_stats_q(stats->q, 0, hw->mac.max_queues);
|
||||
fm10k_unbind_hw_stats_q(stats->q, hw->mac.max_queues);
|
||||
|
||||
/* Reinitialize bases for all stats */
|
||||
fm10k_update_hw_stats_vf(hw, stats);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user