git: dae26c1153cb - stable/13 - Remove unused but set variable in cxgb_sge
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 19 Jul 2022 18:02:28 UTC
The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=dae26c1153cb1ac1bac4c333d9fb9b91584dace2 commit dae26c1153cb1ac1bac4c333d9fb9b91584dace2 Author: Dimitry Andric <dim@FreeBSD.org> AuthorDate: 2022-07-16 18:16:36 +0000 Commit: Dimitry Andric <dim@FreeBSD.org> CommitDate: 2022-07-19 18:01:49 +0000 Remove unused but set variable in cxgb_sge Clang 15 warns: sys/dev/cxgb/cxgb_sge.c:1290:21: error: variable 'txsd' set but not used [-Werror,-Wunused-but-set-variable] struct tx_sw_desc *txsd = &txq->sdesc[txqs->pidx]; ^ It appears 'txsd' is a leftover from a previous refactoring (see 3f345a5d09b6), but is no longer used for anything, and can be removed without any functional change. MFC after: 3 days Reviewed by: np Differential Revision: https://reviews.freebsd.org/D35833 (cherry picked from commit cab040039d6fe1b2a6de8f2ba2cc882c313d3c75) --- sys/dev/cxgb/cxgb_sge.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/sys/dev/cxgb/cxgb_sge.c b/sys/dev/cxgb/cxgb_sge.c index 1c4099604a77..bf3a5528a61e 100644 --- a/sys/dev/cxgb/cxgb_sge.c +++ b/sys/dev/cxgb/cxgb_sge.c @@ -1287,7 +1287,6 @@ write_wr_hdr_sgl(unsigned int ndesc, struct tx_desc *txd, struct txq_state *txqs { struct work_request_hdr *wrp = (struct work_request_hdr *)txd; - struct tx_sw_desc *txsd = &txq->sdesc[txqs->pidx]; if (__predict_true(ndesc == 1)) { set_wr_hdr(wrp, htonl(F_WR_SOP | F_WR_EOP | V_WR_DATATYPE(1) | @@ -1318,12 +1317,10 @@ write_wr_hdr_sgl(unsigned int ndesc, struct tx_desc *txd, struct txq_state *txqs fp += avail; txd++; - txsd++; if (++txqs->pidx == txq->size) { txqs->pidx = 0; txqs->gen ^= 1; txd = txq->desc; - txsd = txq->sdesc; } /*