aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char
diff options
context:
space:
mode:
authorCorey Minyard <cminyard@mvista.com>2019-07-31 15:33:36 -0500
committerCorey Minyard <cminyard@mvista.com>2019-07-31 19:52:29 -0500
commitcbb19cb1eef050b193c823502bf920097c0f0459 (patch)
treec243e98d34c80b0adf1d8c0da5c9bb736c797239 /drivers/char
parentMerge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs (diff)
downloadlinux-dev-cbb19cb1eef050b193c823502bf920097c0f0459.tar.xz
linux-dev-cbb19cb1eef050b193c823502bf920097c0f0459.zip
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>
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/ipmi/ipmi_si_intf.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c
index da5b6723329a..488979cc2579 100644
--- a/drivers/char/ipmi/ipmi_si_intf.c
+++ b/drivers/char/ipmi/ipmi_si_intf.c
@@ -261,10 +261,10 @@ static void cleanup_ipmi_si(void);
#ifdef DEBUG_TIMING
void debug_timestamp(char *msg)
{
- struct timespec64 t;
+ struct timespec t;
- ktime_get_ts64(&t);
- pr_debug("**%s: %lld.%9.9ld\n", msg, (long long) t.tv_sec, t.tv_nsec);
+ ktime_get_ts(&t);
+ pr_debug("**%s: %ld.%9.9ld\n", msg, (long) t.tv_sec, t.tv_nsec);
}
#else
#define debug_timestamp(x)
@@ -935,18 +935,18 @@ static void set_run_to_completion(void *send_info, bool i_run_to_completion)
* we are spinning in kipmid looking for something and not delaying
* between checks
*/
-static inline void ipmi_si_set_not_busy(struct timespec64 *ts)
+static inline void ipmi_si_set_not_busy(struct timespec *ts)
{
ts->tv_nsec = -1;
}
-static inline int ipmi_si_is_busy(struct timespec64 *ts)
+static inline int ipmi_si_is_busy(struct timespec *ts)
{
return ts->tv_nsec != -1;
}
-static inline int ipmi_thread_busy_wait(enum si_sm_result smi_result,
- const struct smi_info *smi_info,
- struct timespec64 *busy_until)
+static inline bool ipmi_thread_busy_wait(enum si_sm_result smi_result,
+ const struct smi_info *smi_info,
+ struct timespec *busy_until)
{
unsigned int max_busy_us = 0;
@@ -955,18 +955,18 @@ static inline int ipmi_thread_busy_wait(enum si_sm_result smi_result,
if (max_busy_us == 0 || smi_result != SI_SM_CALL_WITH_DELAY)
ipmi_si_set_not_busy(busy_until);
else if (!ipmi_si_is_busy(busy_until)) {
- ktime_get_ts64(busy_until);
- timespec64_add_ns(busy_until, max_busy_us*NSEC_PER_USEC);
+ ktime_get_ts(busy_until);
+ timespec_add_ns(busy_until, max_busy_us * NSEC_PER_USEC);
} else {
- struct timespec64 now;
+ struct timespec now;
- ktime_get_ts64(&now);
- if (unlikely(timespec64_compare(&now, busy_until) > 0)) {
+ ktime_get_ts(&now);
+ if (unlikely(timespec_compare(&now, busy_until) > 0)) {
ipmi_si_set_not_busy(busy_until);
- return 0;
+ return false;
}
}
- return 1;
+ return true;
}
@@ -984,7 +984,7 @@ static int ipmi_thread(void *data)
struct smi_info *smi_info = data;
unsigned long flags;
enum si_sm_result smi_result;
- struct timespec64 busy_until;
+ struct timespec busy_until = { 0, 0 };
ipmi_si_set_not_busy(&busy_until);
set_user_nice(current, MAX_NICE);