All of lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-wired-lan] [PATCH 1/3] e1000e: e1000e_cyclecounter_read(): incvalue is 32 bits, not 64
@ 2016-04-20 15:45 Denys Vlasenko
  2016-04-20 15:45 ` [Intel-wired-lan] [PATCH 2/3] e1000e: e1000e_cyclecounter_read(): fix er32(SYSTIML) overflow check Denys Vlasenko
                   ` (3 more replies)
  0 siblings, 4 replies; 12+ messages in thread
From: Denys Vlasenko @ 2016-04-20 15:45 UTC (permalink / raw)
  To: intel-wired-lan

"incvalue" variable holds a result of "er32(TIMINCA) & E1000_TIMINCA_INCVALUE_MASK"
and used in "do_div(temp, incvalue)" as a divisor.

Thus, "u64 incvalue" declaration is probably a mistake.
Even though it seems to be a harmless one, let's fix it.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
CC: intel-wired-lan at lists.osuosl.org
---
 drivers/net/ethernet/intel/e1000e/netdev.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c
index 9b4ec13..967311b 100644
--- a/drivers/net/ethernet/intel/e1000e/netdev.c
+++ b/drivers/net/ethernet/intel/e1000e/netdev.c
@@ -4300,7 +4300,8 @@ static cycle_t e1000e_cyclecounter_read(const struct cyclecounter *cc)
 	}
 
 	if ((hw->mac.type == e1000_82574) || (hw->mac.type == e1000_82583)) {
-		u64 incvalue, time_delta, rem, temp;
+		u64 time_delta, rem, temp;
+		u32 incvalue;
 		int i;
 
 		/* errata for 82574/82583 possible bad bits read from SYSTIMH/L
-- 
1.8.1.4


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

end of thread, other threads:[~2016-04-26 19:40 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-20 15:45 [Intel-wired-lan] [PATCH 1/3] e1000e: e1000e_cyclecounter_read(): incvalue is 32 bits, not 64 Denys Vlasenko
2016-04-20 15:45 ` [Intel-wired-lan] [PATCH 2/3] e1000e: e1000e_cyclecounter_read(): fix er32(SYSTIML) overflow check Denys Vlasenko
2016-04-21 14:43   ` Ruinskiy, Dima
2016-04-25 23:08   ` Brown, Aaron F
2016-04-20 15:45 ` [Intel-wired-lan] [PATCH 3/3] e1000e: e1000e_cyclecounter_read(): do overflow check only if needed Denys Vlasenko
2016-04-21 14:49   ` Ruinskiy, Dima
2016-04-21 17:23     ` Denys Vlasenko
2016-04-25 23:12   ` Brown, Aaron F
2016-04-26 16:03     ` Denys Vlasenko
2016-04-26 19:40       ` Brown, Aaron F
2016-04-21 14:41 ` [Intel-wired-lan] [PATCH 1/3] e1000e: e1000e_cyclecounter_read(): incvalue is 32 bits, not 64 Ruinskiy, Dima
2016-04-25 23:04 ` Brown, Aaron F

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.