diff options
author | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-01-13 12:05:44 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-01-13 13:28:12 -0500 |
commit | 5dc8526b90979c2cacdf32d1ea3b82de7744bd71 (patch) | |
tree | 2f47ceb0a1245caeebcb352471bfd2f4218f1641 | |
parent | 6fcd3b619c06544b5d33493d0ab297a5b8e64b68 (diff) |
[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>
-rw-r--r-- | drivers/media/dvb-frontends/dib8000.c | 6 |
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) | |||
4118 | /* Get UCB measures */ | 4118 | /* Get UCB measures */ |
4119 | dib8000_read_unc_blocks(fe, &val); | 4119 | dib8000_read_unc_blocks(fe, &val); |
4120 | if (val < state->init_ucb) | 4120 | if (val < state->init_ucb) |
4121 | state->init_ucb += 0x100000000L; | 4121 | state->init_ucb += 0x100000000LL; |
4122 | 4122 | ||
4123 | c->block_error.stat[0].scale = FE_SCALE_COUNTER; | 4123 | c->block_error.stat[0].scale = FE_SCALE_COUNTER; |
4124 | c->block_error.stat[0].uvalue = val + state->init_ucb; | 4124 | 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) | |||
4128 | time_us = dib8000_get_time_us(fe, -1); | 4128 | time_us = dib8000_get_time_us(fe, -1); |
4129 | 4129 | ||
4130 | if (time_us) { | 4130 | if (time_us) { |
4131 | blocks = 1250000UL * 1000000UL; | 4131 | blocks = 1250000ULL * 1000000ULL; |
4132 | do_div(blocks, time_us * 8 * 204); | 4132 | do_div(blocks, time_us * 8 * 204); |
4133 | c->block_count.stat[0].scale = FE_SCALE_COUNTER; | 4133 | c->block_count.stat[0].scale = FE_SCALE_COUNTER; |
4134 | c->block_count.stat[0].uvalue += blocks; | 4134 | c->block_count.stat[0].uvalue += blocks; |
@@ -4191,7 +4191,7 @@ static int dib8000_get_stats(struct dvb_frontend *fe, fe_status_t stat) | |||
4191 | if (!time_us) | 4191 | if (!time_us) |
4192 | time_us = dib8000_get_time_us(fe, i); | 4192 | time_us = dib8000_get_time_us(fe, i); |
4193 | if (time_us) { | 4193 | if (time_us) { |
4194 | blocks = 1250000UL * 1000000UL; | 4194 | blocks = 1250000ULL * 1000000ULL; |
4195 | do_div(blocks, time_us * 8 * 204); | 4195 | do_div(blocks, time_us * 8 * 204); |
4196 | c->block_count.stat[0].scale = FE_SCALE_COUNTER; | 4196 | c->block_count.stat[0].scale = FE_SCALE_COUNTER; |
4197 | c->block_count.stat[0].uvalue += blocks; | 4197 | c->block_count.stat[0].uvalue += blocks; |