Message ID | 4E1FBF93.6040702@redhat.com (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
On Friday 15 July 2011 06:18:27 Mauro Carvalho Chehab wrote: > Em 14-07-2011 20:45, Oliver Endriss escreveu: > > - DVB-T tuning does not work anymore. > > The enclosed patch should fix the issue. It were due to a wrong goto error > replacements that happened at the changeset that were fixing the error > propagation logic. Sorry for that. > > Please test. Done. DVB-T works again. Thanks. @all Could someone please test DVB-C? > [media] drxk: Fix a bug at some switches that broke DVB-T > > The error propagation changeset c23bf4402 broke the DVB-T > code, as it wrongly replaced some break with goto error. > Fix the broken logic. > > Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> > > diff --git a/drivers/media/dvb/frontends/drxk_hard.c b/drivers/media/dvb/frontends/drxk_hard.c > index a0e2ff5..217796d 100644 > --- a/drivers/media/dvb/frontends/drxk_hard.c > +++ b/drivers/media/dvb/frontends/drxk_hard.c > @@ -3451,13 +3451,13 @@ static int DVBTCtrlSetEchoThreshold(struct drxk_state *state, > data |= ((echoThres->threshold << > OFDM_SC_RA_RAM_ECHO_THRES_2K__B) > & (OFDM_SC_RA_RAM_ECHO_THRES_2K__M)); > - goto error; > + break; > case DRX_FFTMODE_8K: > data &= ~OFDM_SC_RA_RAM_ECHO_THRES_8K__M; > data |= ((echoThres->threshold << > OFDM_SC_RA_RAM_ECHO_THRES_8K__B) > & (OFDM_SC_RA_RAM_ECHO_THRES_8K__M)); > - goto error; > + break; > default: > return -EINVAL; > goto error; ^^^^^^^^^^^ Hm, this 'goto' should be removed. CU Oliver
Em 15-07-2011 02:21, Oliver Endriss escreveu: > On Friday 15 July 2011 06:18:27 Mauro Carvalho Chehab wrote: >> Em 14-07-2011 20:45, Oliver Endriss escreveu: >>> - DVB-T tuning does not work anymore. >> >> The enclosed patch should fix the issue. It were due to a wrong goto error >> replacements that happened at the changeset that were fixing the error >> propagation logic. Sorry for that. >> >> Please test. > > Done. DVB-T works again. Thanks. Thanks for reporting the issue and testing the fix! > @all > Could someone please test DVB-C? > >> [media] drxk: Fix a bug at some switches that broke DVB-T >> >> The error propagation changeset c23bf4402 broke the DVB-T >> code, as it wrongly replaced some break with goto error. >> Fix the broken logic. >> >> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> >> >> diff --git a/drivers/media/dvb/frontends/drxk_hard.c b/drivers/media/dvb/frontends/drxk_hard.c >> index a0e2ff5..217796d 100644 >> --- a/drivers/media/dvb/frontends/drxk_hard.c >> +++ b/drivers/media/dvb/frontends/drxk_hard.c >> @@ -3451,13 +3451,13 @@ static int DVBTCtrlSetEchoThreshold(struct drxk_state *state, >> data |= ((echoThres->threshold << >> OFDM_SC_RA_RAM_ECHO_THRES_2K__B) >> & (OFDM_SC_RA_RAM_ECHO_THRES_2K__M)); >> - goto error; >> + break; >> case DRX_FFTMODE_8K: >> data &= ~OFDM_SC_RA_RAM_ECHO_THRES_8K__M; >> data |= ((echoThres->threshold << >> OFDM_SC_RA_RAM_ECHO_THRES_8K__B) >> & (OFDM_SC_RA_RAM_ECHO_THRES_8K__M)); >> - goto error; >> + break; >> default: >> return -EINVAL; >> goto error; > ^^^^^^^^^^^ > Hm, this 'goto' should be removed. True. I've just added a small trivial patch removing this goto, and a break after a return. Thanks! Mauro -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Mauro, could you please apply the two patches. I get complaints that drx is broken in media_build... CU Oliver
diff --git a/drivers/media/dvb/frontends/drxk_hard.c b/drivers/media/dvb/frontends/drxk_hard.c index a0e2ff5..217796d 100644 --- a/drivers/media/dvb/frontends/drxk_hard.c +++ b/drivers/media/dvb/frontends/drxk_hard.c @@ -3451,13 +3451,13 @@ static int DVBTCtrlSetEchoThreshold(struct drxk_state *state, data |= ((echoThres->threshold << OFDM_SC_RA_RAM_ECHO_THRES_2K__B) & (OFDM_SC_RA_RAM_ECHO_THRES_2K__M)); - goto error; + break; case DRX_FFTMODE_8K: data &= ~OFDM_SC_RA_RAM_ECHO_THRES_8K__M; data |= ((echoThres->threshold << OFDM_SC_RA_RAM_ECHO_THRES_8K__B) & (OFDM_SC_RA_RAM_ECHO_THRES_8K__M)); - goto error; + break; default: return -EINVAL; goto error; @@ -3825,10 +3825,10 @@ static int SetDVBT(struct drxk_state *state, u16 IntermediateFreqkHz, /* fall through , try first guess DRX_FFTMODE_8K */ case TRANSMISSION_MODE_8K: transmissionParams |= OFDM_SC_RA_RAM_OP_PARAM_MODE_8K; - goto error; + break; case TRANSMISSION_MODE_2K: transmissionParams |= OFDM_SC_RA_RAM_OP_PARAM_MODE_2K; - goto error; + break; } /* guard */ @@ -3839,16 +3839,16 @@ static int SetDVBT(struct drxk_state *state, u16 IntermediateFreqkHz, /* fall through , try first guess DRX_GUARD_1DIV4 */ case GUARD_INTERVAL_1_4: transmissionParams |= OFDM_SC_RA_RAM_OP_PARAM_GUARD_4; - goto error; + break; case GUARD_INTERVAL_1_32: transmissionParams |= OFDM_SC_RA_RAM_OP_PARAM_GUARD_32; - goto error; + break; case GUARD_INTERVAL_1_16: transmissionParams |= OFDM_SC_RA_RAM_OP_PARAM_GUARD_16; - goto error; + break; case GUARD_INTERVAL_1_8: transmissionParams |= OFDM_SC_RA_RAM_OP_PARAM_GUARD_8; - goto error; + break; } /* hierarchy */