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=-10.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham 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 16928C433E0 for ; Fri, 26 Mar 2021 13:42:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B19BD61A21 for ; Fri, 26 Mar 2021 13:42:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230198AbhCZNmK (ORCPT ); Fri, 26 Mar 2021 09:42:10 -0400 Received: from foss.arm.com ([217.140.110.172]:59498 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230209AbhCZNlf (ORCPT ); Fri, 26 Mar 2021 09:41:35 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 7649A143D; Fri, 26 Mar 2021 06:41:34 -0700 (PDT) Received: from bogus (unknown [10.57.54.194]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 6535E3F7D7; Fri, 26 Mar 2021 06:41:33 -0700 (PDT) Date: Fri, 26 Mar 2021 13:41:31 +0000 From: Sudeep Holla To: Arnd Bergmann Cc: Linus Walleij , Sudeep Holla , Viresh Kumar , Arnd Bergmann , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] ARM: vexpress: spc: fix uniprocessor initialization Message-ID: <20210326134131.bftspszcwixrkomt@bogus> References: <20210323125649.1930186-1-arnd@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210323125649.1930186-1-arnd@kernel.org> User-Agent: NeoMutt/20171215 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Arnd, Sorry for the delay On Tue, Mar 23, 2021 at 01:56:38PM +0100, Arnd Bergmann wrote: > From: Arnd Bergmann > > When CONFIG_SMP is disabled, topology_physical_package_id() > returns -1 and gcc notices undefined behavior: > > arch/arm/mach-versatile/spc.c: In function 've_spc_clk_init': > arch/arm/mach-versatile/spc.c:583:21: error: array subscript -1 is below array bounds of 'bool[2]' {aka '_Bool[2]'} [-Werror=array-bounds] > 583 | if (init_opp_table[cluster]) > | ~~~~~~~~~~~~~~^~~~~~~~~ > arch/arm/mach-versatile/spc.c:556:7: note: while referencing 'init_opp_table' > 556 | bool init_opp_table[MAX_CLUSTERS] = { false }; > | ^~~~~~~~~~~~~~ > > It's not clear to me what the correct behavior should be, but > it seems safe to just not continue with the initialization. > I don't have any other patches for vexpress platform or driver support. Can you apply this directly ? Assuming that, Acked-by: Sudeep Holla -- Regards, Sudeep