From: Mauro Carvalho Chehab Date: Wed, 29 Apr 2015 18:48:10 +0000 (-0300) Subject: [media] tda10086: change typecast to u64 to avoid smatch warnings X-Git-Tag: firefly_0821_release~176^2~795^2~932 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=b674ac290e47623aa8e6791aed2d7395f7ea313f;p=firefly-linux-kernel-4.4.55.git [media] tda10086: change typecast to u64 to avoid smatch warnings drivers/media/dvb-frontends/tda10086.c:476 tda10086_get_frontend() warn: should 'tda10086_read_byte(state, 81) << 8' be a 64 bit type? Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/dvb-frontends/tda10086.c b/drivers/media/dvb-frontends/tda10086.c index fcfe2e080cb0..f1a752187d08 100644 --- a/drivers/media/dvb-frontends/tda10086.c +++ b/drivers/media/dvb-frontends/tda10086.c @@ -472,8 +472,8 @@ static int tda10086_get_frontend(struct dvb_frontend *fe) return -EINVAL; /* calculate the updated frequency (note: we convert from Hz->kHz) */ - tmp64 = tda10086_read_byte(state, 0x52); - tmp64 |= (tda10086_read_byte(state, 0x51) << 8); + tmp64 = ((u64)tda10086_read_byte(state, 0x52) + | (tda10086_read_byte(state, 0x51) << 8)); if (tmp64 & 0x8000) tmp64 |= 0xffffffffffff0000ULL; tmp64 = (tmp64 * (SACLK/1000ULL));