From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9C37AC433B4 for ; Tue, 18 May 2021 06:32:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 765C36124C for ; Tue, 18 May 2021 06:32:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239919AbhERGdy (ORCPT ); Tue, 18 May 2021 02:33:54 -0400 Received: from muru.com ([72.249.23.125]:56980 "EHLO muru.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236590AbhERGdy (ORCPT ); Tue, 18 May 2021 02:33:54 -0400 Received: from atomide.com (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTPS id 4FFFE80F5; Tue, 18 May 2021 06:32:40 +0000 (UTC) Date: Tue, 18 May 2021 09:32:33 +0300 From: Tony Lindgren To: Maciej Falkowski Cc: khilman@kernel.org, aaro.koskinen@iki.fi, linux@armlinux.org.uk, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com Subject: Re: [PATCH] ARM: OMAP: Fix use of possibly uninitialized irq variable Message-ID: References: <20210401161127.8942-1-maciej.falkowski9@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210401161127.8942-1-maciej.falkowski9@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org * Maciej Falkowski [210401 19:13]: > The current control flow of IRQ number assignment to `irq` variable > allows a request of IRQ of unspecified value, > generating a warning under Clang compilation with omap1_defconfig on linux-next: > > arch/arm/mach-omap1/pm.c:656:11: warning: variable 'irq' is used uninitialized whenever > 'if' condition is false [-Wsometimes-uninitialized] > else if (cpu_is_omap16xx()) > ^~~~~~~~~~~~~~~~~ > ./arch/arm/mach-omap1/include/mach/soc.h:123:30: note: expanded from macro 'cpu_is_omap16xx' > ^~~~~~~~~~~~~ > arch/arm/mach-omap1/pm.c:658:18: note: uninitialized use occurs here > if (request_irq(irq, omap_wakeup_interrupt, 0, "peripheral wakeup", > ^~~ > arch/arm/mach-omap1/pm.c:656:7: note: remove the 'if' if its condition is always true > else if (cpu_is_omap16xx()) > ^~~~~~~~~~~~~~~~~~~~~~ > arch/arm/mach-omap1/pm.c:611:9: note: initialize the variable 'irq' to silence this warning > int irq; > ^ > = 0 Thanks applying into fixes. Tony From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8B988C433B4 for ; Tue, 18 May 2021 06:34:22 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4F5CE6124C for ; Tue, 18 May 2021 06:34:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4F5CE6124C Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=atomide.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=UNsBpuxIKKU6xNiqnoOtE9rWKgsq4pPbhfxSBkuO5u4=; b=B2CWcIBDAm18kI+fWg9FMfsXx cvxolW42qQvDyY7zEM44hXtIFqCrQz7w37PDPe7RoN9kG1PfxISRDre4oybe13nIw/fp98Gpu1v07 /3BQqaMQwuzNQUIGhYeBszh4WT6yxGslyFhRn/ZBqHaeSL6a/kSMM208D17KolqmDQq0Q2K5jFsz3 7iuV7BSW9ewtKYU50lKo+9zM9XUiOwVVbkd1q2mcCBfGivnLCLzWV2YIKZQY+eB0fiOwPBBkJdPUu f8uzCQyySCL22QFh90/ZlZgGt4/IfjH9BXIFiYivqVAvyyToYzVD+6pM4FjJP/C5xQydz2GJWH11N sKXnPtmVg==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1litHW-00HAA6-7b; Tue, 18 May 2021 06:32:42 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1litHT-00HA9n-Ok for linux-arm-kernel@desiato.infradead.org; Tue, 18 May 2021 06:32:39 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=9rOkAOS1gITwJj1T1acE/o6zHu9WtCiqYTJWxUeEkII=; b=HgMIkIRvdEUapmy2OD0OS6jVKW M+eTD7es3wmMqm2nFHvSWvz6o/Ks4cFDN/xfE4Pgz9ube8lAgHThmovoo9BISqwMn1ShHI9ygQAHW 0xoP3z4HIml2Ypx1R83xOzwZiNcUEG30sDloAFUgWw/qFbFMzFxHRL1sQPMj9Qnu8rE1mDjWJ5Ivt JgZ8f+Yc6ifS3R7aU0aXzlw8tVKZoG3ADzMr0+1xg0MAyk64MCZNHgu8Vobt7gUzV1Peq63zYXBqf RF+OHR2VP/sCaRQJqE4VrvsINT8DJH15dBXtw2phYR2QZB5j960NAGUuFeC4qvdXmBZWwq2JhNAEO d0BBO46w==; Received: from muru.com ([72.249.23.125]) by bombadil.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1litHR-00ELzT-7e for linux-arm-kernel@lists.infradead.org; Tue, 18 May 2021 06:32:38 +0000 Received: from atomide.com (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTPS id 4FFFE80F5; Tue, 18 May 2021 06:32:40 +0000 (UTC) Date: Tue, 18 May 2021 09:32:33 +0300 From: Tony Lindgren To: Maciej Falkowski Cc: khilman@kernel.org, aaro.koskinen@iki.fi, linux@armlinux.org.uk, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com Subject: Re: [PATCH] ARM: OMAP: Fix use of possibly uninitialized irq variable Message-ID: References: <20210401161127.8942-1-maciej.falkowski9@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210401161127.8942-1-maciej.falkowski9@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210517_233237_333689_D18F1801 X-CRM114-Status: GOOD ( 10.60 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org * Maciej Falkowski [210401 19:13]: > The current control flow of IRQ number assignment to `irq` variable > allows a request of IRQ of unspecified value, > generating a warning under Clang compilation with omap1_defconfig on linux-next: > > arch/arm/mach-omap1/pm.c:656:11: warning: variable 'irq' is used uninitialized whenever > 'if' condition is false [-Wsometimes-uninitialized] > else if (cpu_is_omap16xx()) > ^~~~~~~~~~~~~~~~~ > ./arch/arm/mach-omap1/include/mach/soc.h:123:30: note: expanded from macro 'cpu_is_omap16xx' > ^~~~~~~~~~~~~ > arch/arm/mach-omap1/pm.c:658:18: note: uninitialized use occurs here > if (request_irq(irq, omap_wakeup_interrupt, 0, "peripheral wakeup", > ^~~ > arch/arm/mach-omap1/pm.c:656:7: note: remove the 'if' if its condition is always true > else if (cpu_is_omap16xx()) > ^~~~~~~~~~~~~~~~~~~~~~ > arch/arm/mach-omap1/pm.c:611:9: note: initialize the variable 'irq' to silence this warning > int irq; > ^ > = 0 Thanks applying into fixes. Tony _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel