Commit f6e7393e authored by Gustavo A. R. Silva's avatar Gustavo A. R. Silva Committed by Ben Skeggs
Browse files

drm/nouveau: Use fallthrough pseudo-keyword

Replace the existing /* fall through */ comments and its variants with
the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary
fall-through markings when it is the case.

[1] https://www.kernel.org/doc/html/latest/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through



Signed-off-by: default avatarGustavo A. R. Silva <gustavoars@kernel.org>
Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent 7763d24f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -933,7 +933,7 @@ nv50_dp_bpc_to_depth(unsigned int bpc)
	switch (bpc) {
	case  6: return 0x2;
	case  8: return 0x5;
	case 10: /* fall-through */
	case 10:
	default: return 0x6;
	}
}
+1 −1
Original line number Diff line number Diff line
@@ -1461,7 +1461,7 @@ nouveau_ttm_io_mem_reserve(struct ttm_bo_device *bdev, struct ttm_mem_reg *reg)
		if (drm->client.mem->oclass < NVIF_CLASS_MEM_NV50 || !mem->kind)
			/* untiled */
			break;
		/* fall through - tiled memory */
		fallthrough;	/* tiled memory */
	case TTM_PL_VRAM:
		reg->bus.offset = reg->start << PAGE_SHIFT;
		reg->bus.base = device->func->resource_addr(device, 1);
+2 −2
Original line number Diff line number Diff line
@@ -330,7 +330,7 @@ nouveau_conn_attach_properties(struct drm_connector *connector)
	case DRM_MODE_CONNECTOR_VGA:
		if (disp->disp.object.oclass < NV50_DISP)
			break; /* Can only scale on DFPs. */
		/* Fall-through. */
		fallthrough;
	default:
		drm_object_attach_property(&connector->base, dev->mode_config.
					   scaling_mode_property,
@@ -445,7 +445,7 @@ nouveau_connector_ddc_detect(struct drm_connector *connector)
		case DCB_OUTPUT_LVDS:
			switcheroo_ddc = !!(vga_switcheroo_handler_flags() &
					    VGA_SWITCHEROO_CAN_SWITCH_DDC);
		/* fall-through */
			fallthrough;
		default:
			if (!nv_encoder->i2c)
				break;
+17 −17
Original line number Diff line number Diff line
@@ -23,55 +23,55 @@ void pack_hdmi_infoframe(struct packed_hdmi_infoframe *packed_frame,
		 */
	case 17:
		subpack1_high = (raw_frame[16] << 16);
		/* fall through */
		fallthrough;
	case 16:
		subpack1_high |= (raw_frame[15] << 8);
		/* fall through */
		fallthrough;
	case 15:
		subpack1_high |= raw_frame[14];
		/* fall through */
		fallthrough;
	case 14:
		subpack1_low = (raw_frame[13] << 24);
		/* fall through */
		fallthrough;
	case 13:
		subpack1_low |= (raw_frame[12] << 16);
		/* fall through */
		fallthrough;
	case 12:
		subpack1_low |= (raw_frame[11] << 8);
		/* fall through */
		fallthrough;
	case 11:
		subpack1_low |= raw_frame[10];
		/* fall through */
		fallthrough;
	case 10:
		subpack0_high = (raw_frame[9] << 16);
		/* fall through */
		fallthrough;
	case 9:
		subpack0_high |= (raw_frame[8] << 8);
		/* fall through */
		fallthrough;
	case 8:
		subpack0_high |= raw_frame[7];
		/* fall through */
		fallthrough;
	case 7:
		subpack0_low = (raw_frame[6] << 24);
		/* fall through */
		fallthrough;
	case 6:
		subpack0_low |= (raw_frame[5] << 16);
		/* fall through */
		fallthrough;
	case 5:
		subpack0_low |= (raw_frame[4] << 8);
		/* fall through */
		fallthrough;
	case 4:
		subpack0_low |= raw_frame[3];
		/* fall through */
		fallthrough;
	case 3:
		header = (raw_frame[2] << 16);
		/* fall through */
		fallthrough;
	case 2:
		header |= (raw_frame[1] << 8);
		/* fall through */
		fallthrough;
	case 1:
		header |= raw_frame[0];
		/* fall through */
		fallthrough;
	case 0:
		break;
	}
+1 −1
Original line number Diff line number Diff line
@@ -122,7 +122,7 @@ nv04_dmaobj_new(struct nvkm_dma *dma, const struct nvkm_oclass *oclass,
		break;
	case NV_MEM_ACCESS_WO:
		dmaobj->flags0 |= 0x00008000;
		/* fall through */
		fallthrough;
	case NV_MEM_ACCESS_RW:
		dmaobj->flags2 |= 0x00000002;
		break;
Loading