]> git.karo-electronics.de Git - linux-beck.git/commitdiff
staging/rdma/hfi1: fix 0-day syntax error
authorMike Marciniszyn <mike.marciniszyn@intel.com>
Thu, 18 Feb 2016 19:11:59 +0000 (11:11 -0800)
committerDoug Ledford <dledford@redhat.com>
Fri, 11 Mar 2016 01:45:43 +0000 (20:45 -0500)
Setting CONFIG_HFI1_DEBUG_SDMA_ORDER causes a syntax error:
sdma.c: In function ‘complete_tx’:
sdma.c:370: error: ‘txp’ undeclared (first use in
this function)
sdma.c:370: error: (Each undeclared identifier is reported only once
sdma.c:370: error: for each function it appears in.)

Adjust code under ifdef to reference the tx properly.

Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/staging/rdma/hfi1/sdma.c

index d894f439614a101539de37a1e730d191bc48ec7e..e29b5d394a5f156765912d19952a32902c985842 100644 (file)
@@ -367,10 +367,10 @@ static inline void complete_tx(struct sdma_engine *sde,
        callback_t complete = tx->complete;
 
 #ifdef CONFIG_HFI1_DEBUG_SDMA_ORDER
-       trace_hfi1_sdma_out_sn(sde, txp->sn);
-       if (WARN_ON_ONCE(sde->head_sn != txp->sn))
+       trace_hfi1_sdma_out_sn(sde, tx->sn);
+       if (WARN_ON_ONCE(sde->head_sn != tx->sn))
                dd_dev_err(sde->dd, "expected %llu got %llu\n",
-                          sde->head_sn, txp->sn);
+                          sde->head_sn, tx->sn);
        sde->head_sn++;
 #endif
        sdma_txclean(sde->dd, tx);