diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2016-12-25 06:30:41 -0500 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2016-12-25 11:21:22 -0500 |
commit | 8b0e195314fabd58a331c4f7b6db75a1565535d7 (patch) | |
tree | 6ff9d2d9388406b8447b09b6a4037795142172de | |
parent | 2456e855354415bfaeb7badaa14e11b3e02c8466 (diff) |
ktime: Cleanup ktime_set() usage
ktime_set(S,N) was required for the timespec storage type and is still
useful for situations where a Seconds and Nanoseconds part of a time value
needs to be converted. For anything where the Seconds argument is 0, this
is pointless and can be replaced with a simple assignment.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
56 files changed, 84 insertions, 95 deletions
diff --git a/arch/powerpc/kvm/book3s_hv.c b/arch/powerpc/kvm/book3s_hv.c index 66b2a35be424..ec34e39471a7 100644 --- a/arch/powerpc/kvm/book3s_hv.c +++ b/arch/powerpc/kvm/book3s_hv.c | |||
@@ -1872,8 +1872,7 @@ static void kvmppc_set_timer(struct kvm_vcpu *vcpu) | |||
1872 | } | 1872 | } |
1873 | dec_nsec = (vcpu->arch.dec_expires - now) * NSEC_PER_SEC | 1873 | dec_nsec = (vcpu->arch.dec_expires - now) * NSEC_PER_SEC |
1874 | / tb_ticks_per_sec; | 1874 | / tb_ticks_per_sec; |
1875 | hrtimer_start(&vcpu->arch.dec_timer, ktime_set(0, dec_nsec), | 1875 | hrtimer_start(&vcpu->arch.dec_timer, dec_nsec, HRTIMER_MODE_REL); |
1876 | HRTIMER_MODE_REL); | ||
1877 | vcpu->arch.timer_running = 1; | 1876 | vcpu->arch.timer_running = 1; |
1878 | } | 1877 | } |
1879 | 1878 | ||
diff --git a/arch/powerpc/oprofile/cell/spu_profiler.c b/arch/powerpc/oprofile/cell/spu_profiler.c index b19265de9178..5182f2936af2 100644 --- a/arch/powerpc/oprofile/cell/spu_profiler.c +++ b/arch/powerpc/oprofile/cell/spu_profiler.c | |||
@@ -180,7 +180,7 @@ static enum hrtimer_restart profile_spus(struct hrtimer *timer) | |||
180 | smp_wmb(); /* insure spu event buffer updates are written */ | 180 | smp_wmb(); /* insure spu event buffer updates are written */ |
181 | /* don't want events intermingled... */ | 181 | /* don't want events intermingled... */ |
182 | 182 | ||
183 | kt = ktime_set(0, profiling_interval); | 183 | kt = profiling_interval; |
184 | if (!spu_prof_running) | 184 | if (!spu_prof_running) |
185 | goto stop; | 185 | goto stop; |
186 | hrtimer_forward(timer, timer->base->get_time(), kt); | 186 | hrtimer_forward(timer, timer->base->get_time(), kt); |
@@ -204,7 +204,7 @@ int start_spu_profiling_cycles(unsigned int cycles_reset) | |||
204 | ktime_t kt; | 204 | ktime_t kt; |
205 | 205 | ||
206 | pr_debug("timer resolution: %lu\n", TICK_NSEC); | 206 | pr_debug("timer resolution: %lu\n", TICK_NSEC); |
207 | kt = ktime_set(0, profiling_interval); | 207 | kt = profiling_interval; |
208 | hrtimer_init(&timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); | 208 | hrtimer_init(&timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); |
209 | hrtimer_set_expires(&timer, kt); | 209 | hrtimer_set_expires(&timer, kt); |
210 | timer.function = profile_spus; | 210 | timer.function = profile_spus; |
diff --git a/arch/s390/kvm/interrupt.c b/arch/s390/kvm/interrupt.c index 6843dd5a1cba..0f8f14199734 100644 --- a/arch/s390/kvm/interrupt.c +++ b/arch/s390/kvm/interrupt.c | |||
@@ -1019,7 +1019,7 @@ int kvm_s390_handle_wait(struct kvm_vcpu *vcpu) | |||
1019 | return 0; | 1019 | return 0; |
1020 | 1020 | ||
1021 | __set_cpu_idle(vcpu); | 1021 | __set_cpu_idle(vcpu); |
1022 | hrtimer_start(&vcpu->arch.ckc_timer, ktime_set (0, sltime) , HRTIMER_MODE_REL); | 1022 | hrtimer_start(&vcpu->arch.ckc_timer, sltime, HRTIMER_MODE_REL); |
1023 | VCPU_EVENT(vcpu, 4, "enabled wait: %llu ns", sltime); | 1023 | VCPU_EVENT(vcpu, 4, "enabled wait: %llu ns", sltime); |
1024 | no_timer: | 1024 | no_timer: |
1025 | srcu_read_unlock(&vcpu->kvm->srcu, vcpu->srcu_idx); | 1025 | srcu_read_unlock(&vcpu->kvm->srcu, vcpu->srcu_idx); |
diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c index 34a66b2d47e6..5fe290c1b7d8 100644 --- a/arch/x86/kvm/lapic.c +++ b/arch/x86/kvm/lapic.c | |||
@@ -1106,7 +1106,7 @@ static u32 apic_get_tmcct(struct kvm_lapic *apic) | |||
1106 | now = ktime_get(); | 1106 | now = ktime_get(); |
1107 | remaining = ktime_sub(apic->lapic_timer.target_expiration, now); | 1107 | remaining = ktime_sub(apic->lapic_timer.target_expiration, now); |
1108 | if (ktime_to_ns(remaining) < 0) | 1108 | if (ktime_to_ns(remaining) < 0) |
1109 | remaining = ktime_set(0, 0); | 1109 | remaining = 0; |
1110 | 1110 | ||
1111 | ns = mod_64(ktime_to_ns(remaining), apic->lapic_timer.period); | 1111 | ns = mod_64(ktime_to_ns(remaining), apic->lapic_timer.period); |
1112 | tmcct = div64_u64(ns, | 1112 | tmcct = div64_u64(ns, |
@@ -2057,7 +2057,7 @@ void kvm_inject_apic_timer_irqs(struct kvm_vcpu *vcpu) | |||
2057 | apic->lapic_timer.tscdeadline = 0; | 2057 | apic->lapic_timer.tscdeadline = 0; |
2058 | if (apic_lvtt_oneshot(apic)) { | 2058 | if (apic_lvtt_oneshot(apic)) { |
2059 | apic->lapic_timer.tscdeadline = 0; | 2059 | apic->lapic_timer.tscdeadline = 0; |
2060 | apic->lapic_timer.target_expiration = ktime_set(0, 0); | 2060 | apic->lapic_timer.target_expiration = 0; |
2061 | } | 2061 | } |
2062 | atomic_set(&apic->lapic_timer.pending, 0); | 2062 | atomic_set(&apic->lapic_timer.pending, 0); |
2063 | } | 2063 | } |
diff --git a/block/blk-mq.c b/block/blk-mq.c index 4bf850e8d6b5..a8e67a155d04 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c | |||
@@ -2569,7 +2569,7 @@ static bool blk_mq_poll_hybrid_sleep(struct request_queue *q, | |||
2569 | * This will be replaced with the stats tracking code, using | 2569 | * This will be replaced with the stats tracking code, using |
2570 | * 'avg_completion_time / 2' as the pre-sleep target. | 2570 | * 'avg_completion_time / 2' as the pre-sleep target. |
2571 | */ | 2571 | */ |
2572 | kt = ktime_set(0, nsecs); | 2572 | kt = nsecs; |
2573 | 2573 | ||
2574 | mode = HRTIMER_MODE_REL; | 2574 | mode = HRTIMER_MODE_REL; |
2575 | hrtimer_init_on_stack(&hs.timer, CLOCK_MONOTONIC, mode); | 2575 | hrtimer_init_on_stack(&hs.timer, CLOCK_MONOTONIC, mode); |
diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c index 48c6294e9c34..249e0304597f 100644 --- a/drivers/base/power/main.c +++ b/drivers/base/power/main.c | |||
@@ -194,7 +194,7 @@ void device_pm_move_last(struct device *dev) | |||
194 | 194 | ||
195 | static ktime_t initcall_debug_start(struct device *dev) | 195 | static ktime_t initcall_debug_start(struct device *dev) |
196 | { | 196 | { |
197 | ktime_t calltime = ktime_set(0, 0); | 197 | ktime_t calltime = 0; |
198 | 198 | ||
199 | if (pm_print_times_enabled) { | 199 | if (pm_print_times_enabled) { |
200 | pr_info("calling %s+ @ %i, parent: %s\n", | 200 | pr_info("calling %s+ @ %i, parent: %s\n", |
diff --git a/drivers/base/power/wakeup.c b/drivers/base/power/wakeup.c index 94332902a1cf..f546f8f107b0 100644 --- a/drivers/base/power/wakeup.c +++ b/drivers/base/power/wakeup.c | |||
@@ -1005,7 +1005,7 @@ static int print_wakeup_source_stats(struct seq_file *m, | |||
1005 | prevent_sleep_time = ktime_add(prevent_sleep_time, | 1005 | prevent_sleep_time = ktime_add(prevent_sleep_time, |
1006 | ktime_sub(now, ws->start_prevent_time)); | 1006 | ktime_sub(now, ws->start_prevent_time)); |
1007 | } else { | 1007 | } else { |
1008 | active_time = ktime_set(0, 0); | 1008 | active_time = 0; |
1009 | } | 1009 | } |
1010 | 1010 | ||
1011 | seq_printf(m, "%-12s\t%lu\t\t%lu\t\t%lu\t\t%lu\t\t%lld\t\t%lld\t\t%lld\t\t%lld\t\t%lld\n", | 1011 | seq_printf(m, "%-12s\t%lu\t\t%lu\t\t%lu\t\t%lu\t\t%lld\t\t%lld\t\t%lld\t\t%lld\t\t%lld\n", |
diff --git a/drivers/block/null_blk.c b/drivers/block/null_blk.c index 4943ee22716e..c0e14e54909b 100644 --- a/drivers/block/null_blk.c +++ b/drivers/block/null_blk.c | |||
@@ -257,7 +257,7 @@ static enum hrtimer_restart null_cmd_timer_expired(struct hrtimer *timer) | |||
257 | 257 | ||
258 | static void null_cmd_end_timer(struct nullb_cmd *cmd) | 258 | static void null_cmd_end_timer(struct nullb_cmd *cmd) |
259 | { | 259 | { |
260 | ktime_t kt = ktime_set(0, completion_nsec); | 260 | ktime_t kt = completion_nsec; |
261 | 261 | ||
262 | hrtimer_start(&cmd->timer, kt, HRTIMER_MODE_REL); | 262 | hrtimer_start(&cmd->timer, kt, HRTIMER_MODE_REL); |
263 | } | 263 | } |
diff --git a/drivers/dma/dmatest.c b/drivers/dma/dmatest.c index 451f899f74e4..c9297605058c 100644 --- a/drivers/dma/dmatest.c +++ b/drivers/dma/dmatest.c | |||
@@ -429,8 +429,8 @@ static int dmatest_func(void *data) | |||
429 | int dst_cnt; | 429 | int dst_cnt; |
430 | int i; | 430 | int i; |
431 | ktime_t ktime, start, diff; | 431 | ktime_t ktime, start, diff; |
432 | ktime_t filltime = ktime_set(0, 0); | 432 | ktime_t filltime = 0; |
433 | ktime_t comparetime = ktime_set(0, 0); | 433 | ktime_t comparetime = 0; |
434 | s64 runtime = 0; | 434 | s64 runtime = 0; |
435 | unsigned long long total_len = 0; | 435 | unsigned long long total_len = 0; |
436 | u8 align = 0; | 436 | u8 align = 0; |
diff --git a/drivers/gpu/drm/amd/amdgpu/dce_virtual.c b/drivers/gpu/drm/amd/amdgpu/dce_virtual.c index e4a5a5ac0ff3..762f8e82ceb7 100644 --- a/drivers/gpu/drm/amd/amdgpu/dce_virtual.c +++ b/drivers/gpu/drm/amd/amdgpu/dce_virtual.c | |||
@@ -752,7 +752,7 @@ static enum hrtimer_restart dce_virtual_vblank_timer_handle(struct hrtimer *vbla | |||
752 | 752 | ||
753 | drm_handle_vblank(ddev, amdgpu_crtc->crtc_id); | 753 | drm_handle_vblank(ddev, amdgpu_crtc->crtc_id); |
754 | dce_virtual_pageflip(adev, amdgpu_crtc->crtc_id); | 754 | dce_virtual_pageflip(adev, amdgpu_crtc->crtc_id); |
755 | hrtimer_start(vblank_timer, ktime_set(0, DCE_VIRTUAL_VBLANK_PERIOD), | 755 | hrtimer_start(vblank_timer, DCE_VIRTUAL_VBLANK_PERIOD, |
756 | HRTIMER_MODE_REL); | 756 | HRTIMER_MODE_REL); |
757 | 757 | ||
758 | return HRTIMER_NORESTART; | 758 | return HRTIMER_NORESTART; |
@@ -772,11 +772,11 @@ static void dce_virtual_set_crtc_vblank_interrupt_state(struct amdgpu_device *ad | |||
772 | hrtimer_init(&adev->mode_info.crtcs[crtc]->vblank_timer, | 772 | hrtimer_init(&adev->mode_info.crtcs[crtc]->vblank_timer, |
773 | CLOCK_MONOTONIC, HRTIMER_MODE_REL); | 773 | CLOCK_MONOTONIC, HRTIMER_MODE_REL); |
774 | hrtimer_set_expires(&adev->mode_info.crtcs[crtc]->vblank_timer, | 774 | hrtimer_set_expires(&adev->mode_info.crtcs[crtc]->vblank_timer, |
775 | ktime_set(0, DCE_VIRTUAL_VBLANK_PERIOD)); | 775 | DCE_VIRTUAL_VBLANK_PERIOD); |
776 | adev->mode_info.crtcs[crtc]->vblank_timer.function = | 776 | adev->mode_info.crtcs[crtc]->vblank_timer.function = |
777 | dce_virtual_vblank_timer_handle; | 777 | dce_virtual_vblank_timer_handle; |
778 | hrtimer_start(&adev->mode_info.crtcs[crtc]->vblank_timer, | 778 | hrtimer_start(&adev->mode_info.crtcs[crtc]->vblank_timer, |
779 | ktime_set(0, DCE_VIRTUAL_VBLANK_PERIOD), HRTIMER_MODE_REL); | 779 | DCE_VIRTUAL_VBLANK_PERIOD, HRTIMER_MODE_REL); |
780 | } else if (!state && adev->mode_info.crtcs[crtc]->vsync_timer_enabled) { | 780 | } else if (!state && adev->mode_info.crtcs[crtc]->vsync_timer_enabled) { |
781 | DRM_DEBUG("Disable software vsync timer\n"); | 781 | DRM_DEBUG("Disable software vsync timer\n"); |
782 | hrtimer_cancel(&adev->mode_info.crtcs[crtc]->vblank_timer); | 782 | hrtimer_cancel(&adev->mode_info.crtcs[crtc]->vblank_timer); |
diff --git a/drivers/gpu/drm/i915/intel_uncore.c b/drivers/gpu/drm/i915/intel_uncore.c index d7be0d94ba4d..0bffd3f0c15d 100644 --- a/drivers/gpu/drm/i915/intel_uncore.c +++ b/drivers/gpu/drm/i915/intel_uncore.c | |||
@@ -62,7 +62,7 @@ fw_domain_arm_timer(struct intel_uncore_forcewake_domain *d) | |||
62 | { | 62 | { |
63 | d->wake_count++; | 63 | d->wake_count++; |
64 | hrtimer_start_range_ns(&d->timer, | 64 | hrtimer_start_range_ns(&d->timer, |
65 | ktime_set(0, NSEC_PER_MSEC), | 65 | NSEC_PER_MSEC, |
66 | NSEC_PER_MSEC, | 66 | NSEC_PER_MSEC, |
67 | HRTIMER_MODE_REL); | 67 | HRTIMER_MODE_REL); |
68 | } | 68 | } |
diff --git a/drivers/gpu/drm/nouveau/nouveau_fence.c b/drivers/gpu/drm/nouveau/nouveau_fence.c index f2f348f0160c..a6126c93f215 100644 --- a/drivers/gpu/drm/nouveau/nouveau_fence.c +++ b/drivers/gpu/drm/nouveau/nouveau_fence.c | |||
@@ -330,7 +330,7 @@ nouveau_fence_wait_legacy(struct dma_fence *f, bool intr, long wait) | |||
330 | __set_current_state(intr ? TASK_INTERRUPTIBLE : | 330 | __set_current_state(intr ? TASK_INTERRUPTIBLE : |
331 | TASK_UNINTERRUPTIBLE); | 331 | TASK_UNINTERRUPTIBLE); |
332 | 332 | ||
333 | kt = ktime_set(0, sleep_time); | 333 | kt = sleep_time; |
334 | schedule_hrtimeout(&kt, HRTIMER_MODE_REL); | 334 | schedule_hrtimeout(&kt, HRTIMER_MODE_REL); |
335 | sleep_time *= 2; | 335 | sleep_time *= 2; |
336 | if (sleep_time > NSEC_PER_MSEC) | 336 | if (sleep_time > NSEC_PER_MSEC) |
diff --git a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c index 9942b0577d6e..725dffad5640 100644 --- a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c +++ b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c | |||
@@ -539,7 +539,7 @@ static void tilcdc_crtc_off(struct drm_crtc *crtc, bool shutdown) | |||
539 | } | 539 | } |
540 | 540 | ||
541 | drm_flip_work_commit(&tilcdc_crtc->unref_work, priv->wq); | 541 | drm_flip_work_commit(&tilcdc_crtc->unref_work, priv->wq); |
542 | tilcdc_crtc->last_vblank = ktime_set(0, 0); | 542 | tilcdc_crtc->last_vblank = 0; |
543 | 543 | ||
544 | tilcdc_crtc->enabled = false; | 544 | tilcdc_crtc->enabled = false; |
545 | mutex_unlock(&tilcdc_crtc->enable_lock); | 545 | mutex_unlock(&tilcdc_crtc->enable_lock); |
diff --git a/drivers/iio/trigger/iio-trig-hrtimer.c b/drivers/iio/trigger/iio-trig-hrtimer.c index 5e6d451febeb..a1cad6cc2e0f 100644 --- a/drivers/iio/trigger/iio-trig-hrtimer.c +++ b/drivers/iio/trigger/iio-trig-hrtimer.c | |||
@@ -63,7 +63,7 @@ ssize_t iio_hrtimer_store_sampling_frequency(struct device *dev, | |||
63 | return -EINVAL; | 63 | return -EINVAL; |
64 | 64 | ||
65 | info->sampling_frequency = val; | 65 | info->sampling_frequency = val; |
66 | info->period = ktime_set(0, NSEC_PER_SEC / val); | 66 | info->period = NSEC_PER_SEC / val; |
67 | 67 | ||
68 | return len; | 68 | return len; |
69 | } | 69 | } |
@@ -141,8 +141,7 @@ static struct iio_sw_trigger *iio_trig_hrtimer_probe(const char *name) | |||
141 | trig_info->timer.function = iio_hrtimer_trig_handler; | 141 | trig_info->timer.function = iio_hrtimer_trig_handler; |
142 | 142 | ||
143 | trig_info->sampling_frequency = HRTIMER_DEFAULT_SAMPLING_FREQUENCY; | 143 | trig_info->sampling_frequency = HRTIMER_DEFAULT_SAMPLING_FREQUENCY; |
144 | trig_info->period = ktime_set(0, NSEC_PER_SEC / | 144 | trig_info->period = NSEC_PER_SEC / trig_info->sampling_frequency; |
145 | trig_info->sampling_frequency); | ||
146 | 145 | ||
147 | ret = iio_trigger_register(trig_info->swt.trigger); | 146 | ret = iio_trigger_register(trig_info->swt.trigger); |
148 | if (ret) | 147 | if (ret) |
diff --git a/drivers/input/joystick/walkera0701.c b/drivers/input/joystick/walkera0701.c index 70a893a17467..36a5b93156ed 100644 --- a/drivers/input/joystick/walkera0701.c +++ b/drivers/input/joystick/walkera0701.c | |||
@@ -165,7 +165,7 @@ static void walkera0701_irq_handler(void *handler_data) | |||
165 | RESERVE + BIN1_PULSE - BIN0_PULSE) /* frame sync .. */ | 165 | RESERVE + BIN1_PULSE - BIN0_PULSE) /* frame sync .. */ |
166 | w->counter = 0; | 166 | w->counter = 0; |
167 | 167 | ||
168 | hrtimer_start(&w->timer, ktime_set(0, BIN_SAMPLE), HRTIMER_MODE_REL); | 168 | hrtimer_start(&w->timer, BIN_SAMPLE, HRTIMER_MODE_REL); |
169 | } | 169 | } |
170 | 170 | ||
171 | static enum hrtimer_restart timer_handler(struct hrtimer | 171 | static enum hrtimer_restart timer_handler(struct hrtimer |
diff --git a/drivers/mailbox/mailbox.c b/drivers/mailbox/mailbox.c index 4a36632c236f..4671f8a12872 100644 --- a/drivers/mailbox/mailbox.c +++ b/drivers/mailbox/mailbox.c | |||
@@ -87,8 +87,7 @@ exit: | |||
87 | 87 | ||
88 | if (!err && (chan->txdone_method & TXDONE_BY_POLL)) | 88 | if (!err && (chan->txdone_method & TXDONE_BY_POLL)) |
89 | /* kick start the timer immediately to avoid delays */ | 89 | /* kick start the timer immediately to avoid delays */ |
90 | hrtimer_start(&chan->mbox->poll_hrt, ktime_set(0, 0), | 90 | hrtimer_start(&chan->mbox->poll_hrt, 0, HRTIMER_MODE_REL); |
91 | HRTIMER_MODE_REL); | ||
92 | } | 91 | } |
93 | 92 | ||
94 | static void tx_tick(struct mbox_chan *chan, int r) | 93 | static void tx_tick(struct mbox_chan *chan, int r) |
diff --git a/drivers/media/dvb-core/dmxdev.c b/drivers/media/dvb-core/dmxdev.c index 0c44479b556e..0c16bb213101 100644 --- a/drivers/media/dvb-core/dmxdev.c +++ b/drivers/media/dvb-core/dmxdev.c | |||
@@ -562,7 +562,7 @@ static int dvb_dmxdev_start_feed(struct dmxdev *dmxdev, | |||
562 | struct dmxdev_filter *filter, | 562 | struct dmxdev_filter *filter, |
563 | struct dmxdev_feed *feed) | 563 | struct dmxdev_feed *feed) |
564 | { | 564 | { |
565 | ktime_t timeout = ktime_set(0, 0); | 565 | ktime_t timeout = 0; |
566 | struct dmx_pes_filter_params *para = &filter->params.pes; | 566 | struct dmx_pes_filter_params *para = &filter->params.pes; |
567 | dmx_output_t otype; | 567 | dmx_output_t otype; |
568 | int ret; | 568 | int ret; |
diff --git a/drivers/media/pci/cx88/cx88-input.c b/drivers/media/pci/cx88/cx88-input.c index dcfea3502e42..c7b3cb406499 100644 --- a/drivers/media/pci/cx88/cx88-input.c +++ b/drivers/media/pci/cx88/cx88-input.c | |||
@@ -178,8 +178,7 @@ static enum hrtimer_restart cx88_ir_work(struct hrtimer *timer) | |||
178 | struct cx88_IR *ir = container_of(timer, struct cx88_IR, timer); | 178 | struct cx88_IR *ir = container_of(timer, struct cx88_IR, timer); |
179 | 179 | ||
180 | cx88_ir_handle_key(ir); | 180 | cx88_ir_handle_key(ir); |
181 | missed = hrtimer_forward_now(&ir->timer, | 181 | missed = hrtimer_forward_now(&ir->timer, ir->polling * 1000000); |
182 | ktime_set(0, ir->polling * 1000000)); | ||
183 | if (missed > 1) | 182 | if (missed > 1) |
184 | ir_dprintk("Missed ticks %ld\n", missed - 1); | 183 | ir_dprintk("Missed ticks %ld\n", missed - 1); |
185 | 184 | ||
@@ -199,8 +198,7 @@ static int __cx88_ir_start(void *priv) | |||
199 | if (ir->polling) { | 198 | if (ir->polling) { |
200 | hrtimer_init(&ir->timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); | 199 | hrtimer_init(&ir->timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); |
201 | ir->timer.function = cx88_ir_work; | 200 | ir->timer.function = cx88_ir_work; |
202 | hrtimer_start(&ir->timer, | 201 | hrtimer_start(&ir->timer, ir->polling * 1000000, |
203 | ktime_set(0, ir->polling * 1000000), | ||
204 | HRTIMER_MODE_REL); | 202 | HRTIMER_MODE_REL); |
205 | } | 203 | } |
206 | if (ir->sampling) { | 204 | if (ir->sampling) { |
diff --git a/drivers/media/pci/pt3/pt3.c b/drivers/media/pci/pt3/pt3.c index 7fb649e523f4..77f4d15f322b 100644 --- a/drivers/media/pci/pt3/pt3.c +++ b/drivers/media/pci/pt3/pt3.c | |||
@@ -463,7 +463,7 @@ static int pt3_fetch_thread(void *data) | |||
463 | 463 | ||
464 | pt3_proc_dma(adap); | 464 | pt3_proc_dma(adap); |
465 | 465 | ||
466 | delay = ktime_set(0, PT3_FETCH_DELAY * NSEC_PER_MSEC); | 466 | delay = PT3_FETCH_DELAY * NSEC_PER_MSEC; |
467 | set_current_state(TASK_UNINTERRUPTIBLE); | 467 | set_current_state(TASK_UNINTERRUPTIBLE); |
468 | freezable_schedule_hrtimeout_range(&delay, | 468 | freezable_schedule_hrtimeout_range(&delay, |
469 | PT3_FETCH_DELAY_DELTA * NSEC_PER_MSEC, | 469 | PT3_FETCH_DELAY_DELTA * NSEC_PER_MSEC, |
diff --git a/drivers/net/can/softing/softing_fw.c b/drivers/net/can/softing/softing_fw.c index 52fe50725d74..4063215c9b54 100644 --- a/drivers/net/can/softing/softing_fw.c +++ b/drivers/net/can/softing/softing_fw.c | |||
@@ -390,7 +390,7 @@ static void softing_initialize_timestamp(struct softing *card) | |||
390 | ovf = 0x100000000ULL * 16; | 390 | ovf = 0x100000000ULL * 16; |
391 | do_div(ovf, card->pdat->freq ?: 16); | 391 | do_div(ovf, card->pdat->freq ?: 16); |
392 | 392 | ||
393 | card->ts_overflow = ktime_add_us(ktime_set(0, 0), ovf); | 393 | card->ts_overflow = ktime_add_us(0, ovf); |
394 | } | 394 | } |
395 | 395 | ||
396 | ktime_t softing_raw2ktime(struct softing *card, u32 raw) | 396 | ktime_t softing_raw2ktime(struct softing *card, u32 raw) |
@@ -647,7 +647,7 @@ int softing_startstop(struct net_device *dev, int up) | |||
647 | open_candev(netdev); | 647 | open_candev(netdev); |
648 | if (dev != netdev) { | 648 | if (dev != netdev) { |
649 | /* notify other busses on the restart */ | 649 | /* notify other busses on the restart */ |
650 | softing_netdev_rx(netdev, &msg, ktime_set(0, 0)); | 650 | softing_netdev_rx(netdev, &msg, 0); |
651 | ++priv->can.can_stats.restarts; | 651 | ++priv->can.can_stats.restarts; |
652 | } | 652 | } |
653 | netif_wake_queue(netdev); | 653 | netif_wake_queue(netdev); |
diff --git a/drivers/net/can/softing/softing_main.c b/drivers/net/can/softing/softing_main.c index 7621f91a8a20..5f64deec9f6c 100644 --- a/drivers/net/can/softing/softing_main.c +++ b/drivers/net/can/softing/softing_main.c | |||
@@ -192,7 +192,7 @@ static int softing_handle_1(struct softing *card) | |||
192 | /* a dead bus has no overflows */ | 192 | /* a dead bus has no overflows */ |
193 | continue; | 193 | continue; |
194 | ++netdev->stats.rx_over_errors; | 194 | ++netdev->stats.rx_over_errors; |
195 | softing_netdev_rx(netdev, &msg, ktime_set(0, 0)); | 195 | softing_netdev_rx(netdev, &msg, 0); |
196 | } | 196 | } |
197 | /* prepare for other use */ | 197 | /* prepare for other use */ |
198 | memset(&msg, 0, sizeof(msg)); | 198 | memset(&msg, 0, sizeof(msg)); |
diff --git a/drivers/net/ethernet/ec_bhf.c b/drivers/net/ethernet/ec_bhf.c index 57650953ff83..7bf78a0d322c 100644 --- a/drivers/net/ethernet/ec_bhf.c +++ b/drivers/net/ethernet/ec_bhf.c | |||
@@ -253,7 +253,7 @@ static enum hrtimer_restart ec_bhf_timer_fun(struct hrtimer *timer) | |||
253 | if (!netif_running(priv->net_dev)) | 253 | if (!netif_running(priv->net_dev)) |
254 | return HRTIMER_NORESTART; | 254 | return HRTIMER_NORESTART; |
255 | 255 | ||
256 | hrtimer_forward_now(timer, ktime_set(0, polling_frequency)); | 256 | hrtimer_forward_now(timer, polling_frequency); |
257 | return HRTIMER_RESTART; | 257 | return HRTIMER_RESTART; |
258 | } | 258 | } |
259 | 259 | ||
@@ -427,8 +427,7 @@ static int ec_bhf_open(struct net_device *net_dev) | |||
427 | 427 | ||
428 | hrtimer_init(&priv->hrtimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); | 428 | hrtimer_init(&priv->hrtimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); |
429 | priv->hrtimer.function = ec_bhf_timer_fun; | 429 | priv->hrtimer.function = ec_bhf_timer_fun; |
430 | hrtimer_start(&priv->hrtimer, ktime_set(0, polling_frequency), | 430 | hrtimer_start(&priv->hrtimer, polling_frequency, HRTIMER_MODE_REL); |
431 | HRTIMER_MODE_REL); | ||
432 | 431 | ||
433 | return 0; | 432 | return 0; |
434 | 433 | ||
diff --git a/drivers/net/ethernet/marvell/mvpp2.c b/drivers/net/ethernet/marvell/mvpp2.c index cda04b3126bc..4fe430ceb194 100644 --- a/drivers/net/ethernet/marvell/mvpp2.c +++ b/drivers/net/ethernet/marvell/mvpp2.c | |||
@@ -4913,7 +4913,7 @@ static void mvpp2_timer_set(struct mvpp2_port_pcpu *port_pcpu) | |||
4913 | 4913 | ||
4914 | if (!port_pcpu->timer_scheduled) { | 4914 | if (!port_pcpu->timer_scheduled) { |
4915 | port_pcpu->timer_scheduled = true; | 4915 | port_pcpu->timer_scheduled = true; |
4916 | interval = ktime_set(0, MVPP2_TXDONE_HRTIMER_PERIOD_NS); | 4916 | interval = MVPP2_TXDONE_HRTIMER_PERIOD_NS; |
4917 | hrtimer_start(&port_pcpu->tx_done_timer, interval, | 4917 | hrtimer_start(&port_pcpu->tx_done_timer, interval, |
4918 | HRTIMER_MODE_REL_PINNED); | 4918 | HRTIMER_MODE_REL_PINNED); |
4919 | } | 4919 | } |
diff --git a/drivers/net/ethernet/tile/tilegx.c b/drivers/net/ethernet/tile/tilegx.c index 0aaf975bb347..2255f9a6f3bc 100644 --- a/drivers/net/ethernet/tile/tilegx.c +++ b/drivers/net/ethernet/tile/tilegx.c | |||
@@ -751,7 +751,7 @@ static void tile_net_schedule_tx_wake_timer(struct net_device *dev, | |||
751 | &info->mpipe[instance].tx_wake[priv->echannel]; | 751 | &info->mpipe[instance].tx_wake[priv->echannel]; |
752 | 752 | ||
753 | hrtimer_start(&tx_wake->timer, | 753 | hrtimer_start(&tx_wake->timer, |
754 | ktime_set(0, TX_TIMER_DELAY_USEC * 1000UL), | 754 | TX_TIMER_DELAY_USEC * 1000UL, |
755 | HRTIMER_MODE_REL_PINNED); | 755 | HRTIMER_MODE_REL_PINNED); |
756 | } | 756 | } |
757 | 757 | ||
@@ -770,7 +770,7 @@ static void tile_net_schedule_egress_timer(void) | |||
770 | 770 | ||
771 | if (!info->egress_timer_scheduled) { | 771 | if (!info->egress_timer_scheduled) { |
772 | hrtimer_start(&info->egress_timer, | 772 | hrtimer_start(&info->egress_timer, |
773 | ktime_set(0, EGRESS_TIMER_DELAY_USEC * 1000UL), | 773 | EGRESS_TIMER_DELAY_USEC * 1000UL, |
774 | HRTIMER_MODE_REL_PINNED); | 774 | HRTIMER_MODE_REL_PINNED); |
775 | info->egress_timer_scheduled = true; | 775 | info->egress_timer_scheduled = true; |
776 | } | 776 | } |
diff --git a/drivers/net/ieee802154/at86rf230.c b/drivers/net/ieee802154/at86rf230.c index 057025722e3d..46d53a6c8cf8 100644 --- a/drivers/net/ieee802154/at86rf230.c +++ b/drivers/net/ieee802154/at86rf230.c | |||
@@ -510,7 +510,7 @@ at86rf230_async_state_delay(void *context) | |||
510 | case STATE_TRX_OFF: | 510 | case STATE_TRX_OFF: |
511 | switch (ctx->to_state) { | 511 | switch (ctx->to_state) { |
512 | case STATE_RX_AACK_ON: | 512 | case STATE_RX_AACK_ON: |
513 | tim = ktime_set(0, c->t_off_to_aack * NSEC_PER_USEC); | 513 | tim = c->t_off_to_aack * NSEC_PER_USEC; |
514 | /* state change from TRX_OFF to RX_AACK_ON to do a | 514 | /* state change from TRX_OFF to RX_AACK_ON to do a |
515 | * calibration, we need to reset the timeout for the | 515 | * calibration, we need to reset the timeout for the |
516 | * next one. | 516 | * next one. |
@@ -519,7 +519,7 @@ at86rf230_async_state_delay(void *context) | |||
519 | goto change; | 519 | goto change; |
520 | case STATE_TX_ARET_ON: | 520 | case STATE_TX_ARET_ON: |
521 | case STATE_TX_ON: | 521 | case STATE_TX_ON: |
522 | tim = ktime_set(0, c->t_off_to_tx_on * NSEC_PER_USEC); | 522 | tim = c->t_off_to_tx_on * NSEC_PER_USEC; |
523 | /* state change from TRX_OFF to TX_ON or ARET_ON to do | 523 | /* state change from TRX_OFF to TX_ON or ARET_ON to do |
524 | * a calibration, we need to reset the timeout for the | 524 | * a calibration, we need to reset the timeout for the |
525 | * next one. | 525 | * next one. |
@@ -539,8 +539,7 @@ at86rf230_async_state_delay(void *context) | |||
539 | * to TX_ON or TRX_OFF. | 539 | * to TX_ON or TRX_OFF. |
540 | */ | 540 | */ |
541 | if (!force) { | 541 | if (!force) { |
542 | tim = ktime_set(0, (c->t_frame + c->t_p_ack) * | 542 | tim = (c->t_frame + c->t_p_ack) * NSEC_PER_USEC; |
543 | NSEC_PER_USEC); | ||
544 | goto change; | 543 | goto change; |
545 | } | 544 | } |
546 | break; | 545 | break; |
@@ -552,7 +551,7 @@ at86rf230_async_state_delay(void *context) | |||
552 | case STATE_P_ON: | 551 | case STATE_P_ON: |
553 | switch (ctx->to_state) { | 552 | switch (ctx->to_state) { |
554 | case STATE_TRX_OFF: | 553 | case STATE_TRX_OFF: |
555 | tim = ktime_set(0, c->t_reset_to_off * NSEC_PER_USEC); | 554 | tim = c->t_reset_to_off * NSEC_PER_USEC; |
556 | goto change; | 555 | goto change; |
557 | default: | 556 | default: |
558 | break; | 557 | break; |
diff --git a/drivers/net/usb/cdc_ncm.c b/drivers/net/usb/cdc_ncm.c index 2d1a6f2e16ab..f317984f7536 100644 --- a/drivers/net/usb/cdc_ncm.c +++ b/drivers/net/usb/cdc_ncm.c | |||
@@ -1282,7 +1282,7 @@ static void cdc_ncm_tx_timeout_start(struct cdc_ncm_ctx *ctx) | |||
1282 | /* start timer, if not already started */ | 1282 | /* start timer, if not already started */ |
1283 | if (!(hrtimer_active(&ctx->tx_timer) || atomic_read(&ctx->stop))) | 1283 | if (!(hrtimer_active(&ctx->tx_timer) || atomic_read(&ctx->stop))) |
1284 | hrtimer_start(&ctx->tx_timer, | 1284 | hrtimer_start(&ctx->tx_timer, |
1285 | ktime_set(0, ctx->timer_interval), | 1285 | ctx->timer_interval, |
1286 | HRTIMER_MODE_REL); | 1286 | HRTIMER_MODE_REL); |
1287 | } | 1287 | } |
1288 | 1288 | ||
diff --git a/drivers/net/wireless/ralink/rt2x00/rt2800usb.c b/drivers/net/wireless/ralink/rt2x00/rt2800usb.c index 9f61293f1a56..f38c44061b5b 100644 --- a/drivers/net/wireless/ralink/rt2x00/rt2800usb.c +++ b/drivers/net/wireless/ralink/rt2x00/rt2800usb.c | |||
@@ -177,7 +177,7 @@ static bool rt2800usb_tx_sta_fifo_read_completed(struct rt2x00_dev *rt2x00dev, | |||
177 | if (rt2800usb_txstatus_pending(rt2x00dev)) { | 177 | if (rt2800usb_txstatus_pending(rt2x00dev)) { |
178 | /* Read register after 1 ms */ | 178 | /* Read register after 1 ms */ |
179 | hrtimer_start(&rt2x00dev->txstatus_timer, | 179 | hrtimer_start(&rt2x00dev->txstatus_timer, |
180 | ktime_set(0, TXSTATUS_READ_INTERVAL), | 180 | TXSTATUS_READ_INTERVAL, |
181 | HRTIMER_MODE_REL); | 181 | HRTIMER_MODE_REL); |
182 | return false; | 182 | return false; |
183 | } | 183 | } |
@@ -204,7 +204,7 @@ static void rt2800usb_async_read_tx_status(struct rt2x00_dev *rt2x00dev) | |||
204 | 204 | ||
205 | /* Read TX_STA_FIFO register after 2 ms */ | 205 | /* Read TX_STA_FIFO register after 2 ms */ |
206 | hrtimer_start(&rt2x00dev->txstatus_timer, | 206 | hrtimer_start(&rt2x00dev->txstatus_timer, |
207 | ktime_set(0, 2*TXSTATUS_READ_INTERVAL), | 207 | 2 * TXSTATUS_READ_INTERVAL, |
208 | HRTIMER_MODE_REL); | 208 | HRTIMER_MODE_REL); |
209 | } | 209 | } |
210 | 210 | ||
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index 9236e40ac055..1800befa8b8b 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c | |||
@@ -3044,7 +3044,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0e0d, quirk_intel_ntb); | |||
3044 | static ktime_t fixup_debug_start(struct pci_dev *dev, | 3044 | static ktime_t fixup_debug_start(struct pci_dev *dev, |
3045 | void (*fn)(struct pci_dev *dev)) | 3045 | void (*fn)(struct pci_dev *dev)) |
3046 | { | 3046 | { |
3047 | ktime_t calltime = ktime_set(0, 0); | 3047 | ktime_t calltime = 0; |
3048 | 3048 | ||
3049 | dev_dbg(&dev->dev, "calling %pF\n", fn); | 3049 | dev_dbg(&dev->dev, "calling %pF\n", fn); |
3050 | if (initcall_debug) { | 3050 | if (initcall_debug) { |
diff --git a/drivers/platform/x86/msi-wmi.c b/drivers/platform/x86/msi-wmi.c index 978e6d640572..9a32f8627ecc 100644 --- a/drivers/platform/x86/msi-wmi.c +++ b/drivers/platform/x86/msi-wmi.c | |||
@@ -283,7 +283,7 @@ static int __init msi_wmi_input_setup(void) | |||
283 | if (err) | 283 | if (err) |
284 | goto err_free_keymap; | 284 | goto err_free_keymap; |
285 | 285 | ||
286 | last_pressed = ktime_set(0, 0); | 286 | last_pressed = 0; |
287 | 287 | ||
288 | return 0; | 288 | return 0; |
289 | 289 | ||
diff --git a/drivers/power/reset/ltc2952-poweroff.c b/drivers/power/reset/ltc2952-poweroff.c index 15fed9d8f871..bfcd6fba6363 100644 --- a/drivers/power/reset/ltc2952-poweroff.c +++ b/drivers/power/reset/ltc2952-poweroff.c | |||
@@ -169,7 +169,7 @@ static void ltc2952_poweroff_kill(void) | |||
169 | 169 | ||
170 | static void ltc2952_poweroff_default(struct ltc2952_poweroff *data) | 170 | static void ltc2952_poweroff_default(struct ltc2952_poweroff *data) |
171 | { | 171 | { |
172 | data->wde_interval = ktime_set(0, 300L*1E6L); | 172 | data->wde_interval = 300L * 1E6L; |
173 | data->trigger_delay = ktime_set(2, 500L*1E6L); | 173 | data->trigger_delay = ktime_set(2, 500L*1E6L); |
174 | 174 | ||
175 | hrtimer_init(&data->timer_trigger, CLOCK_MONOTONIC, HRTIMER_MODE_REL); | 175 | hrtimer_init(&data->timer_trigger, CLOCK_MONOTONIC, HRTIMER_MODE_REL); |
diff --git a/drivers/rtc/interface.c b/drivers/rtc/interface.c index 5cf196dfc193..fc0fa7577636 100644 --- a/drivers/rtc/interface.c +++ b/drivers/rtc/interface.c | |||
@@ -363,7 +363,7 @@ int rtc_set_alarm(struct rtc_device *rtc, struct rtc_wkalrm *alarm) | |||
363 | rtc_timer_remove(rtc, &rtc->aie_timer); | 363 | rtc_timer_remove(rtc, &rtc->aie_timer); |
364 | 364 | ||
365 | rtc->aie_timer.node.expires = rtc_tm_to_ktime(alarm->time); | 365 | rtc->aie_timer.node.expires = rtc_tm_to_ktime(alarm->time); |
366 | rtc->aie_timer.period = ktime_set(0, 0); | 366 | rtc->aie_timer.period = 0; |
367 | if (alarm->enabled) | 367 | if (alarm->enabled) |
368 | err = rtc_timer_enqueue(rtc, &rtc->aie_timer); | 368 | err = rtc_timer_enqueue(rtc, &rtc->aie_timer); |
369 | 369 | ||
@@ -391,7 +391,7 @@ int rtc_initialize_alarm(struct rtc_device *rtc, struct rtc_wkalrm *alarm) | |||
391 | return err; | 391 | return err; |
392 | 392 | ||
393 | rtc->aie_timer.node.expires = rtc_tm_to_ktime(alarm->time); | 393 | rtc->aie_timer.node.expires = rtc_tm_to_ktime(alarm->time); |
394 | rtc->aie_timer.period = ktime_set(0, 0); | 394 | rtc->aie_timer.period = 0; |
395 | 395 | ||
396 | /* Alarm has to be enabled & in the future for us to enqueue it */ | 396 | /* Alarm has to be enabled & in the future for us to enqueue it */ |
397 | if (alarm->enabled && (rtc_tm_to_ktime(now) < | 397 | if (alarm->enabled && (rtc_tm_to_ktime(now) < |
@@ -554,7 +554,7 @@ enum hrtimer_restart rtc_pie_update_irq(struct hrtimer *timer) | |||
554 | int count; | 554 | int count; |
555 | rtc = container_of(timer, struct rtc_device, pie_timer); | 555 | rtc = container_of(timer, struct rtc_device, pie_timer); |
556 | 556 | ||
557 | period = ktime_set(0, NSEC_PER_SEC/rtc->irq_freq); | 557 | period = NSEC_PER_SEC / rtc->irq_freq; |
558 | count = hrtimer_forward_now(timer, period); | 558 | count = hrtimer_forward_now(timer, period); |
559 | 559 | ||
560 | rtc_handle_legacy_irq(rtc, count, RTC_PF); | 560 | rtc_handle_legacy_irq(rtc, count, RTC_PF); |
@@ -665,7 +665,7 @@ static int rtc_update_hrtimer(struct rtc_device *rtc, int enabled) | |||
665 | return -1; | 665 | return -1; |
666 | 666 | ||
667 | if (enabled) { | 667 | if (enabled) { |
668 | ktime_t period = ktime_set(0, NSEC_PER_SEC / rtc->irq_freq); | 668 | ktime_t period = NSEC_PER_SEC / rtc->irq_freq; |
669 | 669 | ||
670 | hrtimer_start(&rtc->pie_timer, period, HRTIMER_MODE_REL); | 670 | hrtimer_start(&rtc->pie_timer, period, HRTIMER_MODE_REL); |
671 | } | 671 | } |
diff --git a/drivers/s390/crypto/ap_bus.c b/drivers/s390/crypto/ap_bus.c index 6d75984a3d85..5fa699192864 100644 --- a/drivers/s390/crypto/ap_bus.c +++ b/drivers/s390/crypto/ap_bus.c | |||
@@ -333,7 +333,7 @@ void ap_wait(enum ap_wait wait) | |||
333 | case AP_WAIT_TIMEOUT: | 333 | case AP_WAIT_TIMEOUT: |
334 | spin_lock_bh(&ap_poll_timer_lock); | 334 | spin_lock_bh(&ap_poll_timer_lock); |
335 | if (!hrtimer_is_queued(&ap_poll_timer)) { | 335 | if (!hrtimer_is_queued(&ap_poll_timer)) { |
336 | hr_time = ktime_set(0, poll_timeout); | 336 | hr_time = poll_timeout; |
337 | hrtimer_forward_now(&ap_poll_timer, hr_time); | 337 | hrtimer_forward_now(&ap_poll_timer, hr_time); |
338 | hrtimer_restart(&ap_poll_timer); | 338 | hrtimer_restart(&ap_poll_timer); |
339 | } | 339 | } |
@@ -860,7 +860,7 @@ static ssize_t poll_timeout_store(struct bus_type *bus, const char *buf, | |||
860 | time > 120000000000ULL) | 860 | time > 120000000000ULL) |
861 | return -EINVAL; | 861 | return -EINVAL; |
862 | poll_timeout = time; | 862 | poll_timeout = time; |
863 | hr_time = ktime_set(0, poll_timeout); | 863 | hr_time = poll_timeout; |
864 | 864 | ||
865 | spin_lock_bh(&ap_poll_timer_lock); | 865 | spin_lock_bh(&ap_poll_timer_lock); |
866 | hrtimer_cancel(&ap_poll_timer); | 866 | hrtimer_cancel(&ap_poll_timer); |
diff --git a/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c b/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c index 2583e8b50b21..3d3768aaab4f 100644 --- a/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c +++ b/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c | |||
@@ -1694,7 +1694,7 @@ static void srp_snd_msg_failed(struct scsi_info *vscsi, long rc) | |||
1694 | if (!vscsi->rsp_q_timer.started) { | 1694 | if (!vscsi->rsp_q_timer.started) { |
1695 | if (vscsi->rsp_q_timer.timer_pops < | 1695 | if (vscsi->rsp_q_timer.timer_pops < |
1696 | MAX_TIMER_POPS) { | 1696 | MAX_TIMER_POPS) { |
1697 | kt = ktime_set(0, WAIT_NANO_SECONDS); | 1697 | kt = WAIT_NANO_SECONDS; |
1698 | } else { | 1698 | } else { |
1699 | /* | 1699 | /* |
1700 | * slide the timeslice if the maximum | 1700 | * slide the timeslice if the maximum |
diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c index cf04a364fd8b..03051e12a072 100644 --- a/drivers/scsi/scsi_debug.c +++ b/drivers/scsi/scsi_debug.c | |||
@@ -4085,7 +4085,7 @@ static int schedule_resp(struct scsi_cmnd *cmnd, struct sdebug_dev_info *devip, | |||
4085 | jiffies_to_timespec(delta_jiff, &ts); | 4085 | jiffies_to_timespec(delta_jiff, &ts); |
4086 | kt = ktime_set(ts.tv_sec, ts.tv_nsec); | 4086 | kt = ktime_set(ts.tv_sec, ts.tv_nsec); |
4087 | } else | 4087 | } else |
4088 | kt = ktime_set(0, sdebug_ndelay); | 4088 | kt = sdebug_ndelay; |
4089 | if (NULL == sd_dp) { | 4089 | if (NULL == sd_dp) { |
4090 | sd_dp = kzalloc(sizeof(*sd_dp), GFP_ATOMIC); | 4090 | sd_dp = kzalloc(sizeof(*sd_dp), GFP_ATOMIC); |
4091 | if (NULL == sd_dp) | 4091 | if (NULL == sd_dp) |
diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index a2c2817fc566..20e5e5fb048c 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c | |||
@@ -930,7 +930,7 @@ static void ufshcd_clk_scaling_update_busy(struct ufs_hba *hba) | |||
930 | if (!hba->outstanding_reqs && scaling->is_busy_started) { | 930 | if (!hba->outstanding_reqs && scaling->is_busy_started) { |
931 | scaling->tot_busy_t += ktime_to_us(ktime_sub(ktime_get(), | 931 | scaling->tot_busy_t += ktime_to_us(ktime_sub(ktime_get(), |
932 | scaling->busy_start_t)); | 932 | scaling->busy_start_t)); |
933 | scaling->busy_start_t = ktime_set(0, 0); | 933 | scaling->busy_start_t = 0; |
934 | scaling->is_busy_started = false; | 934 | scaling->is_busy_started = false; |
935 | } | 935 | } |
936 | } | 936 | } |
@@ -6661,7 +6661,7 @@ start_window: | |||
6661 | scaling->busy_start_t = ktime_get(); | 6661 | scaling->busy_start_t = ktime_get(); |
6662 | scaling->is_busy_started = true; | 6662 | scaling->is_busy_started = true; |
6663 | } else { | 6663 | } else { |
6664 | scaling->busy_start_t = ktime_set(0, 0); | 6664 | scaling->busy_start_t = 0; |
6665 | scaling->is_busy_started = false; | 6665 | scaling->is_busy_started = false; |
6666 | } | 6666 | } |
6667 | spin_unlock_irqrestore(hba->host->host_lock, flags); | 6667 | spin_unlock_irqrestore(hba->host->host_lock, flags); |
diff --git a/drivers/usb/gadget/function/f_ncm.c b/drivers/usb/gadget/function/f_ncm.c index e8008fa35e1e..224717e63a53 100644 --- a/drivers/usb/gadget/function/f_ncm.c +++ b/drivers/usb/gadget/function/f_ncm.c | |||
@@ -1113,8 +1113,7 @@ static struct sk_buff *ncm_wrap_ntb(struct gether *port, | |||
1113 | } | 1113 | } |
1114 | 1114 | ||
1115 | /* Delay the timer. */ | 1115 | /* Delay the timer. */ |
1116 | hrtimer_start(&ncm->task_timer, | 1116 | hrtimer_start(&ncm->task_timer, TX_TIMEOUT_NSECS, |
1117 | ktime_set(0, TX_TIMEOUT_NSECS), | ||
1118 | HRTIMER_MODE_REL); | 1117 | HRTIMER_MODE_REL); |
1119 | 1118 | ||
1120 | /* Add the datagram position entries */ | 1119 | /* Add the datagram position entries */ |
diff --git a/drivers/usb/host/ehci-timer.c b/drivers/usb/host/ehci-timer.c index 262e10cacc8c..3893b5bafd87 100644 --- a/drivers/usb/host/ehci-timer.c +++ b/drivers/usb/host/ehci-timer.c | |||
@@ -88,8 +88,7 @@ static void ehci_enable_event(struct ehci_hcd *ehci, unsigned event, | |||
88 | ktime_t *timeout = &ehci->hr_timeouts[event]; | 88 | ktime_t *timeout = &ehci->hr_timeouts[event]; |
89 | 89 | ||
90 | if (resched) | 90 | if (resched) |
91 | *timeout = ktime_add(ktime_get(), | 91 | *timeout = ktime_add(ktime_get(), event_delays_ns[event]); |
92 | ktime_set(0, event_delays_ns[event])); | ||
93 | ehci->enabled_hrtimer_events |= (1 << event); | 92 | ehci->enabled_hrtimer_events |= (1 << event); |
94 | 93 | ||
95 | /* Track only the lowest-numbered pending event */ | 94 | /* Track only the lowest-numbered pending event */ |
diff --git a/drivers/usb/host/fotg210-hcd.c b/drivers/usb/host/fotg210-hcd.c index 4dda56ef06cd..9d0b0518290a 100644 --- a/drivers/usb/host/fotg210-hcd.c +++ b/drivers/usb/host/fotg210-hcd.c | |||
@@ -1080,8 +1080,7 @@ static void fotg210_enable_event(struct fotg210_hcd *fotg210, unsigned event, | |||
1080 | ktime_t *timeout = &fotg210->hr_timeouts[event]; | 1080 | ktime_t *timeout = &fotg210->hr_timeouts[event]; |
1081 | 1081 | ||
1082 | if (resched) | 1082 | if (resched) |
1083 | *timeout = ktime_add(ktime_get(), | 1083 | *timeout = ktime_add(ktime_get(), event_delays_ns[event]); |
1084 | ktime_set(0, event_delays_ns[event])); | ||
1085 | fotg210->enabled_hrtimer_events |= (1 << event); | 1084 | fotg210->enabled_hrtimer_events |= (1 << event); |
1086 | 1085 | ||
1087 | /* Track only the lowest-numbered pending event */ | 1086 | /* Track only the lowest-numbered pending event */ |
diff --git a/drivers/usb/musb/musb_cppi41.c b/drivers/usb/musb/musb_cppi41.c index d4d7c56b48c7..16363852c034 100644 --- a/drivers/usb/musb/musb_cppi41.c +++ b/drivers/usb/musb/musb_cppi41.c | |||
@@ -197,8 +197,7 @@ static enum hrtimer_restart cppi41_recheck_tx_req(struct hrtimer *timer) | |||
197 | if (!list_empty(&controller->early_tx_list) && | 197 | if (!list_empty(&controller->early_tx_list) && |
198 | !hrtimer_is_queued(&controller->early_tx)) { | 198 | !hrtimer_is_queued(&controller->early_tx)) { |
199 | ret = HRTIMER_RESTART; | 199 | ret = HRTIMER_RESTART; |
200 | hrtimer_forward_now(&controller->early_tx, | 200 | hrtimer_forward_now(&controller->early_tx, 20 * NSEC_PER_USEC); |
201 | ktime_set(0, 20 * NSEC_PER_USEC)); | ||
202 | } | 201 | } |
203 | 202 | ||
204 | spin_unlock_irqrestore(&musb->lock, flags); | 203 | spin_unlock_irqrestore(&musb->lock, flags); |
@@ -280,9 +279,9 @@ static void cppi41_dma_callback(void *private_data) | |||
280 | unsigned long usecs = cppi41_channel->total_len / 10; | 279 | unsigned long usecs = cppi41_channel->total_len / 10; |
281 | 280 | ||
282 | hrtimer_start_range_ns(&controller->early_tx, | 281 | hrtimer_start_range_ns(&controller->early_tx, |
283 | ktime_set(0, usecs * NSEC_PER_USEC), | 282 | usecs * NSEC_PER_USEC, |
284 | 20 * NSEC_PER_USEC, | 283 | 20 * NSEC_PER_USEC, |
285 | HRTIMER_MODE_REL); | 284 | HRTIMER_MODE_REL); |
286 | } | 285 | } |
287 | 286 | ||
288 | out: | 287 | out: |
diff --git a/fs/dlm/lock.c b/fs/dlm/lock.c index 35502d4046f5..f631a70407f6 100644 --- a/fs/dlm/lock.c +++ b/fs/dlm/lock.c | |||
@@ -1395,7 +1395,7 @@ static int nodeid_warned(int nodeid, int num_nodes, int *warned) | |||
1395 | void dlm_scan_waiters(struct dlm_ls *ls) | 1395 | void dlm_scan_waiters(struct dlm_ls *ls) |
1396 | { | 1396 | { |
1397 | struct dlm_lkb *lkb; | 1397 | struct dlm_lkb *lkb; |
1398 | ktime_t zero = ktime_set(0, 0); | 1398 | ktime_t zero = 0; |
1399 | s64 us; | 1399 | s64 us; |
1400 | s64 debug_maxus = 0; | 1400 | s64 debug_maxus = 0; |
1401 | u32 debug_scanned = 0; | 1401 | u32 debug_scanned = 0; |
diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c index f7b3ba61add5..94f50cac91c6 100644 --- a/fs/gfs2/glock.c +++ b/fs/gfs2/glock.c | |||
@@ -695,7 +695,7 @@ int gfs2_glock_get(struct gfs2_sbd *sdp, u64 number, | |||
695 | gl->gl_target = LM_ST_UNLOCKED; | 695 | gl->gl_target = LM_ST_UNLOCKED; |
696 | gl->gl_demote_state = LM_ST_EXCLUSIVE; | 696 | gl->gl_demote_state = LM_ST_EXCLUSIVE; |
697 | gl->gl_ops = glops; | 697 | gl->gl_ops = glops; |
698 | gl->gl_dstamp = ktime_set(0, 0); | 698 | gl->gl_dstamp = 0; |
699 | preempt_disable(); | 699 | preempt_disable(); |
700 | /* We use the global stats to estimate the initial per-glock stats */ | 700 | /* We use the global stats to estimate the initial per-glock stats */ |
701 | gl->gl_stats = this_cpu_ptr(sdp->sd_lkstats)->lkstats[glops->go_type]; | 701 | gl->gl_stats = this_cpu_ptr(sdp->sd_lkstats)->lkstats[glops->go_type]; |
diff --git a/fs/timerfd.c b/fs/timerfd.c index fb4407a7cf9e..c173cc196175 100644 --- a/fs/timerfd.c +++ b/fs/timerfd.c | |||
@@ -155,7 +155,7 @@ static ktime_t timerfd_get_remaining(struct timerfd_ctx *ctx) | |||
155 | else | 155 | else |
156 | remaining = hrtimer_expires_remaining_adjusted(&ctx->t.tmr); | 156 | remaining = hrtimer_expires_remaining_adjusted(&ctx->t.tmr); |
157 | 157 | ||
158 | return remaining < 0 ? ktime_set(0, 0): remaining; | 158 | return remaining < 0 ? 0: remaining; |
159 | } | 159 | } |
160 | 160 | ||
161 | static int timerfd_setup(struct timerfd_ctx *ctx, int flags, | 161 | static int timerfd_setup(struct timerfd_ctx *ctx, int flags, |
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index ac7fa34db8a7..b53c0cfd417e 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
@@ -3227,7 +3227,7 @@ static inline ktime_t net_timedelta(ktime_t t) | |||
3227 | 3227 | ||
3228 | static inline ktime_t net_invalid_timestamp(void) | 3228 | static inline ktime_t net_invalid_timestamp(void) |
3229 | { | 3229 | { |
3230 | return ktime_set(0, 0); | 3230 | return 0; |
3231 | } | 3231 | } |
3232 | 3232 | ||
3233 | struct sk_buff *skb_clone_sk(struct sk_buff *skb); | 3233 | struct sk_buff *skb_clone_sk(struct sk_buff *skb); |
diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 966556ebdbb3..c56fb57f2991 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c | |||
@@ -1456,7 +1456,7 @@ unsigned long wait_task_inactive(struct task_struct *p, long match_state) | |||
1456 | * yield - it could be a while. | 1456 | * yield - it could be a while. |
1457 | */ | 1457 | */ |
1458 | if (unlikely(queued)) { | 1458 | if (unlikely(queued)) { |
1459 | ktime_t to = ktime_set(0, NSEC_PER_SEC/HZ); | 1459 | ktime_t to = NSEC_PER_SEC / HZ; |
1460 | 1460 | ||
1461 | set_current_state(TASK_UNINTERRUPTIBLE); | 1461 | set_current_state(TASK_UNINTERRUPTIBLE); |
1462 | schedule_hrtimeout(&to, HRTIMER_MODE_REL); | 1462 | schedule_hrtimeout(&to, HRTIMER_MODE_REL); |
diff --git a/kernel/time/alarmtimer.c b/kernel/time/alarmtimer.c index ab6ac077bdb7..e6dc9a538efa 100644 --- a/kernel/time/alarmtimer.c +++ b/kernel/time/alarmtimer.c | |||
@@ -234,7 +234,7 @@ static int alarmtimer_suspend(struct device *dev) | |||
234 | min = freezer_delta; | 234 | min = freezer_delta; |
235 | expires = freezer_expires; | 235 | expires = freezer_expires; |
236 | type = freezer_alarmtype; | 236 | type = freezer_alarmtype; |
237 | freezer_delta = ktime_set(0, 0); | 237 | freezer_delta = 0; |
238 | spin_unlock_irqrestore(&freezer_delta_lock, flags); | 238 | spin_unlock_irqrestore(&freezer_delta_lock, flags); |
239 | 239 | ||
240 | rtc = alarmtimer_get_rtcdev(); | 240 | rtc = alarmtimer_get_rtcdev(); |
@@ -277,7 +277,7 @@ static int alarmtimer_suspend(struct device *dev) | |||
277 | now = ktime_add(now, min); | 277 | now = ktime_add(now, min); |
278 | 278 | ||
279 | /* Set alarm, if in the past reject suspend briefly to handle */ | 279 | /* Set alarm, if in the past reject suspend briefly to handle */ |
280 | ret = rtc_timer_start(rtc, &rtctimer, now, ktime_set(0, 0)); | 280 | ret = rtc_timer_start(rtc, &rtctimer, now, 0); |
281 | if (ret < 0) | 281 | if (ret < 0) |
282 | __pm_wakeup_event(ws, MSEC_PER_SEC); | 282 | __pm_wakeup_event(ws, MSEC_PER_SEC); |
283 | return ret; | 283 | return ret; |
diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c index c7f780113884..c6ecedd3b839 100644 --- a/kernel/time/hrtimer.c +++ b/kernel/time/hrtimer.c | |||
@@ -955,7 +955,7 @@ static inline ktime_t hrtimer_update_lowres(struct hrtimer *timer, ktime_t tim, | |||
955 | */ | 955 | */ |
956 | timer->is_rel = mode & HRTIMER_MODE_REL; | 956 | timer->is_rel = mode & HRTIMER_MODE_REL; |
957 | if (timer->is_rel) | 957 | if (timer->is_rel) |
958 | tim = ktime_add_safe(tim, ktime_set(0, hrtimer_resolution)); | 958 | tim = ktime_add_safe(tim, hrtimer_resolution); |
959 | #endif | 959 | #endif |
960 | return tim; | 960 | return tim; |
961 | } | 961 | } |
diff --git a/kernel/time/posix-timers.c b/kernel/time/posix-timers.c index 9fe98b3777a2..1e6623d76750 100644 --- a/kernel/time/posix-timers.c +++ b/kernel/time/posix-timers.c | |||
@@ -485,7 +485,7 @@ static enum hrtimer_restart posix_timer_fn(struct hrtimer *timer) | |||
485 | */ | 485 | */ |
486 | #ifdef CONFIG_HIGH_RES_TIMERS | 486 | #ifdef CONFIG_HIGH_RES_TIMERS |
487 | { | 487 | { |
488 | ktime_t kj = ktime_set(0, NSEC_PER_SEC / HZ); | 488 | ktime_t kj = NSEC_PER_SEC / HZ; |
489 | 489 | ||
490 | if (timr->it.real.interval < kj) | 490 | if (timr->it.real.interval < kj) |
491 | now = ktime_add(now, kj); | 491 | now = ktime_add(now, kj); |
diff --git a/kernel/time/tick-common.c b/kernel/time/tick-common.c index 4fcd99e12aa0..49edc1c4f3e6 100644 --- a/kernel/time/tick-common.c +++ b/kernel/time/tick-common.c | |||
@@ -178,8 +178,8 @@ static void tick_setup_device(struct tick_device *td, | |||
178 | struct clock_event_device *newdev, int cpu, | 178 | struct clock_event_device *newdev, int cpu, |
179 | const struct cpumask *cpumask) | 179 | const struct cpumask *cpumask) |
180 | { | 180 | { |
181 | ktime_t next_event; | ||
182 | void (*handler)(struct clock_event_device *) = NULL; | 181 | void (*handler)(struct clock_event_device *) = NULL; |
182 | ktime_t next_event = 0; | ||
183 | 183 | ||
184 | /* | 184 | /* |
185 | * First device setup ? | 185 | * First device setup ? |
@@ -195,7 +195,7 @@ static void tick_setup_device(struct tick_device *td, | |||
195 | else | 195 | else |
196 | tick_do_timer_cpu = TICK_DO_TIMER_NONE; | 196 | tick_do_timer_cpu = TICK_DO_TIMER_NONE; |
197 | tick_next_period = ktime_get(); | 197 | tick_next_period = ktime_get(); |
198 | tick_period = ktime_set(0, NSEC_PER_SEC / HZ); | 198 | tick_period = NSEC_PER_SEC / HZ; |
199 | } | 199 | } |
200 | 200 | ||
201 | /* | 201 | /* |
diff --git a/net/can/bcm.c b/net/can/bcm.c index ab8ba1e16473..21ac75390e3d 100644 --- a/net/can/bcm.c +++ b/net/can/bcm.c | |||
@@ -643,7 +643,7 @@ static enum hrtimer_restart bcm_rx_thr_handler(struct hrtimer *hrtimer) | |||
643 | return HRTIMER_RESTART; | 643 | return HRTIMER_RESTART; |
644 | } else { | 644 | } else { |
645 | /* rearm throttle handling */ | 645 | /* rearm throttle handling */ |
646 | op->kt_lastmsg = ktime_set(0, 0); | 646 | op->kt_lastmsg = 0; |
647 | return HRTIMER_NORESTART; | 647 | return HRTIMER_NORESTART; |
648 | } | 648 | } |
649 | } | 649 | } |
@@ -1196,7 +1196,7 @@ static int bcm_rx_setup(struct bcm_msg_head *msg_head, struct msghdr *msg, | |||
1196 | * In any case cancel the throttle timer, flush | 1196 | * In any case cancel the throttle timer, flush |
1197 | * potentially blocked msgs and reset throttle handling | 1197 | * potentially blocked msgs and reset throttle handling |
1198 | */ | 1198 | */ |
1199 | op->kt_lastmsg = ktime_set(0, 0); | 1199 | op->kt_lastmsg = 0; |
1200 | hrtimer_cancel(&op->thrtimer); | 1200 | hrtimer_cancel(&op->thrtimer); |
1201 | bcm_rx_thr_flush(op, 1); | 1201 | bcm_rx_thr_flush(op, 1); |
1202 | } | 1202 | } |
diff --git a/net/mac802154/util.c b/net/mac802154/util.c index f9fd0957ab67..7c03fb0ea34c 100644 --- a/net/mac802154/util.c +++ b/net/mac802154/util.c | |||
@@ -80,11 +80,11 @@ void ieee802154_xmit_complete(struct ieee802154_hw *hw, struct sk_buff *skb, | |||
80 | 80 | ||
81 | if (skb->len > max_sifs_size) | 81 | if (skb->len > max_sifs_size) |
82 | hrtimer_start(&local->ifs_timer, | 82 | hrtimer_start(&local->ifs_timer, |
83 | ktime_set(0, hw->phy->lifs_period * NSEC_PER_USEC), | 83 | hw->phy->lifs_period * NSEC_PER_USEC, |
84 | HRTIMER_MODE_REL); | 84 | HRTIMER_MODE_REL); |
85 | else | 85 | else |
86 | hrtimer_start(&local->ifs_timer, | 86 | hrtimer_start(&local->ifs_timer, |
87 | ktime_set(0, hw->phy->sifs_period * NSEC_PER_USEC), | 87 | hw->phy->sifs_period * NSEC_PER_USEC, |
88 | HRTIMER_MODE_REL); | 88 | HRTIMER_MODE_REL); |
89 | } else { | 89 | } else { |
90 | ieee802154_wake_queue(hw); | 90 | ieee802154_wake_queue(hw); |
diff --git a/net/sched/sch_cbq.c b/net/sched/sch_cbq.c index 9ffe1c220b02..f1207582cbf3 100644 --- a/net/sched/sch_cbq.c +++ b/net/sched/sch_cbq.c | |||
@@ -509,7 +509,7 @@ static enum hrtimer_restart cbq_undelay(struct hrtimer *timer) | |||
509 | if (delay) { | 509 | if (delay) { |
510 | ktime_t time; | 510 | ktime_t time; |
511 | 511 | ||
512 | time = ktime_set(0, 0); | 512 | time = 0; |
513 | time = ktime_add_ns(time, PSCHED_TICKS2NS(now + delay)); | 513 | time = ktime_add_ns(time, PSCHED_TICKS2NS(now + delay)); |
514 | hrtimer_start(&q->delay_timer, time, HRTIMER_MODE_ABS_PINNED); | 514 | hrtimer_start(&q->delay_timer, time, HRTIMER_MODE_ABS_PINNED); |
515 | } | 515 | } |
diff --git a/net/sctp/transport.c b/net/sctp/transport.c index ce54dce13ddb..a1652ab63918 100644 --- a/net/sctp/transport.c +++ b/net/sctp/transport.c | |||
@@ -72,7 +72,7 @@ static struct sctp_transport *sctp_transport_init(struct net *net, | |||
72 | */ | 72 | */ |
73 | peer->rto = msecs_to_jiffies(net->sctp.rto_initial); | 73 | peer->rto = msecs_to_jiffies(net->sctp.rto_initial); |
74 | 74 | ||
75 | peer->last_time_heard = ktime_set(0, 0); | 75 | peer->last_time_heard = 0; |
76 | peer->last_time_ecne_reduced = jiffies; | 76 | peer->last_time_ecne_reduced = jiffies; |
77 | 77 | ||
78 | peer->param_flags = SPP_HB_DISABLE | | 78 | peer->param_flags = SPP_HB_DISABLE | |
diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c index d4ab9a7f3d94..64e3c82eedf6 100644 --- a/net/xfrm/xfrm_state.c +++ b/net/xfrm/xfrm_state.c | |||
@@ -1404,7 +1404,7 @@ int xfrm_state_check_expire(struct xfrm_state *x) | |||
1404 | if (x->curlft.bytes >= x->lft.hard_byte_limit || | 1404 | if (x->curlft.bytes >= x->lft.hard_byte_limit || |
1405 | x->curlft.packets >= x->lft.hard_packet_limit) { | 1405 | x->curlft.packets >= x->lft.hard_packet_limit) { |
1406 | x->km.state = XFRM_STATE_EXPIRED; | 1406 | x->km.state = XFRM_STATE_EXPIRED; |
1407 | tasklet_hrtimer_start(&x->mtimer, ktime_set(0, 0), HRTIMER_MODE_REL); | 1407 | tasklet_hrtimer_start(&x->mtimer, 0, HRTIMER_MODE_REL); |
1408 | return -EINVAL; | 1408 | return -EINVAL; |
1409 | } | 1409 | } |
1410 | 1410 | ||
diff --git a/sound/drivers/pcsp/pcsp_lib.c b/sound/drivers/pcsp/pcsp_lib.c index 3689f5f6be64..aca2d7d5f059 100644 --- a/sound/drivers/pcsp/pcsp_lib.c +++ b/sound/drivers/pcsp/pcsp_lib.c | |||
@@ -166,7 +166,7 @@ static int pcsp_start_playing(struct snd_pcsp *chip) | |||
166 | atomic_set(&chip->timer_active, 1); | 166 | atomic_set(&chip->timer_active, 1); |
167 | chip->thalf = 0; | 167 | chip->thalf = 0; |
168 | 168 | ||
169 | hrtimer_start(&pcsp_chip.timer, ktime_set(0, 0), HRTIMER_MODE_REL); | 169 | hrtimer_start(&pcsp_chip.timer, 0, HRTIMER_MODE_REL); |
170 | return 0; | 170 | return 0; |
171 | } | 171 | } |
172 | 172 | ||
diff --git a/sound/firewire/lib.c b/sound/firewire/lib.c index ca4dfcf43175..7683238283b6 100644 --- a/sound/firewire/lib.c +++ b/sound/firewire/lib.c | |||
@@ -114,7 +114,7 @@ static void async_midi_port_callback(struct fw_card *card, int rcode, | |||
114 | snd_rawmidi_transmit_ack(substream, port->consume_bytes); | 114 | snd_rawmidi_transmit_ack(substream, port->consume_bytes); |
115 | else if (!rcode_is_permanent_error(rcode)) | 115 | else if (!rcode_is_permanent_error(rcode)) |
116 | /* To start next transaction immediately for recovery. */ | 116 | /* To start next transaction immediately for recovery. */ |
117 | port->next_ktime = ktime_set(0, 0); | 117 | port->next_ktime = 0; |
118 | else | 118 | else |
119 | /* Don't continue processing. */ | 119 | /* Don't continue processing. */ |
120 | port->error = true; | 120 | port->error = true; |
@@ -156,7 +156,7 @@ static void midi_port_work(struct work_struct *work) | |||
156 | if (port->consume_bytes <= 0) { | 156 | if (port->consume_bytes <= 0) { |
157 | /* Do it in next chance, immediately. */ | 157 | /* Do it in next chance, immediately. */ |
158 | if (port->consume_bytes == 0) { | 158 | if (port->consume_bytes == 0) { |
159 | port->next_ktime = ktime_set(0, 0); | 159 | port->next_ktime = 0; |
160 | schedule_work(&port->work); | 160 | schedule_work(&port->work); |
161 | } else { | 161 | } else { |
162 | /* Fatal error. */ | 162 | /* Fatal error. */ |
@@ -219,7 +219,7 @@ int snd_fw_async_midi_port_init(struct snd_fw_async_midi_port *port, | |||
219 | port->addr = addr; | 219 | port->addr = addr; |
220 | port->fill = fill; | 220 | port->fill = fill; |
221 | port->idling = true; | 221 | port->idling = true; |
222 | port->next_ktime = ktime_set(0, 0); | 222 | port->next_ktime = 0; |
223 | port->error = false; | 223 | port->error = false; |
224 | 224 | ||
225 | INIT_WORK(&port->work, midi_port_work); | 225 | INIT_WORK(&port->work, midi_port_work); |
diff --git a/sound/sh/sh_dac_audio.c b/sound/sh/sh_dac_audio.c index abf9c0cab1e2..461b310c7872 100644 --- a/sound/sh/sh_dac_audio.c +++ b/sound/sh/sh_dac_audio.c | |||
@@ -87,7 +87,7 @@ static void dac_audio_reset(struct snd_sh_dac *chip) | |||
87 | 87 | ||
88 | static void dac_audio_set_rate(struct snd_sh_dac *chip) | 88 | static void dac_audio_set_rate(struct snd_sh_dac *chip) |
89 | { | 89 | { |
90 | chip->wakeups_per_second = ktime_set(0, 1000000000 / chip->rate); | 90 | chip->wakeups_per_second = 1000000000 / chip->rate; |
91 | } | 91 | } |
92 | 92 | ||
93 | 93 | ||