Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp1402292pxv; Fri, 2 Jul 2021 02:59:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxAxIpyJvIvLKcULxMYci1L+YK7+n+bFcK6iATgOgLcUOVRkPu6bg2Et4+B4D1+bhZWM6eJ X-Received: by 2002:a02:cb8d:: with SMTP id u13mr3552598jap.19.1625219969359; Fri, 02 Jul 2021 02:59:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625219969; cv=none; d=google.com; s=arc-20160816; b=TWkLRIif30OwvKj6tzYmv0oA3RCCQrK1M/lnjnDkn1++mLv5g1cuW7Muu7mMGpJUwA N726518iLGTEL0dgKZSq/5ygxgD+6kAGaZQRt+8N9dxenbx0Hju6OCTljvTQxge0QRA2 iyKfTIADCuoPR8/tb/ao/aFJFOou1hAPRn+Y68e7WS8vxch1GVw1tmW6jNMkOo4MTIhX EteyqY4nTLS4unn0Vft/BFqi3az+h76zVaBMFRFl1lKIV7rJsifblJCSmd5mD1adhxQP 61k6LOQnX2LKqP0eDViWC8Un/WEhq80tWLGAzokIQh0l/ifSoCAK2Wl4Nm4eKWg2YcUa ZmSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=enyGi49ZkqCEixUCKU4+0nqcLdW1Vh260n22Bmnayig=; b=nK8iZydCKUs4jk3RoDsWvCDDQqH/MLBOP1fHeMt9SgZvoxb3vt8D1CiRK4AzqBA9SB zuRkfHANxcc2e1o2GdNMk6j1DruGJr4P0R4hICZ2uflMXY3CBE9QOaGwvM3Fyonmhz1y ZI7te5CNjJnSHbBJy2kLMOPfLLKM2YHavvCJoCJaUCEyJfPaQpGMhpfEDRSUeAm2dcmF 8p5fBHGR0RH8FPtS45TgTtf1wmSTVMZd0476Nn+Obgrgvj18cfnBbWqq+KmisA6laP1Y s0thfb7C/tki3RXvqX4ADcdovDLeLnBClArPACJhMtrn3qFRiGlW/odAkQktBqwAgihn hiIg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u4si3012642jak.4.2021.07.02.02.59.12; Fri, 02 Jul 2021 02:59:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231134AbhGBJ16 (ORCPT + 99 others); Fri, 2 Jul 2021 05:27:58 -0400 Received: from outpost1.zedat.fu-berlin.de ([130.133.4.66]:37215 "EHLO outpost1.zedat.fu-berlin.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230388AbhGBJ16 (ORCPT ); Fri, 2 Jul 2021 05:27:58 -0400 Received: from inpost2.zedat.fu-berlin.de ([130.133.4.69]) by outpost.zedat.fu-berlin.de (Exim 4.94) with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (envelope-from ) id 1lzFQG-002aEM-Gp; Fri, 02 Jul 2021 11:25:20 +0200 Received: from p57bd964c.dip0.t-ipconnect.de ([87.189.150.76] helo=[192.168.178.81]) by inpost2.zedat.fu-berlin.de (Exim 4.94) with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (envelope-from ) id 1lzFQG-004BfI-AA; Fri, 02 Jul 2021 11:25:20 +0200 Subject: Re: [PATCH 3/3 v2] sh: fix READ/WRITE redefinition warnings To: Geert Uytterhoeven Cc: Randy Dunlap , Linux Kernel Mailing List , Yoshinori Sato , Rich Felker , Linux-sh list , Takashi YOSHII , Arnd Bergmann References: <20210627220544.8757-1-rdunlap@infradead.org> <20210627220544.8757-4-rdunlap@infradead.org> <6af41806-e715-4084-418f-4a8924d26c07@physik.fu-berlin.de> <8efd6e1d-9949-9598-9e6b-41d9b2f4ea7a@infradead.org> From: John Paul Adrian Glaubitz Message-ID: <85485961-4c6e-a1bc-d66a-19869b5a03f1@physik.fu-berlin.de> Date: Fri, 2 Jul 2021 11:25:19 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Original-Sender: glaubitz@physik.fu-berlin.de X-Originating-IP: 87.189.150.76 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Geert! On 7/1/21 10:41 AM, Geert Uytterhoeven wrote: >>> OK. Thanks for all of the testing. >> >> I'll report back with the other patch applied that Geert mentioned from linux-next before this one. > > FTR, I booted all three successfully on qemu/rts7751r2d and on physical landisk. Good to know, thanks. >> FWIW, there are some warnings when building the SH-7785LCR configuration: >> >> In file included from ./arch/sh/include/asm/hw_irq.h:6, >> from ./include/linux/irq.h:591, >> from ./include/asm-generic/hardirq.h:17, >> from ./arch/sh/include/asm/hardirq.h:9, >> from ./include/linux/hardirq.h:11, >> from ./include/linux/interrupt.h:11, >> from ./include/linux/serial_core.h:13, >> from ./include/linux/serial_sci.h:6, >> from arch/sh/kernel/cpu/sh4a/setup-sh7785.c:10: >> ./include/linux/sh_intc.h:100:63: warning: division 'sizeof (void *) / sizeof (void)' does not compute the number of array elements [-Wsizeof-pointer-div] >> 100 | #define _INTC_ARRAY(a) a, __same_type(a, NULL) ? 0 : sizeof(a)/sizeof(*a) >> | ^ >> ./include/linux/sh_intc.h:107:9: note: in expansion of macro '_INTC_ARRAY' >> 107 | _INTC_ARRAY(sense_regs), _INTC_ARRAY(ack_regs), \ >> | ^~~~~~~~~~~ >> ./include/linux/sh_intc.h:124:15: note: in expansion of macro 'INTC_HW_DESC' >> 124 | .hw = INTC_HW_DESC(vectors, groups, mask_regs, \ >> | ^~~~~~~~~~~~ >> arch/sh/kernel/cpu/sh4a/setup-sh7785.c:478:8: note: in expansion of macro 'DECLARE_INTC_DESC' >> 478 | static DECLARE_INTC_DESC(intc_desc, "sh7785", vectors, groups, >> | ^~~~~~~~~~~~~~~~~ > > A while ago, I had a look into fixing them, but it was non-trivial. > The issue is that the macros are sometimes used with NULL pointer arrays. > The __same_type() check in > > #define _INTC_ARRAY(a) a, __same_type(a, NULL) ? 0 : sizeof(a)/sizeof(*a) > > is supposed to catch that, but modern compilers seem to evaluate the > non-taken branch, too, leading to the warning. > > Anyone with a suggestion? (CCing the multi-compiler guru) Ah, thanks for the explanation. Adrian -- .''`. John Paul Adrian Glaubitz : :' : Debian Developer - glaubitz@debian.org `. `' Freie Universitaet Berlin - glaubitz@physik.fu-berlin.de `- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913