All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86: kernel/apb_timer.c: remove unnecessary "if"
@ 2013-01-14 21:39 Cong Ding
  2013-01-24 20:08 ` [tip:x86/platform] x86/apb/timer: Remove " tip-bot for Cong Ding
  0 siblings, 1 reply; 2+ messages in thread
From: Cong Ding @ 2013-01-14 21:39 UTC (permalink / raw)
  To: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, x86, Sasha Levin,
	linux-kernel
  Cc: Cong Ding

adev has no chance to be NULL, so we don't need to check it. it is also used
before the check in line 241.

Signed-off-by: Cong Ding <dinggnu@gmail.com>
---
 arch/x86/kernel/apb_timer.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/apb_timer.c b/arch/x86/kernel/apb_timer.c
index cc74fd0..c9876ef 100644
--- a/arch/x86/kernel/apb_timer.c
+++ b/arch/x86/kernel/apb_timer.c
@@ -240,7 +240,7 @@ static int apbt_cpuhp_notify(struct notifier_block *n,
 		dw_apb_clockevent_pause(adev->timer);
 		if (system_state == SYSTEM_RUNNING) {
 			pr_debug("skipping APBT CPU %lu offline\n", cpu);
-		} else if (adev) {
+		} else {
 			pr_debug("APBT clockevent for cpu %lu offline\n", cpu);
 			dw_apb_clockevent_stop(adev->timer);
 		}
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [tip:x86/platform] x86/apb/timer: Remove unnecessary "if"
  2013-01-14 21:39 [PATCH] x86: kernel/apb_timer.c: remove unnecessary "if" Cong Ding
@ 2013-01-24 20:08 ` tip-bot for Cong Ding
  0 siblings, 0 replies; 2+ messages in thread
From: tip-bot for Cong Ding @ 2013-01-24 20:08 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: linux-kernel, sasha.levin, hpa, mingo, dinggnu, tglx

Commit-ID:  b9975dabe3f0a6e4d1af52c47f66b5558df207a3
Gitweb:     http://git.kernel.org/tip/b9975dabe3f0a6e4d1af52c47f66b5558df207a3
Author:     Cong Ding <dinggnu@gmail.com>
AuthorDate: Mon, 14 Jan 2013 22:39:18 +0100
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Thu, 24 Jan 2013 13:03:26 +0100

x86/apb/timer: Remove unnecessary "if"

adev has no chance to be NULL, so we don't need to check it. It
is also dereferenced just before the check .

Signed-off-by: Cong Ding <dinggnu@gmail.com>
Cc: Sasha Levin <sasha.levin@oracle.com>
Link: http://lkml.kernel.org/r/1358199561-15518-1-git-send-email-dinggnu@gmail.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 arch/x86/kernel/apb_timer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/apb_timer.c b/arch/x86/kernel/apb_timer.c
index afdc3f75..cf92735 100644
--- a/arch/x86/kernel/apb_timer.c
+++ b/arch/x86/kernel/apb_timer.c
@@ -240,7 +240,7 @@ static int apbt_cpuhp_notify(struct notifier_block *n,
 		dw_apb_clockevent_pause(adev->timer);
 		if (system_state == SYSTEM_RUNNING) {
 			pr_debug("skipping APBT CPU %lu offline\n", cpu);
-		} else if (adev) {
+		} else {
 			pr_debug("APBT clockevent for cpu %lu offline\n", cpu);
 			dw_apb_clockevent_stop(adev->timer);
 		}

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-01-24 20:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-14 21:39 [PATCH] x86: kernel/apb_timer.c: remove unnecessary "if" Cong Ding
2013-01-24 20:08 ` [tip:x86/platform] x86/apb/timer: Remove " tip-bot for Cong Ding

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.