summaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb-frontends/dib8000.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <m.chehab@samsung.com>2014-01-13 15:05:44 -0200
committerMauro Carvalho Chehab <m.chehab@samsung.com>2014-01-13 16:28:12 -0200
commit5dc8526b90979c2cacdf32d1ea3b82de7744bd71 (patch)
tree2f47ceb0a1245caeebcb352471bfd2f4218f1641 /drivers/media/dvb-frontends/dib8000.c
parent6fcd3b619c06544b5d33493d0ab297a5b8e64b68 (diff)
downloadblackbird-op-linux-5dc8526b90979c2cacdf32d1ea3b82de7744bd71.tar.gz
blackbird-op-linux-5dc8526b90979c2cacdf32d1ea3b82de7744bd71.zip
[media] dib8000: Properly represent long long integers
When compiling with avr32, it gets those errors: drivers/media/dvb-frontends/dib8000.c: In function 'dib8000_get_stats': drivers/media/dvb-frontends/dib8000.c:4121: warning: integer constant is too large for 'long' type Fix integer representation to avoid overflow. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/media/dvb-frontends/dib8000.c')
-rw-r--r--drivers/media/dvb-frontends/dib8000.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/media/dvb-frontends/dib8000.c b/drivers/media/dvb-frontends/dib8000.c
index 481ee49e6a37..dd4a99cff3e7 100644
--- a/drivers/media/dvb-frontends/dib8000.c
+++ b/drivers/media/dvb-frontends/dib8000.c
@@ -4118,7 +4118,7 @@ static int dib8000_get_stats(struct dvb_frontend *fe, fe_status_t stat)
/* Get UCB measures */
dib8000_read_unc_blocks(fe, &val);
if (val < state->init_ucb)
- state->init_ucb += 0x100000000L;
+ state->init_ucb += 0x100000000LL;
c->block_error.stat[0].scale = FE_SCALE_COUNTER;
c->block_error.stat[0].uvalue = val + state->init_ucb;
@@ -4128,7 +4128,7 @@ static int dib8000_get_stats(struct dvb_frontend *fe, fe_status_t stat)
time_us = dib8000_get_time_us(fe, -1);
if (time_us) {
- blocks = 1250000UL * 1000000UL;
+ blocks = 1250000ULL * 1000000ULL;
do_div(blocks, time_us * 8 * 204);
c->block_count.stat[0].scale = FE_SCALE_COUNTER;
c->block_count.stat[0].uvalue += blocks;
@@ -4191,7 +4191,7 @@ static int dib8000_get_stats(struct dvb_frontend *fe, fe_status_t stat)
if (!time_us)
time_us = dib8000_get_time_us(fe, i);
if (time_us) {
- blocks = 1250000UL * 1000000UL;
+ blocks = 1250000ULL * 1000000ULL;
do_div(blocks, time_us * 8 * 204);
c->block_count.stat[0].scale = FE_SCALE_COUNTER;
c->block_count.stat[0].uvalue += blocks;
OpenPOWER on IntegriCloud