All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 09/18] stv0367: Fix potential divide error
@ 2010-12-31 11:37 Igor M. Liplianin
  0 siblings, 0 replies; 2+ messages in thread
From: Igor M. Liplianin @ 2010-12-31 11:37 UTC (permalink / raw)
  To: mchehab, linux-media, linux-kernel

Signed-off-by: Igor M. Liplianin <liplianin@netup.ru>
---
 drivers/media/dvb/frontends/stv0367.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/media/dvb/frontends/stv0367.c b/drivers/media/dvb/frontends/stv0367.c
index 0575741..e6bee7f 100644
--- a/drivers/media/dvb/frontends/stv0367.c
+++ b/drivers/media/dvb/frontends/stv0367.c
@@ -3275,12 +3275,14 @@ static int stv0367cab_read_snr(struct dvb_frontend *fe, u16 *snr)
 		power = 1;
 		break;
 	}
+
 	for (i = 0; i < 10; i++) {
 		regval += (stv0367_readbits(state, F367CAB_SNR_LO)
 			+ 256 * stv0367_readbits(state, F367CAB_SNR_HI));
 	}
+
+	regval /= 10; /*for average over 10 times in for loop above*/
 	if (regval != 0) {
-		regval /= 10; /*for average over 10 times in for loop above*/
 		temp = power
 			* (1 << (3 + stv0367_readbits(state, F367CAB_SNR_PER)));
 		temp /= regval;
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH 09/18] stv0367: Fix potential divide error
@ 2010-08-27 10:43 Igor M. Liplianin
  0 siblings, 0 replies; 2+ messages in thread
From: Igor M. Liplianin @ 2010-08-27 10:43 UTC (permalink / raw)
  To: mchehab, linux-media, linux-kernel, aospan

Signed-off-by: Igor M. Liplianin <liplianin@netup.ru>
---
 drivers/media/dvb/frontends/stv0367.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/media/dvb/frontends/stv0367.c b/drivers/media/dvb/frontends/stv0367.c
index 0575741..e6bee7f 100644
--- a/drivers/media/dvb/frontends/stv0367.c
+++ b/drivers/media/dvb/frontends/stv0367.c
@@ -3275,12 +3275,14 @@ static int stv0367cab_read_snr(struct dvb_frontend *fe, u16 *snr)
 		power = 1;
 		break;
 	}
+
 	for (i = 0; i < 10; i++) {
 		regval += (stv0367_readbits(state, F367CAB_SNR_LO)
 			+ 256 * stv0367_readbits(state, F367CAB_SNR_HI));
 	}
+
+	regval /= 10; /*for average over 10 times in for loop above*/
 	if (regval != 0) {
-		regval /= 10; /*for average over 10 times in for loop above*/
 		temp = power
 			* (1 << (3 + stv0367_readbits(state, F367CAB_SNR_PER)));
 		temp /= regval;
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-01-01  9:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-31 11:37 [PATCH 09/18] stv0367: Fix potential divide error Igor M. Liplianin
  -- strict thread matches above, loose matches on Subject: below --
2010-08-27 10:43 Igor M. Liplianin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.