From: Torben Hohn Date: Thu, 7 Feb 2013 01:27:49 +0000 (+1100) Subject: rtc rx4581: change err type from unsigned char to int in get_datetime() X-Git-Tag: next-20130218~1^2~196 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=5cb9e145857e34c2cc3db5630ce43819a7a1da36;p=karo-tx-linux.git 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 --- 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