Commit 917ab47f authored by Michalis Pappas's avatar Michalis Pappas Committed by Greg Kroah-Hartman
Browse files

staging: gdm72xx: Replace comparisons on jiffies values with wrap-safe functions



Fixes the following checkpatch.pl issue:

WARNING: Comparing jiffies is almost always wrong; prefer time_after,
time_before and friends

Signed-off-by: default avatarMichalis Pappas <mpappas@fastmail.fm>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent d0a3956f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -730,7 +730,7 @@ static int k_mode_thread(void *arg)
			spin_unlock_irqrestore(&k_lock, flags2);

			expire = jiffies + K_WAIT_TIME;
			while (jiffies < expire)
			while (time_before(jiffies, expire))
				schedule_timeout(K_WAIT_TIME);

			spin_lock_irqsave(&rx->lock, flags);
+2 −2
Original line number Diff line number Diff line
@@ -41,11 +41,11 @@ static u8 *tx_buf;

static int ack_ready(struct sdio_func *func)
{
	unsigned long start = jiffies;
	unsigned long wait = jiffies + HZ;
	u8 val;
	int ret;

	while ((jiffies - start) < HZ) {
	while (time_before(jiffies, wait)) {
		val = sdio_readb(func, 0x13, &ret);
		if (val & 0x01)
			return 1;