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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3823FEB64DA for ; Wed, 14 Jun 2023 08:08:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; 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=83nqYZ5xY5BzpVx1GwmmKaXkuCT06ykVaVerpOFOsPY=; b=w2i1UX4li01BPE TE8lRMOik8uPoc3AA+v651guqjbyBTg47rLmPobIeMKVPGt8NwRwqhT3jFyOdpJQeYZqFGNJ7KDWK VVSdpCcU6GSZuluoIZHfmTqjbF/2nyMbscTG3gbIFSqNXIXZd24SODw6XMZoYsOeuv44bhTQ8z0Y3 t7p4VzPHXcFUnjR4Sj7Y+zQRHNN0Jnvruu+gwFNQjaTKI9Qafps4blukTG+88UuV86kEAqfhqQ7oc YRZ1Jvl6IZIfP30r3DrAty9r0ydMPKkRWmw2Rvn9a0BPU+dIspNrMLogvObEa/IcGamwc4E/WSljg O6h03wLx7tnVvRg9uemg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q9LXd-00Ap5T-1E; Wed, 14 Jun 2023 08:07:45 +0000 Received: from muru.com ([72.249.23.125]) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q9LXa-00Ap4i-1f for linux-arm-kernel@lists.infradead.org; Wed, 14 Jun 2023 08:07:43 +0000 Received: from localhost (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTPS id B59988027; Wed, 14 Jun 2023 08:07:41 +0000 (UTC) Date: Wed, 14 Jun 2023 11:07:40 +0300 From: Tony Lindgren To: "Gustavo A. R. Silva" Cc: Russell King , Peter 'p2' De Schrijver , Kevin Hilman , linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org Subject: Re: [PATCH][next] ARM: OMAP2+: Fix -Warray-bounds warning in _pwrdm_state_switch() Message-ID: <20230614080740.GH14287@atomide.com> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230614_010742_596384_5D8BC171 X-CRM114-Status: UNSURE ( 8.48 ) X-CRM114-Notice: Please train this message. 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 * Gustavo A. R. Silva [230608 07:11]: > If function pwrdm_read_prev_pwrst() returns -EINVAL, we will end > up accessing array pwrdm->state_counter through negative index > -22. This is wrong and the compiler is legitimately warning us > about this potential problem. > > Fix this by sanity checking the value stored in variable _prev_ > before accessing array pwrdm->state_counter. > > Address the following -Warray-bounds warning: > arch/arm/mach-omap2/powerdomain.c:178:45: warning: array subscript -22 is below array bounds of 'unsigned int[4]' [-Warray-bounds] Thanks applying into omap-for-v6.5/cleanup, seems this can wait for the merge window. Regards, Tony _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel