lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Sat, 31 Jan 2015 11:52:14 +0100
From:	Nicholas Mc Guire <der.herr@...r.at>
To:	Larry Finger <Larry.Finger@...inger.net>
Cc:	Florian Schilhabel <florian.c.schilhabel@...glemail.com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	James A Shackleford <shack@...ux.com>,
	Aybuke Ozdemir <aybuke.147@...il.com>,
	Sarah Khan <sarahjmi07@...il.com>,
	Andreea-Cristina Bernat <bernat.ada@...il.com>,
	devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org,
	Nicholas Mc Guire <der.herr@...r.at>
Subject: [PATCH 2/2] staging: rtl8712: condition with no effect removed

The check for return of schedule_timeout() has no effect on the 
effective control flow of sleep_schedulable() so it can be dropped.

Signed-off-by: Nicholas Mc Guire <der.herr@...r.at>
---

The current codes return check for schedule_timeout() has no effect
and can probably be dropped unless it is intended as a placeholder
for some future change in which case a comment should probably be
added.

This patch was only compile tested for x86_64_defconfig +
CONFIG_STAGING=y, CONFIG_R8712U=m


Patch is against 3.0.19-rc6 -next-20150129 but depends on:
[PATCH 1/2] staging: rtl8712: cleanup of timeout conversions

 drivers/staging/rtl8712/osdep_service.h |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8712/osdep_service.h b/drivers/staging/rtl8712/osdep_service.h
index f933713..36348d9 100644
--- a/drivers/staging/rtl8712/osdep_service.h
+++ b/drivers/staging/rtl8712/osdep_service.h
@@ -103,8 +103,7 @@ static inline void sleep_schedulable(int ms)
 
 	delta = msecs_to_jiffies(ms);/*(ms)*/
 	set_current_state(TASK_INTERRUPTIBLE);
-	if (schedule_timeout(delta) != 0)
-		return;
+	schedule_timeout(delta);
 }
 
 static inline unsigned char _cancel_timer_ex(struct timer_list *ptimer)
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ