tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

fallthrough and breaks in drm and atheros codes



Hi,

I am not sure if the following is correct, so I am posting it here instead
of committing...

christos

Index: external/bsd/drm2/dist/drm/nouveau/nvkm/engine/dma/nouveau_nvkm_engine_dma_usernv04.c
===================================================================
RCS file: /cvsroot/src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/engine/dma/nouveau_nvkm_engine_dma_usernv04.c,v
retrieving revision 1.2
diff -u -p -u -r1.2 nouveau_nvkm_engine_dma_usernv04.c
--- external/bsd/drm2/dist/drm/nouveau/nvkm/engine/dma/nouveau_nvkm_engine_dma_usernv04.c	27 Aug 2018 04:58:31 -0000	1.2
+++ external/bsd/drm2/dist/drm/nouveau/nvkm/engine/dma/nouveau_nvkm_engine_dma_usernv04.c	18 Feb 2019 23:26:03 -0000
@@ -127,6 +127,7 @@ nv04_dmaobj_new(struct nvkm_dma *dma, co
 		break;
 	case NV_MEM_ACCESS_WO:
 		dmaobj->flags0 |= 0x00008000;
+		break;
 	case NV_MEM_ACCESS_RW:
 		dmaobj->flags2 |= 0x00000002;
 		break;
Index: external/bsd/drm2/dist/drm/nouveau/nvkm/engine/fifo/nouveau_nvkm_engine_fifo_nv04.c
===================================================================
RCS file: /cvsroot/src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/engine/fifo/nouveau_nvkm_engine_fifo_nv04.c,v
retrieving revision 1.2
diff -u -p -u -r1.2 nouveau_nvkm_engine_fifo_nv04.c
--- external/bsd/drm2/dist/drm/nouveau/nvkm/engine/fifo/nouveau_nvkm_engine_fifo_nv04.c	27 Aug 2018 04:58:31 -0000	1.2
+++ external/bsd/drm2/dist/drm/nouveau/nvkm/engine/fifo/nouveau_nvkm_engine_fifo_nv04.c	18 Feb 2019 23:26:03 -0000
@@ -122,8 +122,10 @@ nv04_fifo_swmthd(struct nvkm_device *dev
 	switch (mthd) {
 	case 0x0000 ... 0x0000: /* subchannel's engine -> software */
 		nvkm_wr32(device, 0x003280, (engine &= ~mask));
+		/*FALLTHROUGH*/
 	case 0x0180 ... 0x01fc: /* handle -> instance */
 		data = nvkm_rd32(device, 0x003258) & 0x0000ffff;
+		/*FALLTHROUGH*/
 	case 0x0100 ... 0x017c:
 	case 0x0200 ... 0x1ffc: /* pass method down to sw */
 		if (!(engine & mask) && sw)
Index: external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/bios/nouveau_nvkm_subdev_bios_perf.c
===================================================================
RCS file: /cvsroot/src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/bios/nouveau_nvkm_subdev_bios_perf.c,v
retrieving revision 1.2
diff -u -p -u -r1.2 nouveau_nvkm_subdev_bios_perf.c
--- external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/bios/nouveau_nvkm_subdev_bios_perf.c	27 Aug 2018 04:58:33 -0000	1.2
+++ external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/bios/nouveau_nvkm_subdev_bios_perf.c	18 Feb 2019 23:26:03 -0000
@@ -139,6 +139,7 @@ nvbios_perfEp(struct nvkm_bios *bios, in
 		break;
 	case 0x30:
 		info->script   = nvbios_rd16(bios, perf + 0x02);
+		break;
 	case 0x35:
 		info->fanspeed = nvbios_rd08(bios, perf + 0x06);
 		info->voltage  = nvbios_rd08(bios, perf + 0x07);
Index: external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/bios/nouveau_nvkm_subdev_bios_pll.c
===================================================================
RCS file: /cvsroot/src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/bios/nouveau_nvkm_subdev_bios_pll.c,v
retrieving revision 1.2
diff -u -p -u -r1.2 nouveau_nvkm_subdev_bios_pll.c
--- external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/bios/nouveau_nvkm_subdev_bios_pll.c	27 Aug 2018 04:58:33 -0000	1.2
+++ external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/bios/nouveau_nvkm_subdev_bios_pll.c	18 Feb 2019 23:26:03 -0000
@@ -135,6 +135,7 @@ pll_map(struct nvkm_bios *bios)
 		    device->chipset == 0xaa ||
 		    device->chipset == 0xac)
 			return g84_pll_mapping;
+		/*FALLTHROUGH*/
 	default:
 		return NULL;
 	}
Index: external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/bios/nouveau_nvkm_subdev_bios_timing.c
===================================================================
RCS file: /cvsroot/src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/bios/nouveau_nvkm_subdev_bios_timing.c,v
retrieving revision 1.2
diff -u -p -u -r1.2 nouveau_nvkm_subdev_bios_timing.c
--- external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/bios/nouveau_nvkm_subdev_bios_timing.c	27 Aug 2018 04:58:33 -0000	1.2
+++ external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/bios/nouveau_nvkm_subdev_bios_timing.c	18 Feb 2019 23:26:03 -0000
@@ -120,16 +120,21 @@ nvbios_timingEp(struct nvkm_bios *bios, 
 		switch (min_t(u8, *hdr, 25)) {
 		case 25:
 			p->timing_10_24  = nvbios_rd08(bios, data + 0x18);
+			/*FALLTHROUGH*/
 		case 24:
 		case 23:
 		case 22:
 			p->timing_10_21  = nvbios_rd08(bios, data + 0x15);
+			/*FALLTHROUGH*/
 		case 21:
 			p->timing_10_20  = nvbios_rd08(bios, data + 0x14);
+			/*FALLTHROUGH*/
 		case 20:
 			p->timing_10_CWL = nvbios_rd08(bios, data + 0x13);
+			/*FALLTHROUGH*/
 		case 19:
 			p->timing_10_18  = nvbios_rd08(bios, data + 0x12);
+			/*FALLTHROUGH*/
 		case 18:
 		case 17:
 			p->timing_10_16  = nvbios_rd08(bios, data + 0x10);
Index: external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/clk/nouveau_nvkm_subdev_clk_mcp77.c
===================================================================
RCS file: /cvsroot/src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/clk/nouveau_nvkm_subdev_clk_mcp77.c,v
retrieving revision 1.2
diff -u -p -u -r1.2 nouveau_nvkm_subdev_clk_mcp77.c
--- external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/clk/nouveau_nvkm_subdev_clk_mcp77.c	27 Aug 2018 04:58:33 -0000	1.2
+++ external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/clk/nouveau_nvkm_subdev_clk_mcp77.c	18 Feb 2019 23:26:03 -0000
@@ -368,6 +368,7 @@ mcp77_clk_prog(struct nvkm_clk *base)
 	switch (clk->vsrc) {
 	case nv_clk_src_cclk:
 		mast |= 0x00400000;
+		/*FALLTHROUGH*/
 	default:
 		nvkm_wr32(device, 0x4600, clk->vdiv);
 	}
Index: external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/fb/nouveau_nvkm_subdev_fb_ramnv40.c
===================================================================
RCS file: /cvsroot/src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/fb/nouveau_nvkm_subdev_fb_ramnv40.c,v
retrieving revision 1.2
diff -u -p -u -r1.2 nouveau_nvkm_subdev_fb_ramnv40.c
--- external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/fb/nouveau_nvkm_subdev_fb_ramnv40.c	27 Aug 2018 04:58:33 -0000	1.2
+++ external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/fb/nouveau_nvkm_subdev_fb_ramnv40.c	18 Feb 2019 23:26:03 -0000
@@ -136,11 +136,13 @@ nv40_ram_prog(struct nvkm_ram *base)
 		nvkm_mask(device, 0x00402c, 0xc0771100, ram->ctrl);
 		nvkm_wr32(device, 0x004048, ram->coef);
 		nvkm_wr32(device, 0x004030, ram->coef);
+		break;
 	case 0x43:
 	case 0x49:
 	case 0x4b:
 		nvkm_mask(device, 0x004038, 0xc0771100, ram->ctrl);
 		nvkm_wr32(device, 0x00403c, ram->coef);
+		break;
 	default:
 		nvkm_mask(device, 0x004020, 0xc0771100, ram->ctrl);
 		nvkm_wr32(device, 0x004024, ram->coef);
Index: external/bsd/drm2/dist/drm/ttm/ttm_bo.c
===================================================================
RCS file: /cvsroot/src/sys/external/bsd/drm2/dist/drm/ttm/ttm_bo.c,v
retrieving revision 1.15
diff -u -p -u -r1.15 ttm_bo.c
--- external/bsd/drm2/dist/drm/ttm/ttm_bo.c	2 Feb 2019 21:46:27 -0000	1.15
+++ external/bsd/drm2/dist/drm/ttm/ttm_bo.c	18 Feb 2019 23:26:03 -0000
@@ -273,6 +273,7 @@ static int ttm_bo_add_ttm(struct ttm_buf
 	case ttm_bo_type_device:
 		if (zero_alloc)
 			page_flags |= TTM_PAGE_FLAG_ZERO_ALLOC;
+		/*FALLTHROUGH*/
 	case ttm_bo_type_kernel:
 		bo->ttm = bdev->driver->ttm_tt_create(bdev, bo->num_pages << PAGE_SHIFT,
 						      page_flags, glob->dummy_read_page);
Index: external/isc/atheros_hal/dist/ar5212/ar5212_xmit.c
===================================================================
RCS file: /cvsroot/src/sys/external/isc/atheros_hal/dist/ar5212/ar5212_xmit.c,v
retrieving revision 1.3
diff -u -p -u -r1.3 ar5212_xmit.c
--- external/isc/atheros_hal/dist/ar5212/ar5212_xmit.c	7 Mar 2011 11:25:43 -0000	1.3
+++ external/isc/atheros_hal/dist/ar5212/ar5212_xmit.c	18 Feb 2019 23:26:03 -0000
@@ -902,7 +902,9 @@ ar5212ProcTxDesc(struct ath_hal *ah,
 	 */
 	switch (ts->ts_finaltsi) {
 	case 3: ts->ts_longretry += MS(ads->ds_ctl2, AR_XmitDataTries2);
+		/*FALLTHROUGH*/
 	case 2: ts->ts_longretry += MS(ads->ds_ctl2, AR_XmitDataTries1);
+		/*FALLTHROUGH*/
 	case 1: ts->ts_longretry += MS(ads->ds_ctl2, AR_XmitDataTries0);
 	}
 	ts->ts_virtcol = MS(ads->ds_txstatus0, AR_VirtCollCnt);
Index: external/isc/atheros_hal/dist/ar5416/ar5416_xmit.c
===================================================================
RCS file: /cvsroot/src/sys/external/isc/atheros_hal/dist/ar5416/ar5416_xmit.c,v
retrieving revision 1.1.1.1
diff -u -p -u -r1.1.1.1 ar5416_xmit.c
--- external/isc/atheros_hal/dist/ar5416/ar5416_xmit.c	11 Dec 2008 04:46:50 -0000	1.1.1.1
+++ external/isc/atheros_hal/dist/ar5416/ar5416_xmit.c	18 Feb 2019 23:26:03 -0000
@@ -558,7 +558,9 @@ ar5416ProcTxDesc(struct ath_hal *ah,
 	 */
 	switch (ts->ts_finaltsi) {
 	case 3: ts->ts_longretry += MS(ads->ds_ctl2, AR_XmitDataTries2);
+		/*FALLTHROUGH*/
 	case 2: ts->ts_longretry += MS(ads->ds_ctl2, AR_XmitDataTries1);
+		/*FALLTHROUGH*/
 	case 1: ts->ts_longretry += MS(ads->ds_ctl2, AR_XmitDataTries0);
 	}
 


Home | Main Index | Thread Index | Old Index