Received: by 2002:a05:6a10:a852:0:0:0:0 with SMTP id d18csp2938774pxy; Mon, 3 May 2021 11:17:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwU1mOoyo3xj+8fAkJLpbQpWbYZFBv+kK7wD23D7aFC/hqcgstbrAorhHf4x5QAll7DVSdJ X-Received: by 2002:a63:1c22:: with SMTP id c34mr19456750pgc.408.1620065469238; Mon, 03 May 2021 11:11:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620065469; cv=none; d=google.com; s=arc-20160816; b=XPrFVfKVqbkHweUMjGo4PpCqKHRbwLiYankQANoCQIpI4XONjfTgc2su2mmW1NSb3X baDDgVXdZTc/kyEDkUvBDkOOJGvHnZ8SS4S2UYFujupJxWHidaiKY7xz9NzcGsUzYE0h XBMpn/YYEETecrlmOmA78Eg1UZtycozUOUsa3MuhekwwNXQoAIT5d+P1oesAy02ojibi uvn63eT/ATWiya+SB5H1zQwRp3OCygJrBZcJtIsNgFtR/w7QMgzDLH6bK1g1gcQ65Vwx 7C0drlmFEOMwjC032TdOFIyUhrmiq+pxhzkn3W2BQV04lDhLWHfgR3Rh+keSxN9WHlXS 95mQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=4NoG7yaTfr3Ag07IElR2xxPrvYe9hfRf/DNNbGgeRNY=; b=TUNbv87yUte08ZwGvyBEjhHTjJaawv0/1KnlWEa1biat0lPM2h7Au4Lv5i7RXAMymn B85pd2JFMw3+vCvATJ7ewnsExzSe75hfsYX2J6LwhbScsrmBGtujRy7wpiyK1P3f0D1m Il5+h5QD9pBoAJnl4C0ZdUsaH3NBFMA3U5BOAAPm824kGqg5Nt6EsHAko8vwIiYqPg2K 5na/b0sSe0zDB4mevxorg7HW96SudXud5Pj2s7pC3epbJlukqg0o8kuRa/vfEWBV6y3C WizcWajhZael881+g1VOM5qEVe6RgZtrYrD6G/DB5dovEaEkD79GT7r0NG2c2u97BVWr ea5Q== 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 x6si14681315pfm.286.2021.05.03.11.10.56; Mon, 03 May 2021 11:11:09 -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 S231145AbhECQJW (ORCPT + 99 others); Mon, 3 May 2021 12:09:22 -0400 Received: from mout.kundenserver.de ([217.72.192.75]:47955 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230210AbhECQJV (ORCPT ); Mon, 3 May 2021 12:09:21 -0400 Received: from mail-wm1-f46.google.com ([209.85.128.46]) by mrelayeu.kundenserver.de (mreue107 [213.165.67.113]) with ESMTPSA (Nemesis) id 1N4h7p-1lWxI52Z1j-011nEf; Mon, 03 May 2021 18:08:26 +0200 Received: by mail-wm1-f46.google.com with SMTP id k4-20020a7bc4040000b02901331d89fb83so3824109wmi.5; Mon, 03 May 2021 09:08:26 -0700 (PDT) X-Gm-Message-State: AOAM531V/p+Kd8tUJwf5HIvQg1LXfkIK7Uns8T2Yi46cXrrlcPNWIQ/5 /0zto/t2nLrSYTS+Y3xgPMxpt5rJcNmG/TXsZjo= X-Received: by 2002:a7b:c846:: with SMTP id c6mr32166374wml.75.1620058106200; Mon, 03 May 2021 09:08:26 -0700 (PDT) MIME-Version: 1.0 References: <20210430111641.1911207-1-schnelle@linux.ibm.com> In-Reply-To: <20210430111641.1911207-1-schnelle@linux.ibm.com> From: Arnd Bergmann Date: Mon, 3 May 2021 18:07:41 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v4 0/3] asm-generic/io.h: Silence -Wnull-pointer-arithmetic warning on PCI_IOBASE To: Niklas Schnelle Cc: Vineet Gupta , "David S. Miller" , Nathan Chancellor , Nick Desaulniers , clang-built-linux , linux-arch , Linux Kernel Mailing List , linux-s390 , "open list:SYNOPSYS ARC ARCHITECTURE" , sparclinux Content-Type: text/plain; charset="UTF-8" X-Provags-ID: V03:K1:ttSkI0gIoMXApQ/NBgONSZBhlv+vaN7DOdJfzbslazuqcGkP+6H zYKG9HAdkR7tAYwUPZNv8X6mYjOFVpYg1Lhxzah2tOWyriam/QFjvSLRZcobJN6S8vbwTFc bepQ0B7o9Bs0sIEiZV5RHF9TzhIeVoroYF3/D7pUVCaWiXBSpeXIdCtCLdLr3otNnFjhJy7 /5x8cJck19z7A3E0ws28A== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:MuVa7V+jiQg=:RIpZ9QCoWYxQBrCcu2dzUS PIZ6R/5v5sSAxKQ+nuH/yVsu3Uox4mrrxgxRvsnKo1BNY2xYQgYoFyEwbNvBCZNjdtpjQQ5Op bTvJ3JO29LSMldV9WF1DeTDKZMkPawd5ZI+H2stUxS6nKDZF2UjKrY61DF5gXWWGdGVkivAhS Uckf0Ah3BCjv5b0quFY0QAEFz3f1PbqhcmlzEErbQFj1Yjt+8mvzSlepaXgVD+l67uWuanItU dhQCA9AoKBTSkKOLbwrmMa8ItR3LYcAvH7I8XJ2MwJl+ouTgJ51T3akf9zkIatNqrJ/n7qNgP K/LDindeju1wJ0m1nltOaJ2AoKPCGSzm4tAPS911fIRpr1SOTGz+/MP4Yhk7H3dzQ0BRWhSO/ AR+TXu5lqZQjrbYhDVsQfuijMU7zxjtz0mTKuk3CPnNM34h66JzXBfL7piWGN6tJoJFie8Drm yCGKpko2IeFw5JzPpQHT0xsNoeqP4U0QixWWzJQ7GjMip38EN1taKYgtY4YFA6OnzuKfcv7ks V9kecgcNEhQDk0FPfAlLpG/adqAIPMPmYM5t+2GBHQE1nQtAArN0pX8p27IKEpahwKaTZn77M CsFxrcSUu9665NQiWW6EcGGzznpWwM2tT1AamvpJXlGs/7XQwHTNkf8wx63InB6eSJq7Gw1YC hS5Y= Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 30, 2021 at 1:16 PM Niklas Schnelle wrote: > > From: Niklas Schnelle > > This is version 4 of my attempt to get rid of a clang > -Wnull-pointer-arithmetic warning for the use of PCI_IOBASE in > asm-generic/io.h. This was originally found on s390 but should apply to > all platforms leaving PCI_IOBASE undefined while making use of the inb() > and friends helpers from asm-generic/io.h. > > This applies cleanly and was compile tested on top of v5.12 for the > previously broken ARC, nds32, h8300 and risc-v architecture > > I did boot test this only on x86_64 and s390x the former implements > inb() itself while the latter would emit a WARN_ONCE() but no drivers > use inb(). This looks all fine to me, but with the merge window open right now, I can't add it into linux-next yet, and it wouldn't qualify as a bugfix for 5.13. Please resend them to me after -rc1 is out so I can merge it for 5.14 through the asm-generic tree. Please add two small changes to the changelog texts: - for patch 3, please include a 'Link: tag' to the lore archive of the previous discussion, that should cover any questions that people may have - for the risc-v patch, I would suggest explaining that this fixes an existing runtime bug, not just a compiler error: | This is already broken, as accessing a fixed I/O port number of | an ISA device on NOMMU RISC-V would turn into a NULL pointer | dereference. Feel free to either copy this, or use your own explanation. Arnd