Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp4511176rwb; Sat, 21 Jan 2023 13:35:21 -0800 (PST) X-Google-Smtp-Source: AMrXdXtAbSoyGGMsi/5eMw8wJTK/xwVb1zM3UnwddEWbB6NEh8lf97JPXFJhsxt0s6VNfwyYWxkh X-Received: by 2002:a17:902:f2ca:b0:193:2303:c9e5 with SMTP id h10-20020a170902f2ca00b001932303c9e5mr17664923plc.20.1674336920858; Sat, 21 Jan 2023 13:35:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674336920; cv=none; d=google.com; s=arc-20160816; b=TEjsECE0FpnZVl1mTCcAaKOgQsOd+t939O+VkO3lxp6PFgc7TcP06GlkkC6zTHLAhs RwIXa5YmEyxIEb2vzIlTmOc0ehzlHjf58DAetOMnfRExyJsb5/PUvGjPQJFF9tCNzCcW x3KyHAXRCxZiF7/PIN1bMBRHS/TIT+16eOxkikZkziS6wUXM5mK7j27N98KgEtvhaU+u y9CTPo2TapaIsW+icX/XLbwaQECo1DBHpsf8MwgQZ3pgyXmD/2R7PgrEsKSlYdAEDUnL fY0YG5chiz80frA69v8kGuqdmOVy6UWXdbCeT990BVY/kr5ETgAPdYBEuTcyRJh74xu1 rucg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=yhmwtE13OOMQNJIh4iCnBh8C5pkGPy9ns1M5J9HbuAU=; b=EIza/hG2BEapedows8OZBg3hjb3AFvJthgV5YWhEITIXDujmOQXTRA0jVAZUp/hjWK M3x14xNANh2mtEwDFmaS36wKWF+OQC9HfUWfcmAvsOiI3tqscpkmWq9OFR5DJCQtXnuJ D88m7QHKawnwaiOaoIYHGYqaYqpppTzoXqsRbtd+73HR99v8SReFPCQ+jwkAYZ+SGX8r 2w/+9SlXzGI69eFvoU+e0HUvpigY51/uxG+nW1Jp3lps8DrKVf3j0MLanL6J1mx6s+7f CZEV36XY+dJZruCXvFg7uOnsC8b0WD7io0feJie4pGq8OvRtw7n+yM5VAOF1bLQLWZTY 5UMw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d18-20020a170902ced200b001948d9c2ca8si22050905plg.179.2023.01.21.13.35.09; Sat, 21 Jan 2023 13:35:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229752AbjAUV0v (ORCPT + 63 others); Sat, 21 Jan 2023 16:26:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60768 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229526AbjAUV0u (ORCPT ); Sat, 21 Jan 2023 16:26:50 -0500 Received: from outpost1.zedat.fu-berlin.de (outpost1.zedat.fu-berlin.de [130.133.4.66]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ED1531DBA8; Sat, 21 Jan 2023 13:26:48 -0800 (PST) Received: from inpost2.zedat.fu-berlin.de ([130.133.4.69]) by outpost.zedat.fu-berlin.de (Exim 4.95) with esmtps (TLS1.3) tls TLS_AES_256_GCM_SHA384 (envelope-from ) id 1pJLNr-001fc4-Li; Sat, 21 Jan 2023 22:26:43 +0100 Received: from dynamic-089-012-154-190.89.12.pool.telefonica.de ([89.12.154.190] helo=[192.168.1.11]) by inpost2.zedat.fu-berlin.de (Exim 4.95) with esmtpsa (TLS1.3) tls TLS_AES_128_GCM_SHA256 (envelope-from ) id 1pJLNr-001xPR-F4; Sat, 21 Jan 2023 22:26:43 +0100 Message-ID: <7c6b114a-38f8-1a0b-8623-d492f9cc2fb9@physik.fu-berlin.de> Date: Sat, 21 Jan 2023 22:26:42 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 Subject: Re: Calculating array sizes in C - was: Re: Build regressions/improvements in v6.2-rc1 Content-Language: en-US To: Michael Karcher , Geert Uytterhoeven Cc: linux-kernel@vger.kernel.org, amd-gfx@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org, linux-mips@vger.kernel.org, linux-wireless@vger.kernel.org, linux-sh@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linuxppc-dev@lists.ozlabs.org, kasan-dev@googlegroups.com, linux-xtensa@linux-xtensa.org, Arnd Bergmann References: <20221227082932.798359-1-geert@linux-m68k.org> <3800eaa8-a4da-b2f0-da31-6627176cb92e@physik.fu-berlin.de> <429140e0-72fe-c91c-53bc-124d33ab5ffa@physik.fu-berlin.de> <0d238f02-4d78-6f14-1b1b-f53f0317a910@physik.fu-berlin.de> <1732342f-49fe-c20e-b877-bc0a340e1a50@fu-berlin.de> From: John Paul Adrian Glaubitz In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Original-Sender: glaubitz@physik.fu-berlin.de X-Originating-IP: 89.12.154.190 X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Hi! On 1/20/23 20:29, Michael Karcher wrote: > Hello Adrian, >> Could you post a kernel patch for that? I would be happy to test it on my >> SH-7785CLR board. Also, I'm going to file a bug report against GCC. > > I filed the bug already. It's https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108483. > > The diff is attached. It's published as CC0 in case anyone considers this trivial change copyrightable. This patch prevents this one specific warning from being upgraded to "error" even if you configure the kernel to use "-Werror". It still keeps it active as warning, though. I used the following variant and it fixes the issue for me: diff --git a/arch/sh/Makefile b/arch/sh/Makefile index 5c8776482530..11b22f7167d2 100644 --- a/arch/sh/Makefile +++ b/arch/sh/Makefile @@ -167,7 +167,7 @@ drivers-y += arch/sh/drivers/ cflags-y += $(foreach d, $(cpuincdir-y), -I $(srctree)/arch/sh/include/$(d)) \ $(foreach d, $(machdir-y), -I $(srctree)/arch/sh/include/$(d)) -KBUILD_CFLAGS += -pipe $(cflags-y) +KBUILD_CFLAGS += -pipe -Wno-error=sizeof-pointer-div $(cflags-y) KBUILD_CPPFLAGS += $(cflags-y) KBUILD_AFLAGS += $(cflags-y) If you agree, can you post a patch to LKML so we can unbreak the SH build for CONFIG_WERROR? Thanks, Adrian -- .''`. John Paul Adrian Glaubitz : :' : Debian Developer `. `' Physicist `- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913