From: Wang Qing wangqing@vivo.com
Use the helper function time_is_{before,after}_jiffies() to improve code readability.
V2: Batch them in a series suggested by Joe. Use time_xxx_jiffies() instead of time_xxx() suggested by Kieran.
V3: Fix subject and description suggested by Ted.
Wang Qing (14): block: xen: use time_is_before_eq_jiffies() instead of open coding it clk: mvebu: use time_is_before_eq_jiffies() instead of open coding it gpu: drm: i915: use time_is_after_jiffies() instead of open coding it gpu: drm: radeon: use time_is_before_jiffies() instead open coding it hid: use time_is_after_jiffies() instead of open coding it input: serio: use time_is_before_jiffies() instead of open coding it md: use time_is_before_jiffies(() instead of open coding it md: use time_is_before_eq_jiffies() instead of open coding it media: si21xx: use time_is_before_jiffies() instead of open coding it media: stv0299: use time_is_before_jiffies() instead of open coding it media: tda8083: use time_is_after_jiffies() instead of open coding it media: wl128x: use time_is_before_jiffies() instead of open coding it media: vivid: use time_is_after_jiffies() instead of open coding it
drivers/block/xen-blkback/blkback.c | 5 +++-- drivers/clk/mvebu/armada-37xx-periph.c | 3 ++- drivers/gpu/drm/i915/gt/intel_gt_buffer_pool.c | 2 +- drivers/gpu/drm/radeon/radeon_pm.c | 3 ++- drivers/hid/intel-ish-hid/ipc/ipc.c | 2 +- drivers/input/serio/ps2-gpio.c | 4 ++-- drivers/md/dm-thin.c | 2 +- drivers/md/dm-writecache.c | 5 +++-- drivers/media/dvb-frontends/si21xx.c | 2 +- drivers/media/dvb-frontends/stv0299.c | 4 ++-- drivers/media/dvb-frontends/tda8083.c | 2 +- drivers/media/radio/wl128x/fmdrv_common.c | 3 ++- drivers/media/test-drivers/vivid/vivid-kthread-cap.c | 3 ++- drivers/media/test-drivers/vivid/vivid-kthread-out.c | 3 ++- drivers/media/test-drivers/vivid/vivid-kthread-touch.c | 3 ++- drivers/media/test-drivers/vivid/vivid-sdr-cap.c | 3 ++- 17 files changed, 31 insertions(+), 22 deletions(-)
From: Wang Qing wangqing@vivo.com
Use the helper function time_is_{before,after}_jiffies() to improve code readability.
Signed-off-by: Wang Qing wangqing@vivo.com --- drivers/block/xen-blkback/blkback.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/block/xen-blkback/blkback.c b/drivers/block/xen-blkback/blkback.c index d1e2646..aecc1f4 --- a/drivers/block/xen-blkback/blkback.c +++ b/drivers/block/xen-blkback/blkback.c @@ -42,6 +42,7 @@ #include <linux/delay.h> #include <linux/freezer.h> #include <linux/bitmap.h> +#include <linux/jiffies.h>
#include <xen/events.h> #include <xen/page.h> @@ -134,8 +135,8 @@ module_param(log_stats, int, 0644);
static inline bool persistent_gnt_timeout(struct persistent_gnt *persistent_gnt) { - return pgrant_timeout && (jiffies - persistent_gnt->last_used >= - HZ * pgrant_timeout); + return pgrant_timeout && time_is_before_eq_jiffies( + persistent_gnt->last_used + HZ * pgrant_timeout); }
#define vaddr(page) ((unsigned long)pfn_to_kaddr(page_to_pfn(page)))
On Mon, Feb 14, 2022 at 05:55:38PM -0800, Qing Wang wrote:
From: Wang Qing wangqing@vivo.com
Use the helper function time_is_{before,after}_jiffies() to improve code readability.
Signed-off-by: Wang Qing wangqing@vivo.com
Acked-by: Roger Pau Monné roger.pau@citrix.com
Thanks, Roger.
From: Wang Qing wangqing@vivo.com
Use the helper function time_is_{before,after}_jiffies() to improve code readability.
Signed-off-by: Wang Qing wangqing@vivo.com --- drivers/clk/mvebu/armada-37xx-periph.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/clk/mvebu/armada-37xx-periph.c b/drivers/clk/mvebu/armada-37xx-periph.c index 32ac6b6..14d73f8 --- a/drivers/clk/mvebu/armada-37xx-periph.c +++ b/drivers/clk/mvebu/armada-37xx-periph.c @@ -25,6 +25,7 @@ #include <linux/platform_device.h> #include <linux/regmap.h> #include <linux/slab.h> +#include <linux/jiffies.h>
#define TBG_SEL 0x0 #define DIV_SEL0 0x4 @@ -541,7 +542,7 @@ static void clk_pm_cpu_set_rate_wa(struct clk_pm_cpu *pm_cpu, * We are going to L0 with rate >= 1GHz. Check whether we have been at * L1 for long enough time. If not, go to L1 for 20ms. */ - if (pm_cpu->l1_expiration && jiffies >= pm_cpu->l1_expiration) + if (pm_cpu->l1_expiration && time_is_before_eq_jiffies(pm_cpu->l1_expiration)) goto invalidate_l1_exp;
regmap_update_bits(base, ARMADA_37XX_NB_CPU_LOAD,
Quoting Qing Wang (2022-02-14 17:55:39)
From: Wang Qing wangqing@vivo.com
Use the helper function time_is_{before,after}_jiffies() to improve code readability.
Signed-off-by: Wang Qing wangqing@vivo.com
Applied to clk-next
From: Wang Qing wangqing@vivo.com
Use the helper function time_is_{before,after}_jiffies() to improve code readability.
Signed-off-by: Wang Qing wangqing@vivo.com --- drivers/gpu/drm/i915/gt/intel_gt_buffer_pool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/gt/intel_gt_buffer_pool.c b/drivers/gpu/drm/i915/gt/intel_gt_buffer_pool.c index 9db3dcb..b289abb --- a/drivers/gpu/drm/i915/gt/intel_gt_buffer_pool.c +++ b/drivers/gpu/drm/i915/gt/intel_gt_buffer_pool.c @@ -56,7 +56,7 @@ static bool pool_free_older_than(struct intel_gt_buffer_pool *pool, long keep) node = list_entry(pos, typeof(*node), link);
age = READ_ONCE(node->age); - if (!age || jiffies - age < keep) + if (!age || time_is_after_jiffies(age + keep)) break;
/* Check we are the first to claim this node */
From: Wang Qing wangqing@vivo.com
Use the helper function time_is_{before,after}_jiffies() to improve code readability.
Signed-off-by: Wang Qing wangqing@vivo.com --- drivers/gpu/drm/radeon/radeon_pm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/radeon/radeon_pm.c b/drivers/gpu/drm/radeon/radeon_pm.c index c67b6dd..53d536a --- a/drivers/gpu/drm/radeon/radeon_pm.c +++ b/drivers/gpu/drm/radeon/radeon_pm.c @@ -25,6 +25,7 @@ #include <linux/hwmon.h> #include <linux/pci.h> #include <linux/power_supply.h> +#include <linux/jiffies.h>
#include <drm/drm_vblank.h>
@@ -1899,7 +1900,7 @@ static void radeon_dynpm_idle_work_handler(struct work_struct *work) * to false since we want to wait for vbl to avoid flicker. */ if (rdev->pm.dynpm_planned_action != DYNPM_ACTION_NONE && - jiffies > rdev->pm.dynpm_action_timeout) { + time_is_before_jiffies(rdev->pm.dynpm_action_timeout)) { radeon_pm_get_dynpm_state(rdev); radeon_pm_set_clocks(rdev); }
From: Wang Qing wangqing@vivo.com
Use the helper function time_is_{before,after}_jiffies() to improve code readability.
Signed-off-by: Wang Qing wangqing@vivo.com Acked-by: Srinivas Pandruvada srinivas.pandruvada@linux.intel.com --- drivers/hid/intel-ish-hid/ipc/ipc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/hid/intel-ish-hid/ipc/ipc.c b/drivers/hid/intel-ish-hid/ipc/ipc.c index 8ccb246..15e1423 --- a/drivers/hid/intel-ish-hid/ipc/ipc.c +++ b/drivers/hid/intel-ish-hid/ipc/ipc.c @@ -578,7 +578,7 @@ static void _ish_sync_fw_clock(struct ishtp_device *dev) static unsigned long prev_sync; uint64_t usec;
- if (prev_sync && jiffies - prev_sync < 20 * HZ) + if (prev_sync && time_is_after_jiffies(prev_sync + 20 * HZ)) return;
prev_sync = jiffies;
On Tue, Feb 15, 2022 at 2:56 AM Qing Wang wangqing@vivo.com wrote:
From: Wang Qing wangqing@vivo.com
Use the helper function time_is_{before,after}_jiffies() to improve code readability.
Signed-off-by: Wang Qing wangqing@vivo.com Acked-by: Srinivas Pandruvada srinivas.pandruvada@linux.intel.com
FWIW, this one is Acked-by: Benjamin Tissoires benjamin.tissoires@redhat.com
Wang, is there any plan to take this series through the trivial tree or should each maintainer take the matching patches?
Cheers, Benjamin
drivers/hid/intel-ish-hid/ipc/ipc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/hid/intel-ish-hid/ipc/ipc.c b/drivers/hid/intel-ish-hid/ipc/ipc.c index 8ccb246..15e1423 --- a/drivers/hid/intel-ish-hid/ipc/ipc.c +++ b/drivers/hid/intel-ish-hid/ipc/ipc.c @@ -578,7 +578,7 @@ static void _ish_sync_fw_clock(struct ishtp_device *dev) static unsigned long prev_sync; uint64_t usec;
if (prev_sync && jiffies - prev_sync < 20 * HZ)
if (prev_sync && time_is_after_jiffies(prev_sync + 20 * HZ)) return; prev_sync = jiffies;
-- 2.7.4
From: Wang Qing wangqing@vivo.com
Use the helper function time_is_{before,after}_jiffies() to improve code readability.
Signed-off-by: Wang Qing wangqing@vivo.com --- drivers/input/serio/ps2-gpio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/input/serio/ps2-gpio.c b/drivers/input/serio/ps2-gpio.c index 8970b49..7834296 --- a/drivers/input/serio/ps2-gpio.c +++ b/drivers/input/serio/ps2-gpio.c @@ -136,7 +136,7 @@ static irqreturn_t ps2_gpio_irq_rx(struct ps2_gpio_data *drvdata) if (old_jiffies == 0) old_jiffies = jiffies;
- if ((jiffies - old_jiffies) > usecs_to_jiffies(100)) { + if (time_is_before_jiffies(old_jiffies + usecs_to_jiffies(100))) { dev_err(drvdata->dev, "RX: timeout, probably we missed an interrupt\n"); goto err; @@ -237,7 +237,7 @@ static irqreturn_t ps2_gpio_irq_tx(struct ps2_gpio_data *drvdata) if (old_jiffies == 0) old_jiffies = jiffies;
- if ((jiffies - old_jiffies) > usecs_to_jiffies(100)) { + if (time_is_before_jiffies(old_jiffies + usecs_to_jiffies(100))) { dev_err(drvdata->dev, "TX: timeout, probably we missed an interrupt\n"); goto err;
On Tue, Feb 15, 2022 at 2:57 AM Qing Wang wangqing@vivo.com wrote:
From: Wang Qing wangqing@vivo.com
Use the helper function time_is_{before,after}_jiffies() to improve code readability.
Signed-off-by: Wang Qing wangqing@vivo.com
Reviewed-by: Benjamin Tissoires benjamin.tissoires@redhat.com
Cheers, Benjamin
drivers/input/serio/ps2-gpio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/input/serio/ps2-gpio.c b/drivers/input/serio/ps2-gpio.c index 8970b49..7834296 --- a/drivers/input/serio/ps2-gpio.c +++ b/drivers/input/serio/ps2-gpio.c @@ -136,7 +136,7 @@ static irqreturn_t ps2_gpio_irq_rx(struct ps2_gpio_data *drvdata) if (old_jiffies == 0) old_jiffies = jiffies;
if ((jiffies - old_jiffies) > usecs_to_jiffies(100)) {
if (time_is_before_jiffies(old_jiffies + usecs_to_jiffies(100))) { dev_err(drvdata->dev, "RX: timeout, probably we missed an interrupt\n"); goto err;
@@ -237,7 +237,7 @@ static irqreturn_t ps2_gpio_irq_tx(struct ps2_gpio_data *drvdata) if (old_jiffies == 0) old_jiffies = jiffies;
if ((jiffies - old_jiffies) > usecs_to_jiffies(100)) {
if (time_is_before_jiffies(old_jiffies + usecs_to_jiffies(100))) { dev_err(drvdata->dev, "TX: timeout, probably we missed an interrupt\n"); goto err;
-- 2.7.4
Hi Wang,
On Mon, Feb 14, 2022 at 05:55:43PM -0800, Qing Wang wrote:
From: Wang Qing wangqing@vivo.com
Use the helper function time_is_{before,after}_jiffies() to improve code readability.
I applied changes by Danilo Krummrich converting the driver to use ktime_t (see https://lore.kernel.org/r/20220215160208.34826-3-danilokrummrich@dk-develop....) which makes this change not applicable.
Thanks.
From: Wang Qing wangqing@vivo.com
Use the helper function time_is_{before,after}_jiffies() to improve code readability.
Signed-off-by: Wang Qing wangqing@vivo.com --- drivers/md/dm-thin.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/md/dm-thin.c b/drivers/md/dm-thin.c index f4234d6..dced764 --- a/drivers/md/dm-thin.c +++ b/drivers/md/dm-thin.c @@ -161,7 +161,7 @@ static void throttle_work_start(struct throttle *t)
static void throttle_work_update(struct throttle *t) { - if (!t->throttle_applied && jiffies > t->threshold) { + if (!t->throttle_applied && time_is_before_jiffies(t->threshold)) { down_write(&t->lock); t->throttle_applied = true; }
From: Wang Qing wangqing@vivo.com
Use the helper function time_is_{before,after}_jiffies() to improve code readability.
Signed-off-by: Wang Qing wangqing@vivo.com --- drivers/md/dm-writecache.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/md/dm-writecache.c b/drivers/md/dm-writecache.c index 5630b47..125bb5d --- a/drivers/md/dm-writecache.c +++ b/drivers/md/dm-writecache.c @@ -16,6 +16,7 @@ #include <linux/pfn_t.h> #include <linux/libnvdimm.h> #include <linux/delay.h> +#include <linux/jiffies.h> #include "dm-io-tracker.h"
#define DM_MSG_PREFIX "writecache" @@ -1971,8 +1972,8 @@ static void writecache_writeback(struct work_struct *work) while (!list_empty(&wc->lru) && (wc->writeback_all || wc->freelist_size + wc->writeback_size <= wc->freelist_low_watermark || - (jiffies - container_of(wc->lru.prev, struct wc_entry, lru)->age >= - wc->max_age - wc->max_age / MAX_AGE_DIV))) { + time_is_before_eq_jiffies(container_of(wc->lru.prev, struct wc_entry, lru)->age + + wc->max_age - wc->max_age / MAX_AGE_DIV)) {
n_walked++; if (unlikely(n_walked > WRITEBACK_LATENCY) &&
From: Wang Qing wangqing@vivo.com
Use the helper function time_is_{before,after}_jiffies() to improve code readability.
Signed-off-by: Wang Qing wangqing@vivo.com --- drivers/media/dvb-frontends/si21xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/dvb-frontends/si21xx.c b/drivers/media/dvb-frontends/si21xx.c index 001b235..1c6cf76 --- a/drivers/media/dvb-frontends/si21xx.c +++ b/drivers/media/dvb-frontends/si21xx.c @@ -336,7 +336,7 @@ static int si21xx_wait_diseqc_idle(struct si21xx_state *state, int timeout) dprintk("%s\n", __func__);
while ((si21_readreg(state, LNB_CTRL_REG_1) & 0x8) == 8) { - if (jiffies - start > timeout) { + if (time_is_before_jiffies(start + timeout)) { dprintk("%s: timeout!!\n", __func__); return -ETIMEDOUT; }
From: Wang Qing wangqing@vivo.com
Use the helper function time_is_{before,after}_jiffies() to improve code readability.
Signed-off-by: Wang Qing wangqing@vivo.com --- drivers/media/dvb-frontends/stv0299.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/media/dvb-frontends/stv0299.c b/drivers/media/dvb-frontends/stv0299.c index 421395e..867ae04 --- a/drivers/media/dvb-frontends/stv0299.c +++ b/drivers/media/dvb-frontends/stv0299.c @@ -183,7 +183,7 @@ static int stv0299_wait_diseqc_fifo (struct stv0299_state* state, int timeout) dprintk ("%s\n", __func__);
while (stv0299_readreg(state, 0x0a) & 1) { - if (jiffies - start > timeout) { + if (time_is_before_jiffies(start + timeout)) { dprintk ("%s: timeout!!\n", __func__); return -ETIMEDOUT; } @@ -200,7 +200,7 @@ static int stv0299_wait_diseqc_idle (struct stv0299_state* state, int timeout) dprintk ("%s\n", __func__);
while ((stv0299_readreg(state, 0x0a) & 3) != 2 ) { - if (jiffies - start > timeout) { + if (time_is_before_jiffies(start + timeout)) { dprintk ("%s: timeout!!\n", __func__); return -ETIMEDOUT; }
From: Wang Qing wangqing@vivo.com
Use the helper function time_is_{before,after}_jiffies() to improve code readability.
Signed-off-by: Wang Qing wangqing@vivo.com --- drivers/media/dvb-frontends/tda8083.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/dvb-frontends/tda8083.c b/drivers/media/dvb-frontends/tda8083.c index 5be11fd..49c4fe1 --- a/drivers/media/dvb-frontends/tda8083.c +++ b/drivers/media/dvb-frontends/tda8083.c @@ -162,7 +162,7 @@ static void tda8083_wait_diseqc_fifo (struct tda8083_state* state, int timeout) { unsigned long start = jiffies;
- while (jiffies - start < timeout && + while (time_is_after_jiffies(start + timeout) && !(tda8083_readreg(state, 0x02) & 0x80)) { msleep(50);
From: Wang Qing wangqing@vivo.com
Use the helper function time_is_{before,after}_jiffies() to improve code readability.
Signed-off-by: Wang Qing wangqing@vivo.com --- drivers/media/radio/wl128x/fmdrv_common.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/media/radio/wl128x/fmdrv_common.c b/drivers/media/radio/wl128x/fmdrv_common.c index 6142484d..a599d08 --- a/drivers/media/radio/wl128x/fmdrv_common.c +++ b/drivers/media/radio/wl128x/fmdrv_common.c @@ -23,6 +23,7 @@ #include <linux/firmware.h> #include <linux/module.h> #include <linux/nospec.h> +#include <linux/jiffies.h>
#include "fmdrv.h" #include "fmdrv_v4l2.h" @@ -342,7 +343,7 @@ static void send_tasklet(struct tasklet_struct *t) return;
/* Check, is there any timeout happened to last transmitted packet */ - if ((jiffies - fmdev->last_tx_jiffies) > FM_DRV_TX_TIMEOUT) { + if (time_is_before_jiffies(fmdev->last_tx_jiffies + FM_DRV_TX_TIMEOUT)) { fmerr("TX timeout occurred\n"); atomic_set(&fmdev->tx_cnt, 1); }
From: Wang Qing wangqing@vivo.com
Use the helper function time_is_{before,after}_jiffies() to improve code readability.
Signed-off-by: Wang Qing wangqing@vivo.com --- drivers/media/test-drivers/vivid/vivid-kthread-cap.c | 3 ++- drivers/media/test-drivers/vivid/vivid-kthread-out.c | 3 ++- drivers/media/test-drivers/vivid/vivid-kthread-touch.c | 3 ++- drivers/media/test-drivers/vivid/vivid-sdr-cap.c | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/drivers/media/test-drivers/vivid/vivid-kthread-cap.c b/drivers/media/test-drivers/vivid/vivid-kthread-cap.c index 6baa046..295f4a3 --- a/drivers/media/test-drivers/vivid/vivid-kthread-cap.c +++ b/drivers/media/test-drivers/vivid/vivid-kthread-cap.c @@ -18,6 +18,7 @@ #include <linux/freezer.h> #include <linux/random.h> #include <linux/v4l2-dv-timings.h> +#include <linux/jiffies.h> #include <asm/div64.h> #include <media/videobuf2-vmalloc.h> #include <media/v4l2-dv-timings.h> @@ -893,7 +894,7 @@ static int vivid_thread_vid_cap(void *data) next_jiffies_since_start = jiffies_since_start;
wait_jiffies = next_jiffies_since_start - jiffies_since_start; - while (jiffies - cur_jiffies < wait_jiffies && + while (time_is_after_jiffies(cur_jiffies + wait_jiffies) && !kthread_should_stop()) schedule(); } diff --git a/drivers/media/test-drivers/vivid/vivid-kthread-out.c b/drivers/media/test-drivers/vivid/vivid-kthread-out.c index b6d4316..13f737e --- a/drivers/media/test-drivers/vivid/vivid-kthread-out.c +++ b/drivers/media/test-drivers/vivid/vivid-kthread-out.c @@ -18,6 +18,7 @@ #include <linux/freezer.h> #include <linux/random.h> #include <linux/v4l2-dv-timings.h> +#include <linux/jiffies.h> #include <asm/div64.h> #include <media/videobuf2-vmalloc.h> #include <media/v4l2-dv-timings.h> @@ -234,7 +235,7 @@ static int vivid_thread_vid_out(void *data) next_jiffies_since_start = jiffies_since_start;
wait_jiffies = next_jiffies_since_start - jiffies_since_start; - while (jiffies - cur_jiffies < wait_jiffies && + while (time_is_after_jiffies(cur_jiffies + wait_jiffies) && !kthread_should_stop()) schedule(); } diff --git a/drivers/media/test-drivers/vivid/vivid-kthread-touch.c b/drivers/media/test-drivers/vivid/vivid-kthread-touch.c index f065faae..8828243 --- a/drivers/media/test-drivers/vivid/vivid-kthread-touch.c +++ b/drivers/media/test-drivers/vivid/vivid-kthread-touch.c @@ -5,6 +5,7 @@ */
#include <linux/freezer.h> +#include <linux/jiffies.h> #include "vivid-core.h" #include "vivid-kthread-touch.h" #include "vivid-touch-cap.h" @@ -134,7 +135,7 @@ static int vivid_thread_touch_cap(void *data) next_jiffies_since_start = jiffies_since_start;
wait_jiffies = next_jiffies_since_start - jiffies_since_start; - while (jiffies - cur_jiffies < wait_jiffies && + while (time_is_after_jiffies(cur_jiffies + wait_jiffies) && !kthread_should_stop()) schedule(); } diff --git a/drivers/media/test-drivers/vivid/vivid-sdr-cap.c b/drivers/media/test-drivers/vivid/vivid-sdr-cap.c index 59fd508..f82856b --- a/drivers/media/test-drivers/vivid/vivid-sdr-cap.c +++ b/drivers/media/test-drivers/vivid/vivid-sdr-cap.c @@ -17,6 +17,7 @@ #include <media/v4l2-event.h> #include <media/v4l2-dv-timings.h> #include <linux/fixp-arith.h> +#include <linux/jiffies.h>
#include "vivid-core.h" #include "vivid-ctrls.h" @@ -205,7 +206,7 @@ static int vivid_thread_sdr_cap(void *data) next_jiffies_since_start = jiffies_since_start;
wait_jiffies = next_jiffies_since_start - jiffies_since_start; - while (jiffies - cur_jiffies < wait_jiffies && + while (time_is_after_jiffies(cur_jiffies + wait_jiffies) && !kthread_should_stop()) schedule(); }
dri-devel@lists.freedesktop.org