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: 7230981 X-Patchwork-Delegate: horms@verge.net.au Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id A3E0D9F380 for ; Mon, 21 Sep 2015 13:51:24 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DD0D720761 for ; Mon, 21 Sep 2015 13:51:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 038B420760 for ; Mon, 21 Sep 2015 13:51:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932270AbbIUNuo (ORCPT ); Mon, 21 Sep 2015 09:50:44 -0400 Received: from mailout4.w1.samsung.com ([210.118.77.14]:40457 "EHLO mailout4.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932099AbbIUNgS (ORCPT ); Mon, 21 Sep 2015 09:36:18 -0400 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>; 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 Cc: Andrzej Hajda , Bartlomiej Zolnierkiewicz , Marek Szyprowski , Simon Horman , Magnus Damm , linux-arm-kernel@lists.infradead.org, linux-sh@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 Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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;