Skip to contentSkip to conversation

hp_sdc_rtc: Fix test in hp_sdc_rtc_read_rt()

PATCH Applied Roel Kluin 2 participants 2 messages Oct 16, 2009 – Oct 18, 2009

Subsystems (3)
lore
Share & tools
lore

Roel Kluin

author
#0 lore raw

PATCH 1/1 hp_sdc_rtc: Fix test in hp_sdc_rtc_read_rt()

If left unsigned the hp_sdc_rtc_read_i8042timer() return value will not be checked correctly.

---

drivers/input/misc/hp_sdc_rtc.c +1 -1
index 216a559..ea821b5 100644
@@ -209,7 +209,7 @@ static inline int hp_sdc_rtc_read_rt(struct timeval *res) {
 
 /* Read the i8042 fast handshake timer */
 static inline int hp_sdc_rtc_read_fhs(struct timeval *res) {
-	uint64_t raw;
+	int64_t raw;
 	unsigned int tenms;
 
 	raw = hp_sdc_rtc_read_i8042timer(HP_SDC_CMD_LOAD_FHS, 2);
maintainer Applied
#1 lore raw
Quoted 3 lines · Roel Kluin

If left unsigned the hp_sdc_rtc_read_i8042timer() return value will not be checked correctly.

Applied, thank you Roel.

Quoted 15 lines

---

drivers/input/misc/hp_sdc_rtc.c +1 -1
index 216a559..ea821b5 100644
@@ -209,7 +209,7 @@ static inline int hp_sdc_rtc_read_rt(struct timeval *res) {
 
 /* Read the i8042 fast handshake timer */
 static inline int hp_sdc_rtc_read_fhs(struct timeval *res) {
-	uint64_t raw;
+	int64_t raw;
 	unsigned int tenms;
 
 	raw = hp_sdc_rtc_read_i8042timer(HP_SDC_CMD_LOAD_FHS, 2);
Signature · 1 line
Dmitry