From patchwork Thu Oct 15 00:33:52 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Horman X-Patchwork-Id: 7400811 Return-Path: X-Original-To: patchwork-linux-sh@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 917C1BF90C for ; Thu, 15 Oct 2015 02:41:38 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D37AE2076A for ; Thu, 15 Oct 2015 02:41:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 992ED20785 for ; Thu, 15 Oct 2015 02:41:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753479AbbJOClg (ORCPT ); Wed, 14 Oct 2015 22:41:36 -0400 Received: from kirsty.vergenet.net ([202.4.237.240]:34146 "EHLO kirsty.vergenet.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753332AbbJOClf (ORCPT ); Wed, 14 Oct 2015 22:41:35 -0400 Received: from reginn.isobedori.kobe.vergenet.net (p2250-ipbfp1101kobeminato.hyogo.ocn.ne.jp [122.22.210.250]) by kirsty.vergenet.net (Postfix) with ESMTPA id 609C025B830; Thu, 15 Oct 2015 11:33:57 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=verge.net.au; s=mail; t=1444869237; bh=oKed5XiEl3j6c0VChJd9Hoh3Zim+efkzytFogZnNrwM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gRLyQmNRgNxf7qOGGaltE/Ca45L/QIsjls1DAEY62ev4GbTk4RwJLUpLU4WOS3Mro SfqUlUARPyfH8Ngb2wt+yTFswHtTj5GEx+SSqVWrNJCR3y3CIfgWQgZa2CcArLK+NP wE5rBoKSBYTM8c9KvrU8/zTnzHlByyvYhNLHXkUk= Received: by reginn.isobedori.kobe.vergenet.net (Postfix, from userid 7100) id 0B99C940574; Thu, 15 Oct 2015 09:33:56 +0900 (JST) From: Simon Horman To: linux-sh@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, Magnus Damm , Andrzej Hajda , Simon Horman Subject: [PATCH 4/6] ARM: shmobile: apmu: correct type of CPU id Date: Thu, 15 Oct 2015 09:33:52 +0900 Message-Id: <6e67d2ccb8b5ac6dbc6a0cfdf8320d68fa289193.1444868660.git.horms+renesas@verge.net.au> X-Mailer: git-send-email 2.1.4 In-Reply-To: References: 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.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID,T_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 From: Andrzej Hajda 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 Signed-off-by: Simon Horman --- 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 bcf4cc51b926..911884f7e28b 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;