* [PATCH] hp_sdc_rtc: Fix test in hp_sdc_rtc_read_rt()
@ 2009-10-16 16:12 Roel Kluin
2009-10-18 7:19 ` Dmitry Torokhov
0 siblings, 1 reply; 2+ messages in thread
From: Roel Kluin @ 2009-10-16 16:12 UTC (permalink / raw)
To: Dmitry Torokhov, Dmitry Torokhov, linux-input, Andrew Morton
If left unsigned the hp_sdc_rtc_read_i8042timer() return value will not
be checked correctly.
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
diff --git a/drivers/input/misc/hp_sdc_rtc.c b/drivers/input/misc/hp_sdc_rtc.c
index 216a559..ea821b5 100644
--- a/drivers/input/misc/hp_sdc_rtc.c
+++ b/drivers/input/misc/hp_sdc_rtc.c
@@ -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);
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] hp_sdc_rtc: Fix test in hp_sdc_rtc_read_rt()
2009-10-16 16:12 [PATCH] hp_sdc_rtc: Fix test in hp_sdc_rtc_read_rt() Roel Kluin
@ 2009-10-18 7:19 ` Dmitry Torokhov
0 siblings, 0 replies; 2+ messages in thread
From: Dmitry Torokhov @ 2009-10-18 7:19 UTC (permalink / raw)
To: Roel Kluin; +Cc: linux-input, Andrew Morton
On Fri, Oct 16, 2009 at 06:12:39PM +0200, Roel Kluin wrote:
> If left unsigned the hp_sdc_rtc_read_i8042timer() return value will not
> be checked correctly.
>
Applied, thank you Roel.
> Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
> ---
> diff --git a/drivers/input/misc/hp_sdc_rtc.c b/drivers/input/misc/hp_sdc_rtc.c
> index 216a559..ea821b5 100644
> --- a/drivers/input/misc/hp_sdc_rtc.c
> +++ b/drivers/input/misc/hp_sdc_rtc.c
> @@ -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);
--
Dmitry
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-10-18 7:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-16 16:12 [PATCH] hp_sdc_rtc: Fix test in hp_sdc_rtc_read_rt() Roel Kluin
2009-10-18 7:19 ` Dmitry Torokhov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).