Commit bd0d78ad authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab

media: mxl5005s: drop some dead code

As reported by clang (with W=1), the ctrlVal var is never used.

Yet, there are even some loops to estimate it. As this is dead
code, remove it. If ever needed, someone could revert this
patch.
Reviewed-by: default avatarNathan Chancellor <nathan@kernel.org>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent 67559900
...@@ -3414,9 +3414,8 @@ static u16 MXL_ControlWrite_Group(struct dvb_frontend *fe, u16 controlNum, ...@@ -3414,9 +3414,8 @@ static u16 MXL_ControlWrite_Group(struct dvb_frontend *fe, u16 controlNum,
u32 value, u16 controlGroup) u32 value, u16 controlGroup)
{ {
struct mxl5005s_state *state = fe->tuner_priv; struct mxl5005s_state *state = fe->tuner_priv;
u16 i, j, k; u16 i, j;
u32 highLimit; u32 highLimit;
u32 ctrlVal;
if (controlGroup == 1) /* Initial Control */ { if (controlGroup == 1) /* Initial Control */ {
...@@ -3432,9 +3431,6 @@ static u16 MXL_ControlWrite_Group(struct dvb_frontend *fe, u16 controlNum, ...@@ -3432,9 +3431,6 @@ static u16 MXL_ControlWrite_Group(struct dvb_frontend *fe, u16 controlNum,
(u8)(state->Init_Ctrl[i].bit[j]), (u8)(state->Init_Ctrl[i].bit[j]),
(u8)((value>>j) & 0x01)); (u8)((value>>j) & 0x01));
} }
ctrlVal = 0;
for (k = 0; k < state->Init_Ctrl[i].size; k++)
ctrlVal += state->Init_Ctrl[i].val[k] * (1 << k);
} else } else
return -1; return -1;
} }
...@@ -3454,9 +3450,6 @@ static u16 MXL_ControlWrite_Group(struct dvb_frontend *fe, u16 controlNum, ...@@ -3454,9 +3450,6 @@ static u16 MXL_ControlWrite_Group(struct dvb_frontend *fe, u16 controlNum,
(u8)(state->CH_Ctrl[i].bit[j]), (u8)(state->CH_Ctrl[i].bit[j]),
(u8)((value>>j) & 0x01)); (u8)((value>>j) & 0x01));
} }
ctrlVal = 0;
for (k = 0; k < state->CH_Ctrl[i].size; k++)
ctrlVal += state->CH_Ctrl[i].val[k] * (1 << k);
} else } else
return -1; return -1;
} }
...@@ -3477,11 +3470,6 @@ static u16 MXL_ControlWrite_Group(struct dvb_frontend *fe, u16 controlNum, ...@@ -3477,11 +3470,6 @@ static u16 MXL_ControlWrite_Group(struct dvb_frontend *fe, u16 controlNum,
(u8)(state->MXL_Ctrl[i].bit[j]), (u8)(state->MXL_Ctrl[i].bit[j]),
(u8)((value>>j) & 0x01)); (u8)((value>>j) & 0x01));
} }
ctrlVal = 0;
for (k = 0; k < state->MXL_Ctrl[i].size; k++)
ctrlVal += state->
MXL_Ctrl[i].val[k] *
(1 << k);
} else } else
return -1; return -1;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment