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>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1486628746-23538-1-git-send-email-mars.cheng@mediatek.com>
Date:   Thu, 9 Feb 2017 16:25:46 +0800
From:   Mars Cheng <mars.cheng@...iatek.com>
To:     Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...hat.com>
CC:     CC Hwang <cc.hwang@...iatek.com>,
        Loda Chou <loda.chou@...iatek.com>,
        Miles Chen <miles.chen@...iatek.com>,
        Jades Shih <jades.shih@...iatek.com>,
        Yingjoe Chen <yingjoe.chen@...iatek.com>,
        My Chuang <my.chuang@...iatek.com>,
        <linux-kernel@...r.kernel.org>, <wsd_upstream@...iatek.com>,
        Mars Cheng <mars.cheng@...iatek.com>
Subject: [PATCH] perf/core: remove useless cast when comparing

since nr_cpu_ids and cpu are both int, remove the casting

Signed-off-by: Mars Cheng <mars.cheng@...iatek.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ