Skip to content

Commit af9598f

Browse files
committed
dmaengine: sdxi: checkpatch warning fixes (device.c)
Updates to match the rfc/v1 submission work in progress. Fix some checkpatch warnings, leaving the ones about splitting strings in the module parameter descriptions (I don't know how I would cause those to go away without editing the descriptions way down). drivers/dma/sdxi/device.c:462: WARNING: break is not useful after a return torvalds#462: FILE: drivers/dma/sdxi/device.c:462: + return; + break; drivers/dma/sdxi/device.c:747: WARNING: Integer promotion: Using 'h' in '%#hx' is unnecessary drivers/dma/sdxi/device.c:884: WARNING: Missing a blank line after declarations torvalds#884: FILE: drivers/dma/sdxi/device.c:884: + struct sdxi_cxt *cxt = sdxi->cxt_array[i][j]; + if (!cxt) Signed-off-by: Nathan Lynch <[email protected]>
1 parent 68d6d32 commit af9598f

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

drivers/dma/sdxi/device.c

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,6 @@ static void sdxi_cxt_shutdown(struct sdxi_cxt *target_cxt)
459459
case CXTV_STOP_SW:
460460
case CXTV_STOP_FN:
461461
return;
462-
break;
463462
case CXTV_RUN:
464463
case CXTV_STOPG_SW:
465464
case CXTV_STOPG_FN:
@@ -470,7 +469,6 @@ static void sdxi_cxt_shutdown(struct sdxi_cxt *target_cxt)
470469
sdxi_err(sdxi, "context %u in unknown state %u\n",
471470
cxtid, state);
472471
return;
473-
break;
474472
}
475473
} while (time_before(jiffies, deadline));
476474

@@ -601,11 +599,9 @@ static int sdxi_dev_start(struct sdxi_dev *sdxi)
601599
case SDXI_GSV_ACTIVE:
602600
sdxi_dbg(sdxi, "activated\n");
603601
return 0;
604-
break;
605602
case SDXI_GSV_ERROR:
606603
sdxi_err(sdxi, "went to error state\n");
607604
return -EIO;
608-
break;
609605
case SDXI_GSV_INIT:
610606
case SDXI_GSV_STOP:
611607
// transitional states, wait
@@ -614,7 +610,6 @@ static int sdxi_dev_start(struct sdxi_dev *sdxi)
614610
default:
615611
sdxi_err(sdxi, "unexpected gsv %u, giving up\n", status);
616612
return -EIO;
617-
break;
618613
}
619614
} while (time_before(jiffies, deadline));
620615

@@ -650,7 +645,6 @@ static int sdxi_dev_stop(struct sdxi_dev *sdxi)
650645
break;
651646
case SDXI_GSV_STOP:
652647
return 0;
653-
break;
654648
case SDXI_GSV_INIT:
655649
case SDXI_GSV_STOPG_SF:
656650
case SDXI_GSV_STOPG_HD:
@@ -662,7 +656,6 @@ static int sdxi_dev_stop(struct sdxi_dev *sdxi)
662656
default:
663657
sdxi_err(sdxi, "unknown gsv %u, giving up\n", status);
664658
return -EIO;
665-
break;
666659
}
667660
} while (time_before(jiffies, deadline));
668661

@@ -745,7 +738,7 @@ static int sdxi_fn_activate(struct sdxi_dev *sdxi)
745738
sdxi_write64(sdxi, SDXI_MMIO_CTL2, ctl2);
746739

747740
sdxi_dbg(sdxi,
748-
"sfunc:%#hx descmax:%llu dbstride:%#x akeymax:%u cxtmax:%u opgrps:%#x\n",
741+
"sfunc:%#x descmax:%llu dbstride:%#x akeymax:%u cxtmax:%u opgrps:%#x\n",
749742
sdxi->sfunc, sdxi->max_ring_entries, sdxi->db_stride,
750743
sdxi->max_akeys, sdxi->max_cxts, sdxi->op_grp_cap);
751744

@@ -881,6 +874,7 @@ void sdxi_device_exit(struct sdxi_dev *sdxi)
881874
// When a context is released its entry in the table should be NULL.
882875
for (size_t j = 0; j < L1_TABLE_ENTRIES; ++j) {
883876
struct sdxi_cxt *cxt = sdxi->cxt_array[i][j];
877+
884878
if (!cxt)
885879
continue;
886880
if (cxt->id != 0) // admin context shutdown is last

0 commit comments

Comments
 (0)