Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 06eeefe8 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab
Browse files

[media] media drivers: annotate fall-through



Avoid warnings like those:

drivers/media/pci/ddbridge/ddbridge-core.c: In function 'dvb_input_detach':
drivers/media/pci/ddbridge/ddbridge-core.c:787:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
   if (input->fe) {
      ^
drivers/media/pci/ddbridge/ddbridge-core.c:792:2: note: here
  case 4:
  ^~~~
...

On several cases, it is just that gcc 7.1 is not capable of
understanding the comment, but on other places, we need an
annotation.

Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent 39c4806e
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -535,6 +535,7 @@ static void af9013_statistics_work(struct work_struct *work)
	switch (state->statistics_step) {
	default:
		state->statistics_step = 0;
		/* fall-through */
	case 0:
		af9013_statistics_signal_strength(&state->fe);
		state->statistics_step++;
+2 −1
Original line number Diff line number Diff line
@@ -773,7 +773,8 @@ static int bcm3510_init(struct dvb_frontend* fe)
			deb_info("attempting to download firmware\n");
			if ((ret = bcm3510_init_cold(st)) < 0)
				return ret;
		case JDEC_EEPROM_LOAD_WAIT: /* fall-through is wanted */
			/* fall-through */
		case JDEC_EEPROM_LOAD_WAIT:
			deb_info("firmware is loaded\n");
			bcm3510_check_firmware_version(st);
			break;
+3 −3
Original line number Diff line number Diff line
@@ -279,10 +279,10 @@ static int dib7000p_set_power_mode(struct dib7000p_state *state, enum dib7000p_p
		if (state->version != SOC7090)
			reg_1280 &= ~((1 << 11));
		reg_1280 &= ~(1 << 6);
		/* fall through wanted to enable the interfaces */

		/* fall-through */
	case DIB7000P_POWER_INTERFACE_ONLY:
		/* just leave power on the control-interfaces: GPIO and (I2C or SDIO) */
	case DIB7000P_POWER_INTERFACE_ONLY:	/* TODO power up either SDIO or I2C */
		/* TODO power up either SDIO or I2C */
		if (state->version == SOC7090)
			reg_1280 &= ~((1 << 7) | (1 << 5));
		else
+11 −9
Original line number Diff line number Diff line
@@ -2837,7 +2837,8 @@ ctrl_set_cfg_mpeg_output(struct drx_demod_instance *demod, struct drx_cfg_mpeg_o
			/* coef = 188/204                          */
			max_bit_rate =
			    (ext_attr->curr_symbol_rate / 8) * nr_bits * 188;
			/* pass through b/c Annex A/c need following settings */
			/* pass through as b/c Annex A/c need following settings */
			/* fall-through */
		case DRX_STANDARD_ITU_B:
			rc = drxj_dap_write_reg16(dev_addr, FEC_OC_FCT_USAGE__A, FEC_OC_FCT_USAGE__PRE, 0);
			if (rc != 0) {
@@ -4776,9 +4777,9 @@ set_frequency(struct drx_demod_instance *demod,
	   No need to account for mirroring on RF
	 */
	switch (ext_attr->standard) {
	case DRX_STANDARD_ITU_A:	/* fallthrough */
	case DRX_STANDARD_ITU_C:	/* fallthrough */
	case DRX_STANDARD_PAL_SECAM_LP:	/* fallthrough */
	case DRX_STANDARD_ITU_A:
	case DRX_STANDARD_ITU_C:
	case DRX_STANDARD_PAL_SECAM_LP:
	case DRX_STANDARD_8VSB:
		select_pos_image = true;
		break;
@@ -4787,11 +4788,12 @@ set_frequency(struct drx_demod_instance *demod,
		   Sound carrier is already 3Mhz above centre frequency due
		   to tuner setting so now add an extra shift of 1MHz... */
		fm_frequency_shift = 1000;
	case DRX_STANDARD_ITU_B:	/* fallthrough */
	case DRX_STANDARD_NTSC:	/* fallthrough */
	case DRX_STANDARD_PAL_SECAM_BG:	/* fallthrough */
	case DRX_STANDARD_PAL_SECAM_DK:	/* fallthrough */
	case DRX_STANDARD_PAL_SECAM_I:	/* fallthrough */
		/*fall through */
	case DRX_STANDARD_ITU_B:
	case DRX_STANDARD_NTSC:
	case DRX_STANDARD_PAL_SECAM_BG:
	case DRX_STANDARD_PAL_SECAM_DK:
	case DRX_STANDARD_PAL_SECAM_I:
	case DRX_STANDARD_PAL_SECAM_L:
		select_pos_image = false;
		break;
+7 −3
Original line number Diff line number Diff line
@@ -1517,12 +1517,14 @@ static int SetDeviceTypeId(struct drxd_state *state)
			switch (deviceId) {
			case 4:
				state->diversity = 1;
				/* fall through */
			case 3:
			case 7:
				state->PGA = 1;
				break;
			case 6:
				state->diversity = 1;
				/* fall through */
			case 5:
			case 8:
				break;
@@ -1969,7 +1971,8 @@ static int DRX_Start(struct drxd_state *state, s32 off)
		switch (p->transmission_mode) {
		default:	/* Not set, detect it automatically */
			operationMode |= SC_RA_RAM_OP_AUTO_MODE__M;
			/* fall through , try first guess DRX_FFTMODE_8K */
			/* try first guess DRX_FFTMODE_8K */
			/* fall through */
		case TRANSMISSION_MODE_8K:
			transmissionParams |= SC_RA_RAM_OP_PARAM_MODE_8K;
			if (state->type_A) {
@@ -2143,8 +2146,8 @@ static int DRX_Start(struct drxd_state *state, s32 off)
		switch (p->modulation) {
		default:
			operationMode |= SC_RA_RAM_OP_AUTO_CONST__M;
			/* fall through , try first guess
			   DRX_CONSTELLATION_QAM64 */
			/* try first guess DRX_CONSTELLATION_QAM64 */
			/* fall through */
		case QAM_64:
			transmissionParams |= SC_RA_RAM_OP_PARAM_CONST_QAM64;
			if (state->type_A) {
@@ -2280,6 +2283,7 @@ static int DRX_Start(struct drxd_state *state, s32 off)
			break;
		default:
			operationMode |= SC_RA_RAM_OP_AUTO_RATE__M;
			/* fall through */
		case FEC_2_3:
			transmissionParams |= SC_RA_RAM_OP_PARAM_RATE_2_3;
			if (state->type_A) {
Loading