Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp785809ybh; Wed, 15 Jul 2020 15:30:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwmlkkC0OksLG1DJOPryBLuoWeNten36rYa8KDqK4zgHhfnx35zzeL/IlFrRlMwHAOJCb7a X-Received: by 2002:aa7:cf02:: with SMTP id a2mr1747980edy.263.1594852258015; Wed, 15 Jul 2020 15:30:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594852258; cv=none; d=google.com; s=arc-20160816; b=U1N+IKyPRxnPNWJ5KTuh2v5QV39++FnVtydEefPBVmQqf07rsyxF9kgfyepg/+bjis 7zjFm8+bw7MjOBj/qg4xDdIeEFIsAJ/KCe8+erItp03NAp/XzIlhhwb7dSNRHMa2SaCV jr+ugP87NsLC7oj/ECG/tchDNCK/ulIMHZbt4F8mXYzSXdk6NYnqwPQF1KqyyP/iEyp4 k1yER4ECI89IwQy7CFtzRUFQkngtecF/0iqurbXwrHW5EnEX3QBU7vRjrrihqV5q8pLb lnR3zunglwRgfJe7e49lhvVEBVk9a87DFRc4wJIy5rMb4eTt8JgvoRPBluIxt3MDeZI6 PAkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id; bh=nSXXVam+QC9K1mjlKyUohj5VX5Gja/wXJimXdSWIxT8=; b=KsQY73uUhqOpAO1newbFDLiaTQPAuxdwrCRUUd+K2NXX442xod0er0r4kyj8O6Tv6y LupEn1Kfoy3otT2N6o1324b3BYSid7zrDl6cTaoT+x+0pky3ZLC7WlqOVUwy18UupDb8 joOQ9wVD9sfIanprvXLlHGAs/JfIhboXHnbtFG85tkkXF4GeI7XvlX3r1s8M/3EWlYBt UNGDRV2LZUtqagZbXj7LtJ77ZQgDwrZcVW4HWG8WvrrTHQ49+m03dbbs+NjMRMBu9CoA P99Cu2sZwxjIHhifGsFUBadroU+Lojy/+eks4WbmWy3yFWyLI9915Q2TBg89Wx72BtXx TaYA== 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 e13si2189938edn.432.2020.07.15.15.30.35; Wed, 15 Jul 2020 15:30:57 -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 S1726968AbgGOWaR (ORCPT + 99 others); Wed, 15 Jul 2020 18:30:17 -0400 Received: from kernel.crashing.org ([76.164.61.194]:37602 "EHLO kernel.crashing.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726479AbgGOWaQ (ORCPT ); Wed, 15 Jul 2020 18:30:16 -0400 Received: from localhost (gate.crashing.org [63.228.1.57]) (authenticated bits=0) by kernel.crashing.org (8.14.7/8.14.7) with ESMTP id 06FMQfq2014030 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 15 Jul 2020 17:26:45 -0500 Message-ID: <627b214e6fc0624093caa8155d7006de111aacfb.camel@kernel.crashing.org> Subject: Re: [RFC PATCH 00/35] Move all PCIBIOS* definitions into arch/x86 From: Benjamin Herrenschmidt To: Arnd Bergmann , Bjorn Helgaas Cc: "Saheed O. Bolarinwa" , bjorn@helgaas.com, Shuah Khan , linux-pci , linux-kernel-mentees@lists.linuxfoundation.org, "linux-kernel@vger.kernel.org" , Richard Henderson , Ivan Kokshaysky , Matt Turner , Greg Ungerer , Geert Uytterhoeven , Russell King , Boris Ostrovsky , Juergen Gross , Thomas Bogendoerfer , Michael Ellerman , Paul Mackerras , linuxppc-dev , "David S. Miller" , sparclinux , Guenter Roeck , Greg Kroah-Hartman , Heiner Kallweit , Jakub Kicinski , Keith Busch , Jens Axboe , Christoph Hellwig , Sagi Grimberg , Lorenzo Pieralisi , Rob Herring , Bjorn Helgaas , Kevin Hilman , Philipp Zabel , Jingoo Han , Gustavo Pimentel , Toan Le , Ray Jui , Scott Branden , Ley Foon Tan , Marek Vasut , Kjetil Oftedal Date: Thu, 16 Jul 2020 08:26:40 +1000 In-Reply-To: References: <20200714234625.GA428442@bjorn-Precision-5520> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5-0ubuntu0.18.04.2 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2020-07-15 at 08:47 +0200, Arnd Bergmann wrote: > drivers/misc/cardreader/rts5261.c: retval = > rtsx_pci_write_config_dword(pcr, PCR_SETTING_REG2, lval); > > That last one is interesting because I think this is a case in which > we > actually want to check for errors, as the driver seems to use it > to ensure that accessing extended config space at offset 0x814 > works before relying on the value. Unfortunately the implementation > seems buggy as it a) keeps using the possibly uninitialized value > after > printing a warning and b) returns the PCIBIOS_* value in place of a > negative errno and then ignores it in the caller. In cases like this, usually checking against ~0 is sufficient Cheers, Ben.