public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] perf/core: remove useless cast when comparing
@ 2017-02-09  8:25 Mars Cheng
  2017-02-09 10:11 ` Peter Zijlstra
  2017-02-13  2:38 ` [lkp-robot] [perf/core] bc2a73c243: WARNING:at_include/linux/cpumask.h:#find_get_context kernel test robot
  0 siblings, 2 replies; 3+ messages in thread
From: Mars Cheng @ 2017-02-09  8:25 UTC (permalink / raw)
  To: Peter Zijlstra, Ingo Molnar
  Cc: CC Hwang, Loda Chou, Miles Chen, Jades Shih, Yingjoe Chen,
	My Chuang, linux-kernel, wsd_upstream, Mars Cheng

since nr_cpu_ids and cpu are both int, remove the casting

Signed-off-by: Mars Cheng <mars.cheng@mediatek.com>
---
 kernel/events/core.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/events/core.c b/kernel/events/core.c
index ab15509..3482342 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -9085,7 +9085,7 @@ static void account_event(struct perf_event *event)
 	struct hw_perf_event *hwc;
 	long err = -EINVAL;
 
-	if ((unsigned)cpu >= nr_cpu_ids) {
+	if (cpu >= nr_cpu_ids) {
 		if (!task || cpu != -1)
 			return ERR_PTR(-EINVAL);
 	}
-- 
1.7.9.5

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

end of thread, other threads:[~2017-02-13  2:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-09  8:25 [PATCH] perf/core: remove useless cast when comparing Mars Cheng
2017-02-09 10:11 ` Peter Zijlstra
2017-02-13  2:38 ` [lkp-robot] [perf/core] bc2a73c243: WARNING:at_include/linux/cpumask.h:#find_get_context kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox