Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1680200ybt; Mon, 15 Jun 2020 06:49:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwnMDDw4Ddy/EBX3xEelD+nBln9NHB5BexW+rnTYn8u9/54HsxejDWcVmHH1nY7Qu2IOc9h X-Received: by 2002:a17:906:4009:: with SMTP id v9mr25307531ejj.481.1592228957090; Mon, 15 Jun 2020 06:49:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592228957; cv=none; d=google.com; s=arc-20160816; b=ZR0L9E+CyAiuCnl66N5C9qZS6J31ihzbDQF2/ujm8QJ8e/u5a+EmHj0M+ZYBqtzo8K S480uv13ZeelnyokIkySIVViugcYMHTVMoEzCrT8EV2Rr3BVbt969m5xR1NvS3MRKRZA 11FmCrwx+6ZNAe55qK8EUnWGkCXajWHPXJGXF9MXD7uVo7/CjTWNBFEVuOCuQ4LSjX0G tPU76jcP9sJiR9iMDXkZXhzywy8mpISXNGcmlSFk3rayiKgob4jdgRGc1r0HWZg7OjzK JL1MP8iU4tV+4sa4LqQA75eVfHKmM+U0Sa3KZoGcmGI5euLsPgw6s6/l10wmOeuc7mIb EPxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=5fbwAPFhj/t9OUXsbkBLa2lLyWbmpKqf/KaN0uZtDRI=; b=EtwGUuvY4ZtWewznCUPN8a9hd6osMs23PnzHwfsb+jr6rPFhIPFwf+5gf1xw7OUj2D SywjFa6U41dnjG3JCkBeJXchLO19nBLGpJZztmu4WO+ST7JskB+sMK89outtwfG80wH/ RJ3zUCwMV46dX73wwtnH1Qh7hZ5CC3h1gJnIUylfx/JLgYo35NE6fd7rwK07cmkIgdW3 7gB7KDzpqLfnp2TkN5dFCPaT3yWyCmOBToJxCruwetNmSc3Ap9P6cuidy0fFbQChPuK8 Wmzp7hwRGAzhHwZy56Jq/rnLRzZmj+/NEOFLfNZzhVwsxwElsIAMtwi8Cj3ySHOMTxtn 4z+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b=ed8Hh6W1; 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 v3si9506339eja.251.2020.06.15.06.48.54; Mon, 15 Jun 2020 06:49:17 -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; dkim=pass header.i=@ziepe.ca header.s=google header.b=ed8Hh6W1; 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 S1730051AbgFONq4 (ORCPT + 99 others); Mon, 15 Jun 2020 09:46:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59594 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729666AbgFONqx (ORCPT ); Mon, 15 Jun 2020 09:46:53 -0400 Received: from mail-qk1-x741.google.com (mail-qk1-x741.google.com [IPv6:2607:f8b0:4864:20::741]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 265ADC061A0E for ; Mon, 15 Jun 2020 06:46:52 -0700 (PDT) Received: by mail-qk1-x741.google.com with SMTP id w1so15712280qkw.5 for ; Mon, 15 Jun 2020 06:46:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=5fbwAPFhj/t9OUXsbkBLa2lLyWbmpKqf/KaN0uZtDRI=; b=ed8Hh6W19/qv58dB6PJ+JDjl39VwebBT6j8EE97r3JHHDfwiJzt2hWVj16rCe6/VyG TGS6SE6ptiPexO04eKRNwcc2SavSPpI4Y+CNvCCPSLOeqvoWAFB5eirFpEK6+oB0wHHn YzrrGXXq34tALTQcvCQ5jV7jNVPV1gaoA7dxV+Ww8bCsTfAxqZWkLH2X+TRnp6v1UY/n 5HvDJCpObIPTLoiUUvWm+Bh/6YdsUHOii7rZ0rTYrZCnagGu2eBunuySbs4KjAKcsich MHcryQhOUqxOkk25chIvq/NKjlr7ebKpn+uV5+YAUDcny6vx0EfBF5i2EahuqiwvnIGH ZLNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=5fbwAPFhj/t9OUXsbkBLa2lLyWbmpKqf/KaN0uZtDRI=; b=rAjc3FwNUGj3KQU5m/NO0DW6f/z2PXXaj2no0caT5c1UAYzXukbPSqgTtVT98GBBy/ kib7ouFwbF92qO0w55qJlenTiVTP0N359hhQDVcgLSyco1boHJ+QFS8R4Ul4w+tAg+sD pCvGzDH02yfgqbx2HeQhE7qXL1A78FQUBdGS5RuMt7AMXLpj1rwES3dVCCi0lmgmLhxM 6+U/4jg26I2L5LXiID/1uJoGrzCNwQSvNKqAKCE4EtbNCGscXVPp2IJLpNY2hTdXhQzC IdD9MXXyho6ZcNAeErB8Gu32IabkfYbgGoaUNgx2CXSDFXiREbmuk9udsmKJDKh0eD4t KvRA== X-Gm-Message-State: AOAM532yJKtScOx8xZTzvPDinZezvz8VEbrRTCz/Zf4+h2NddXTcdAyJ max8rlsw64VHi4E/z+n3Te2eqg== X-Received: by 2002:a37:bfc1:: with SMTP id p184mr15321144qkf.207.1592228811377; Mon, 15 Jun 2020 06:46:51 -0700 (PDT) Received: from ziepe.ca (hlfxns017vw-156-34-48-30.dhcp-dynamic.fibreop.ns.bellaliant.net. [156.34.48.30]) by smtp.gmail.com with ESMTPSA id 124sm10100237qkn.45.2020.06.15.06.46.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jun 2020 06:46:50 -0700 (PDT) Received: from jgg by mlx with local (Exim 4.93) (envelope-from ) id 1jkpRq-008aTM-EI; Mon, 15 Jun 2020 10:46:50 -0300 Date: Mon, 15 Jun 2020 10:46:50 -0300 From: Jason Gunthorpe To: refactormyself@gmail.com Cc: helgaas@kernel.org, bjorn@helgaas.com, skhan@linuxfoundation.org, linux-pci@vger.kernel.org, Vinod Koul , dmaengine@vger.kernel.org, Mike Marciniszyn , Dennis Dalessandro , Doug Ledford , linux-rdma@vger.kernel.org, Don Brace , "James E.J. Bottomley" , "Martin K. Petersen" , esc.storagedev@microsemi.com, linux-scsi@vger.kernel.org, Russell Currey , Sam Bobroff , Oliver O'Halloran , linuxppc-dev@lists.ozlabs.org, linux-kernel-mentees@lists.linuxfoundation.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 0/8 v2] PCI: Align return values of PCIe capability and PCI accessors Message-ID: <20200615134650.GA2030477@ziepe.ca> References: <20200615073225.24061-1-refactormyself@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200615073225.24061-1-refactormyself@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 15, 2020 at 09:32:17AM +0200, refactormyself@gmail.com wrote: > From: Bolarinwa Olayemi Saheed > > > PATCH 1/8 to 7/8: > PCIBIOS_ error codes have positive values and they are passed down the > call heirarchy from accessors. For functions which are meant to return > only a negative value on failure, passing on this value is a bug. > To mitigate this, call pcibios_err_to_errno() before passing on return > value from PCIe capability accessors call heirarchy. This function > converts any positive PCIBIOS_ error codes to negative generic error > values. > > PATCH 8/8: > The PCIe capability accessors can return 0, -EINVAL, or any PCIBIOS_ error > code. The pci accessor on the other hand can only return 0 or any PCIBIOS_ > error code.This inconsistency among these accessor makes it harder for > callers to check for errors. > Return PCIBIOS_BAD_REGISTER_NUMBER instead of -EINVAL in all PCIe > capability accessors. > > MERGING: > These may all be merged via the PCI tree, since it is a collection of > similar fixes. This way they all get merged at once. I prefer this not happen for active trees, it just risks needless merge conflicts. I will take the hfi1 patches at least, let me know when they are reviewed Thanks, Jason