From patchwork Mon Sep 21 13:33:45 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrzej Hajda X-Patchwork-Id: 7230481 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 299EFBEEC1 for ; Mon, 21 Sep 2015 13:39:34 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4B40020722 for ; Mon, 21 Sep 2015 13:39:33 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 50DCB2065B for ; Mon, 21 Sep 2015 13:39:32 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Ze1Gt-0000pW-RI; Mon, 21 Sep 2015 13:36:43 +0000 Received: from mailout4.w1.samsung.com ([210.118.77.14]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Ze1Gq-0000iv-O3 for linux-arm-kernel@lists.infradead.org; Mon, 21 Sep 2015 13:36:41 +0000 Received: from eucpsbgm1.samsung.com (unknown [203.254.199.244]) by mailout4.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0NV100J404GFPU40@mailout4.w1.samsung.com> for linux-arm-kernel@lists.infradead.org; Mon, 21 Sep 2015 14:36:15 +0100 (BST) X-AuditID: cbfec7f4-f79c56d0000012ee-ca-560007cf2413 Received: from eusync3.samsung.com ( [203.254.199.213]) by eucpsbgm1.samsung.com (EUCPMTA) with SMTP id 04.67.04846.FC700065; Mon, 21 Sep 2015 14:36:15 +0100 (BST) Received: from AMDC1061.digital.local ([106.116.147.88]) by eusync3.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0NV100LNT4DTKI10@eusync3.samsung.com>; Mon, 21 Sep 2015 14:36:15 +0100 (BST) From: Andrzej Hajda To: linux-kernel@vger.kernel.org Subject: [PATCH 13/38] ARM: shmobile: apmu: correct type of CPU id Date: Mon, 21 Sep 2015 15:33:45 +0200 Message-id: <1442842450-29769-14-git-send-email-a.hajda@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1442842450-29769-1-git-send-email-a.hajda@samsung.com> References: <1442842450-29769-1-git-send-email-a.hajda@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprOLMWRmVeSWpSXmKPExsVy+t/xq7rn2RnCDE6+krG4te4cq8XGGetZ LZq3fmW02PT4GqvF5V1z2Czm/JnCbLH2yF12iwer37I5cHjsnHWX3WPzknqPvi2rGD3m/PzG 4vF5k1wAaxSXTUpqTmZZapG+XQJXxqJfUQWr2SsWzz7B0sA4na2LkZNDQsBEYuuXS8wQtpjE hXvrgeJcHEICSxklnt49ywThNDFJrFh0hQmkik1AU+Lv5ptg3SICChKbe5+xghQxC8xikvi4 ZjM7SEJYwEniwfSJrCA2i4CqxPGm34xdjBwcvAIuEnNWWUJsk5M4eWwyWAknUPjAwS8sILaQ gLPEgSVHmCYw8i5gZFjFKJpamlxQnJSea6hXnJhbXJqXrpecn7uJERJcX3YwLj5mdYhRgINR iYfXQeB/qBBrYllxZe4hRgkOZiURXp1ZQCHelMTKqtSi/Pii0pzU4kOM0hwsSuK8c3e9DxES SE8sSc1OTS1ILYLJMnFwSjUwum5ZmFZR0+H1tZ1T/XMiw5QloQx6Jjd3HVOd9FJpz+vCyDYx 1zMHYvdOVJr5c+e/F+Up2641y/XNPXCPJZApZdfmWP9VXCXyLPGas9YaKHnfte4w235HO0JK 5f2WXadurY2+92zCxVnel+dXX0xm+ur9OUyz1rNe8WyUFg/zrqWcavVPZr0zU2Ipzkg01GIu Kk4EAApHxvQqAgAA X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150921_063641_016134_7A4A8FC7 X-CRM114-Status: GOOD ( 13.50 ) X-Spam-Score: -6.9 (------) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Bartlomiej Zolnierkiewicz , linux-sh@vger.kernel.org, Magnus Damm , Andrzej Hajda , Simon Horman , linux-arm-kernel@lists.infradead.org, Marek Szyprowski MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP CPU id can be negative, so it cannot be assigned to unsigned variable. The problem has been detected using proposed semantic patch scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci [1]. [1]: http://permalink.gmane.org/gmane.linux.kernel/2038576 Signed-off-by: Andrzej Hajda --- arch/arm/mach-shmobile/platsmp-apmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-shmobile/platsmp-apmu.c b/arch/arm/mach-shmobile/platsmp-apmu.c index 4e54512..292c67b 100644 --- a/arch/arm/mach-shmobile/platsmp-apmu.c +++ b/arch/arm/mach-shmobile/platsmp-apmu.c @@ -88,7 +88,7 @@ static void apmu_init_cpu(struct resource *res, int cpu, int bit) static void apmu_parse_cfg(void (*fn)(struct resource *res, int cpu, int bit), struct rcar_apmu_config *apmu_config, int num) { - u32 id; + int id; int k; int bit, index; bool is_allowed;