[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211130212004.198898-8-anthony.l.nguyen@intel.com>
Date: Tue, 30 Nov 2021 13:20:01 -0800
From: Tony Nguyen <anthony.l.nguyen@...el.com>
To: davem@...emloft.net, kuba@...nel.org
Cc: Karen Sornek <karen.sornek@...el.com>, netdev@...r.kernel.org,
anthony.l.nguyen@...el.com, sassmann@...hat.com,
Paul Greenwalt <paul.greenwalt@...el.com>,
Konrad Jankowski <konrad0.jankowski@...el.com>
Subject: [PATCH net-next v2 07/10] iavf: Fix static code analysis warning
From: Karen Sornek <karen.sornek@...el.com>
Change min() to min_t() to fix static code analysis warning of possible
overflow.
Signed-off-by: Paul Greenwalt <paul.greenwalt@...el.com>
Signed-off-by: Karen Sornek <karen.sornek@...el.com>
Tested-by: Konrad Jankowski <konrad0.jankowski@...el.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@...el.com>
---
drivers/net/ethernet/intel/iavf/iavf_txrx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/intel/iavf/iavf_txrx.c b/drivers/net/ethernet/intel/iavf/iavf_txrx.c
index 3525eab8e9f9..42c9f9dc235c 100644
--- a/drivers/net/ethernet/intel/iavf/iavf_txrx.c
+++ b/drivers/net/ethernet/intel/iavf/iavf_txrx.c
@@ -1766,7 +1766,7 @@ int iavf_napi_poll(struct napi_struct *napi, int budget)
if (likely(napi_complete_done(napi, work_done)))
iavf_update_enable_itr(vsi, q_vector);
- return min(work_done, budget - 1);
+ return min_t(int, work_done, budget - 1);
}
/**
--
2.31.1
Powered by blists - more mailing lists