diff options
author | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2014-12-23 17:21:12 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-02-02 18:21:25 +0300 |
commit | 901c4ad64c53f4d29d7bd96f33d1d5aae55ad8d8 (patch) | |
tree | 11595c1c1b1ec8a9e1d8efca9ae3c84a2c145428 /drivers/media/dvb-frontends | |
parent | 2b0aac3011bc7a9db27791bed4978554263ef079 (diff) | |
download | linux-901c4ad64c53f4d29d7bd96f33d1d5aae55ad8d8.tar.xz |
[media] dib8000: upd_demod_gain_period should be u32
X-Patchwork-Delegate: m.chehab@samsung.com
As shown at the code, upd_demod_gain_period is used to write
to two 16-bit registers:
dib8000_write_word(state, 1946, upd_demod_gain_period & 0xFFFF);
dib8000_write_word(state, 1947, reg | (1<<14) | ((upd_demod_gain_period >> 16) & 0xFF));
So, it should be declared as u32.
This fixes the following smatch warning:
drivers/media/dvb-frontends/dib8000.c:1282 dib8000_agc_startup() warn: right shifting more than type allows
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/dvb-frontends')
-rw-r--r-- | drivers/media/dvb-frontends/dib8000.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/media/dvb-frontends/dib8000.c b/drivers/media/dvb-frontends/dib8000.c index 61e31f2d2f71..8c6663b6399d 100644 --- a/drivers/media/dvb-frontends/dib8000.c +++ b/drivers/media/dvb-frontends/dib8000.c @@ -1263,7 +1263,8 @@ static int dib8000_agc_startup(struct dvb_frontend *fe) struct dib8000_state *state = fe->demodulator_priv; enum frontend_tune_state *tune_state = &state->tune_state; int ret = 0; - u16 reg, upd_demod_gain_period = 0x8000; + u16 reg; + u32 upd_demod_gain_period = 0x8000; switch (*tune_state) { case CT_AGC_START: |