The branch main has been updated by dim:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=cab040039d6fe1b2a6de8f2ba2cc882c313d3c75

commit cab040039d6fe1b2a6de8f2ba2cc882c313d3c75
Author:     Dimitry Andric <[email protected]>
AuthorDate: 2022-07-16 18:16:36 +0000
Commit:     Dimitry Andric <[email protected]>
CommitDate: 2022-07-16 19:13:37 +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
---
 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 dbc0ddea6b7c..f79149e8e7e6 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;
                        }
 
                        /*

Reply via email to