Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ipmi_si: Convert timespec64 to timespec

There is no need for timespec64, and it will cause issues in the
future with i386 and 64-bit division not being available.

Signed-off-by: Corey Minyard <cminyard@mvista.com>

+16 -16
+16 -16
drivers/char/ipmi/ipmi_si_intf.c
··· 261 261 #ifdef DEBUG_TIMING 262 262 void debug_timestamp(char *msg) 263 263 { 264 - struct timespec64 t; 264 + struct timespec t; 265 265 266 - ktime_get_ts64(&t); 267 - pr_debug("**%s: %lld.%9.9ld\n", msg, (long long) t.tv_sec, t.tv_nsec); 266 + ktime_get_ts(&t); 267 + pr_debug("**%s: %ld.%9.9ld\n", msg, (long) t.tv_sec, t.tv_nsec); 268 268 } 269 269 #else 270 270 #define debug_timestamp(x) ··· 935 935 * we are spinning in kipmid looking for something and not delaying 936 936 * between checks 937 937 */ 938 - static inline void ipmi_si_set_not_busy(struct timespec64 *ts) 938 + static inline void ipmi_si_set_not_busy(struct timespec *ts) 939 939 { 940 940 ts->tv_nsec = -1; 941 941 } 942 - static inline int ipmi_si_is_busy(struct timespec64 *ts) 942 + static inline int ipmi_si_is_busy(struct timespec *ts) 943 943 { 944 944 return ts->tv_nsec != -1; 945 945 } 946 946 947 - static inline int ipmi_thread_busy_wait(enum si_sm_result smi_result, 948 - const struct smi_info *smi_info, 949 - struct timespec64 *busy_until) 947 + static inline bool ipmi_thread_busy_wait(enum si_sm_result smi_result, 948 + const struct smi_info *smi_info, 949 + struct timespec *busy_until) 950 950 { 951 951 unsigned int max_busy_us = 0; 952 952 ··· 955 955 if (max_busy_us == 0 || smi_result != SI_SM_CALL_WITH_DELAY) 956 956 ipmi_si_set_not_busy(busy_until); 957 957 else if (!ipmi_si_is_busy(busy_until)) { 958 - ktime_get_ts64(busy_until); 959 - timespec64_add_ns(busy_until, max_busy_us*NSEC_PER_USEC); 958 + ktime_get_ts(busy_until); 959 + timespec_add_ns(busy_until, max_busy_us * NSEC_PER_USEC); 960 960 } else { 961 - struct timespec64 now; 961 + struct timespec now; 962 962 963 - ktime_get_ts64(&now); 964 - if (unlikely(timespec64_compare(&now, busy_until) > 0)) { 963 + ktime_get_ts(&now); 964 + if (unlikely(timespec_compare(&now, busy_until) > 0)) { 965 965 ipmi_si_set_not_busy(busy_until); 966 - return 0; 966 + return false; 967 967 } 968 968 } 969 - return 1; 969 + return true; 970 970 } 971 971 972 972 ··· 984 984 struct smi_info *smi_info = data; 985 985 unsigned long flags; 986 986 enum si_sm_result smi_result; 987 - struct timespec64 busy_until; 987 + struct timespec busy_until = { 0, 0 }; 988 988 989 989 ipmi_si_set_not_busy(&busy_until); 990 990 set_user_nice(current, MAX_NICE);