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 C025BC433ED for ; Tue, 18 May 2021 06:32:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 99B0F6124C for ; Tue, 18 May 2021 06:32:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240912AbhERGdz (ORCPT ); Tue, 18 May 2021 02:33:55 -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-kernel@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