media: dvb-frontends: lgdt3306a.c: remove dead code
PATCH 14/20 media: dvb-frontends: lgdt3306a.c: remove dead code
From: "Daniel W. S. Almeida" <[email protected]>
Fix the following coccinelle report:
drivers/media/dvb-frontends/lgdt3306a.c:718:5-8:
Unneeded variable: "ret". Return "0" on line 744
Code was enclosed with #if 0 and thus this variable was not needed. Remove that code altogether.
Found using - Coccinelle (http://coccinelle.lip6.fr)
--- drivers/media/dvb-frontends/lgdt3306a.c | 27 +------------------------ 1 file changed, 1 insertion(+), 26 deletions(-)
drivers/media/dvb-frontends/lgdt3306a.c +1 -26
@@ -715,33 +715,8 @@ static int lgdt3306a_spectral_inversion(struct lgdt3306a_state *state, struct dtv_frontend_properties *p, int inversion) { - int ret = 0; -dbg_info ("(%d)\n" , inversion); -#if 0 -/* -* FGR - spectral_inversion defaults already set for VSB and QAM; -* can enable later if desired -*/ - - ret =lgdt3306a_set_inversion (state, inversion); - -switch (p->modulation) { -case VSB_8 : -/* Manual only for VSB */ - ret =lgdt3306a_set_inversion_auto (state,0 ); -break ; -case QAM_64 : -case QAM_256 : -case QAM_AUTO : -/* Auto ok for QAM */ - ret =lgdt3306a_set_inversion_auto (state,1 ); -break ; -default : - ret = -EINVAL ; - } -#endif -return ret; +return 0 ; } static int lgdt3306a_set_if(struct lgdt3306a_state *state,
Signature · 1 line
2.28.0
Quoted 47 lines · Daniel W. S. Almeida
From: "Daniel W. S. Almeida" <[email protected]>
Fix the following coccinelle report:
drivers/media/dvb-frontends/lgdt3306a.c:718:5-8:
Unneeded variable: "ret". Return "0" on line 744Code was enclosed with #if 0 and thus this variable was not needed. Remove that code altogether.
Found using - Coccinelle (http://coccinelle.lip6.fr)
Signed-off-by Daniel W. S. Almeida <[email protected]>--- drivers/media/dvb-frontends/lgdt3306a.c | 27 +------------------------ 1 file changed, 1 insertion(+), 26 deletions(-)drivers/media/dvb-frontends/lgdt3306a.c +0
-20@@ -715,33 +715,8 @@ static int lgdt3306a_spectral_inversion(struct lgdt3306a_state *state, struct dtv_frontend_properties *p, int inversion) { - int ret = 0; -dbg_info ("(%d)\n" , inversion); -#if 0 - /* - * FGR - spectral_inversion defaults already set for VSB and QAM; - * can enable later if desired - */ - - ret = lgdt3306a_set_inversion(state, inversion); - - switch (p->modulation) { - case VSB_8: - /* Manual only for VSB */ - ret = lgdt3306a_set_inversion_auto(state, 0); - break; - case QAM_64: - case QAM_256: - case QAM_AUTO: - /* Auto ok for QAM */ - ret = lgdt3306a_set_inversion_auto(state, 1);
drivers/media/dvb-frontends/lgdt3306a.c static int lgdt3306a_spectral_inversion(struct lgdt3306a_state *state, · line 722
Quoted 10 lines
drivers/media/dvb-frontends/lgdt3306a.c +1
-6-break ; -default : - ret = -EINVAL ; - } -#endif -return ret; +return 0 ; } static int lgdt3306a_set_if(struct lgdt3306a_state *state,
You can drop the lgdt3306a_spectral_inversion function completely since the function doesn't do anything. It would be good to replace the function call with the comment "spectral_inversion defaults already set for VSB and QAM" so that information isn't lost.
Regards,
Hans