Skip to contentSkip to conversation

dvb-frontends/tda18271c2dd: silence sparse fall through warning

PATCH In review Daniel Scheller 2 participants 2 messages Jun 24, 2018 – Jul 30, 2018 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dvb-frontends/tda18271c2dd: silence sparse fall through warning

From: Daniel Scheller <[email protected]>

Add a break statement in set_params() for the SYS_DVBT(2) case to silence this sparse warning:

drivers/media/dvb-frontends/tda18271c2dd.c:1144:3: warning: this statement may fall through [-Wimplicit-fallthrough=]

as reported in Hans' daily media_tree builds.

---
 drivers/media/dvb-frontends/tda18271c2dd.c | 1 +
 1 file changed, 1 insertion(+)
drivers/media/dvb-frontends/tda18271c2dd.c +1 -0
index 2e1d36ae943b..fcffc7b4acf7 100644
@@ -1154,6 +1154,7 @@ static int set_params(struct dvb_frontend *fe)
 		default:
 			return -EINVAL;
 		}
+		break;
 	case SYS_DVBC_ANNEX_A:
 	case SYS_DVBC_ANNEX_C:
 		if (bw <= 6000000)
Signature · 1 line
2.16.4
#1 lore raw

Em Sun, 24 Jun 2018 15:42:50 +0200
Daniel Scheller <[email protected]> escreveu:

Quoted 19 lines

From: Daniel Scheller <[email protected]>

Add a break statement in set_params() for the SYS_DVBT(2) case to silence this sparse warning:

drivers/media/dvb-frontends/tda18271c2dd.c:1144:3: warning: this statement may fall through [-Wimplicit-fallthrough=]

as reported in Hans' daily media_tree builds.

---
 drivers/media/dvb-frontends/tda18271c2dd.c | 1 +
 1 file changed, 1 insertion(+)
drivers/media/dvb-frontends/tda18271c2dd.c +0 -0
index 2e1d36ae943b..fcffc7b4acf7 100644

drivers/media/dvb-frontends/tda18271c2dd.c static int set_params(struct dvb_frontend *fe) · line 1157

Quoted 4 lines
drivers/media/dvb-frontends/tda18271c2dd.c +1 -0
@@ -1154,6 +1154,7 @@ static int set_params(struct dvb_frontend *fe)
 		default:
 			return -EINVAL;
 		}
+		break;

This actually seems to be a bug. Did you test this patch with an actual hardware?

Regards,
Mauro

Thanks,
Mauro