Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp3735244pxb; Wed, 13 Oct 2021 11:51:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyr2UgB3p3xdq8Mz0iF1gHXL5eg+CvwQKn0t7+CFqkcebnBc8W5oLoVSmw8U0Tvb80hSP8I X-Received: by 2002:a17:906:1287:: with SMTP id k7mr1104889ejb.342.1634151086789; Wed, 13 Oct 2021 11:51:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634151086; cv=none; d=google.com; s=arc-20160816; b=ZL73Y5xhZdz10FK9dm271UzTbvFirkGldOJmnnZwQeIJoOgIF302G98OHTyE3LEnOe Fx2ruYGc/q8kCvOZUNATovR6nHIjrD7AvJdAfz0kRftgYKHksFgenBwynyFFPVlE+hnR 8ihXDouOSMcOPZeUL7eqAs8fYIIOw5Zbzp9W6LUhqbPtoaq31fvPPLTUbmSJF+X9lTLF rIBr4xyCw2pgVfYYEyJvUVSDqN8kXn8LXZzUq8BtuO5zFOlnGzSJrkPtSHKJtZD+IXbH RcQFFyo/hhaimc6L9SNcE4VZPtD1eJn3v019cG+dmjqBPrPExKFA/hInSmaVt47CxxCB EXBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :message-id:subject:cc:to:from:date:dkim-signature; bh=TtCXHLCzO/7e95cqOlXF7vN+Oz4CjgMnRvsqKvC5Gsk=; b=kY/MyILBptRZBSlMEhjH6nMRMR4AEGxsUN7htKQ6O1DriP2OycYB3kj3OPpQNXSkKc tE1wX16qbNw1n367jC+MsiVnqmX71Qa/5kYTOg/ReGPbhL3emDTIVGi00YAhdjRUzXVg 3d1RTgsiQ+TMpMiceuyIKzmp8y4eFiSwK/7qpgdcE/TRp1lAkuLtWHTkDHCyMb5DwYen jTvGd86YdLAhT8S6HMawOooL/d+C0rBEq/BecZyLxfDT0z7NG/oE6ieMZ/UHSfZSigYp JpcPvt7gj2/ly9lSSOrc4R6jD7VZagyEb3N2ulXnQT2l//axVhoJ6KdoG3GlfSZUS17h w+ag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=V453JicK; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id eg33si405037edb.163.2021.10.13.11.51.02; Wed, 13 Oct 2021 11:51:26 -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=@kernel.org header.s=k20201202 header.b=V453JicK; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238765AbhJMSus (ORCPT + 99 others); Wed, 13 Oct 2021 14:50:48 -0400 Received: from mail.kernel.org ([198.145.29.99]:40820 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238777AbhJMSup (ORCPT ); Wed, 13 Oct 2021 14:50:45 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 3E79F61130; Wed, 13 Oct 2021 18:48:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1634150921; bh=ivRTxznM3B+fLvy1toNw8cZLjifCIQrQ1rDrS3ccI+E=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=V453JicKZcGYgPq4fByKU5Dgtrq5jUXh+7vhrVI8shrdvlfkJKoNKblJKvKgrd08a gubNLdEfDffLiChOeFrQT64/4hUjpg4Pq5RvNbSdxI9DA3nf7TbY93m86TsDUQ0rQa rFfT4zoG0+g5iVkh2FgXV4QaJw2mchBDfAsVGEIDsuuDeky+mMo/KrpU0BIu1utqFj DLqRehcWdR1HaKSZBdHH6sdY2g1wyHn6WuCKbhw8dFBq5JVThnPDmzjTDXSqyW1c00 eMXdgTMGayyRkD33tZy9iYHEzqQNMtNSO65uAasyPcjy1VVv/oOkOYwSoqMdWs/rij yBMNddXiJlFwg== Date: Wed, 13 Oct 2021 13:48:39 -0500 From: Bjorn Helgaas To: Naveen Naidu Cc: Rob Herring , Bjorn Helgaas , PCI , linux-kernel-mentees@lists.linuxfoundation.org, "linux-kernel@vger.kernel.org" , Pali =?iso-8859-1?Q?Roh=E1r?= Subject: Re: [PATCH 02/22] PCI: Unify PCI error response checking Message-ID: <20211013184839.GA1909162@bhelgaas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211013171653.zx4sxdzhvy2ujytd@theprophet> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 13, 2021 at 10:46:53PM +0530, Naveen Naidu wrote: > 2. "Rework any callers expecting a positive return value" > > This means, find out the places where we have something like > > err = pci_read_config_dword(); > if (err > 0) > > Then change it to: > > err = pci_read_config_dword(pdev, PCI_REG_NPKDSC, &npkdsc); > if (err != PCIBIOS_SUCCESSFUL) I'm sure this is obvious, but I would try hard not to add any new uses of PCIBIOS_SUCCESSFUL. > Is there any easy way to search for these patterns, or should I look > for each instance of pci_read_config_* and other such variants and > see if such an case exists? coccigrep might be able to find things like this, but I'ver never really become friends with it.