From 2a06ab98ea29c1b7c4a227d23e70c8bf3383b4e2 Mon Sep 17 00:00:00 2001 From: Torben Hohn Date: Wed, 20 Feb 2013 13:15:46 +1100 Subject: [PATCH] rtc rx4581: change err type from unsigned char to int in get_datetime() in response to these warnings posted by dan.carpenter@oracle.com: New smatch warnings: drivers/rtc/rtc-rx4581.c:134 rx4581_get_datetime() warn: unsigned 'err' is never less than zero. Old smatch warnings: drivers/rtc/rtc-rx4581.c:175 rx4581_get_datetime() warn: unsigned 'err' is never less than zero. Signed-off-by: Torben Hohn Reported-by: Dan Carpenter Signed-off-by: Andrew Morton --- drivers/rtc/rtc-rx4581.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/rtc/rtc-rx4581.c b/drivers/rtc/rtc-rx4581.c index 421e08baa17d..599ec73ec886 100644 --- a/drivers/rtc/rtc-rx4581.c +++ b/drivers/rtc/rtc-rx4581.c @@ -103,7 +103,8 @@ static int rx4581_get_datetime(struct device *dev, struct rtc_time *tm) { struct spi_device *spi = to_spi_device(dev); unsigned char date[7]; - unsigned char data, err; + unsigned char data; + int err; /* First we ensure that the "update flag" is not set, we read the * time and date then re-read the "update flag". If the update flag -- 2.39.5