]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/rtc/rtc-lib.c
softlockup: print a module list on being stuck
[linux-2.6-omap-h63xx.git] / drivers / rtc / rtc-lib.c
index 9812120f3a7c825c783a7c15635279740ced383d..9f996ec881ce90dbf2a97cef5ecb73e090d634c7 100644 (file)
@@ -51,7 +51,7 @@ EXPORT_SYMBOL(rtc_year_days);
  */
 void rtc_time_to_tm(unsigned long time, struct rtc_time *tm)
 {
-       register int days, month, year;
+       unsigned int days, month, year;
 
        days = time / 86400;
        time -= days * 86400;
@@ -94,12 +94,12 @@ EXPORT_SYMBOL(rtc_time_to_tm);
 int rtc_valid_tm(struct rtc_time *tm)
 {
        if (tm->tm_year < 70
-               || tm->tm_mon >= 12
+               || ((unsigned)tm->tm_mon) >= 12
                || tm->tm_mday < 1
                || tm->tm_mday > rtc_month_days(tm->tm_mon, tm->tm_year + 1900)
-               || tm->tm_hour >= 24
-               || tm->tm_min >= 60
-               || tm->tm_sec >= 60)
+               || ((unsigned)tm->tm_hour) >= 24
+               || ((unsigned)tm->tm_min) >= 60
+               || ((unsigned)tm->tm_sec) >= 60)
                return -EINVAL;
 
        return 0;