stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jon Mason <jon.mason@intel.com>
To: Alexander Gordeev <agordeev@redhat.com>
Cc: linux-kernel@vger.kernel.org, Bjorn Helgaas <bhelgaas@google.com>,
	Ralf Baechle <ralf@linux-mips.org>,
	Michael Ellerman <michael@ellerman.id.au>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Martin Schwidefsky <schwidefsky@de.ibm.com>,
	Ingo Molnar <mingo@redhat.com>, Tejun Heo <tj@kernel.org>,
	Dan Williams <dan.j.williams@intel.com>,
	Andy King <acking@vmware.com>,
	Matt Porter <mporter@kernel.crashing.org>,
	stable@vger.kernel.org, linux-pci@vger.kernel.org,
	linux-mips@linux-mips.org, linuxppc-dev@lists.ozlabs.org,
	linux390@de.ibm.com, linux-s390@vger.kernel.org, x86@kernel.org,
	linux-ide@vger.kernel.org, iss_storagedev@hp.com,
	linux-nvme@lists.infradead.org, linux-rdma@vger.kernel.org,
	netdev@vger.kernel.org, e1000-devel@lists.sourceforge.net,
	linux-driver@qlogic.com,
	Solarflare linux maintainers <linux-net-drivers@solarflare.com>,
	"VMware, Inc." <pv-drivers@vmware.com>,
	linux-scsi@vger.kernel.org
Subject: Re: [PATCH RFC 01/77] PCI/MSI: Fix return value when populate_msi_sysfs() failed
Date: Wed, 2 Oct 2013 17:39:05 -0700	[thread overview]
Message-ID: <20131003003905.GK6768@jonmason-lab> (raw)
In-Reply-To: <3ff5236944aae69f2cd934b5b6da7c1c269df7c1.1380703262.git.agordeev@redhat.com>

On Wed, Oct 02, 2013 at 12:48:17PM +0200, Alexander Gordeev wrote:
> Signed-off-by: Alexander Gordeev <agordeev@redhat.com>

Since you are changing the behavior of the msix_capability_init
function on populate_msi_sysfs error, a comment describing why in this
commit would be nice.

> ---
>  drivers/pci/msi.c |   11 +++++------
>  1 files changed, 5 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c
> index d5f90d6..b43f391 100644
> --- a/drivers/pci/msi.c
> +++ b/drivers/pci/msi.c
> @@ -719,7 +719,7 @@ static int msix_capability_init(struct pci_dev *dev,
>  
>  	ret = arch_setup_msi_irqs(dev, nvec, PCI_CAP_ID_MSIX);
>  	if (ret)
> -		goto error;
> +		goto out_avail;
>  
>  	/*
>  	 * Some devices require MSI-X to be enabled before we can touch the
> @@ -732,10 +732,8 @@ static int msix_capability_init(struct pci_dev *dev,
>  	msix_program_entries(dev, entries);
>  
>  	ret = populate_msi_sysfs(dev);
> -	if (ret) {
> -		ret = 0;
> -		goto error;
> -	}
> +	if (ret)
> +		goto out_free;
>  
>  	/* Set MSI-X enabled bits and unmask the function */
>  	pci_intx_for_msi(dev, 0);
> @@ -746,7 +744,7 @@ static int msix_capability_init(struct pci_dev *dev,
>  
>  	return 0;
>  
> -error:
> +out_avail:
>  	if (ret < 0) {
>  		/*
>  		 * If we had some success, report the number of irqs
> @@ -763,6 +761,7 @@ error:
>  			ret = avail;
>  	}
>  
> +out_free:
>  	free_msi_irqs(dev);
>  
>  	return ret;
> -- 
> 1.7.7.6
> 

  reply	other threads:[~2013-10-03  0:39 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1380703262.git.agordeev@redhat.com>
2013-10-02 10:48 ` [PATCH RFC 01/77] PCI/MSI: Fix return value when populate_msi_sysfs() failed Alexander Gordeev
2013-10-03  0:39   ` Jon Mason [this message]
2013-10-03 21:46     ` Ben Hutchings
2013-10-04  0:59       ` Jon Mason
2013-10-02 10:48 ` [PATCH RFC 02/77] PCI/MSI/PPC: Fix wrong RTAS error code reporting Alexander Gordeev
2013-10-02 10:48 ` [PATCH RFC 03/77] PCI/MSI/s390: Fix single MSI only check Alexander Gordeev
2013-10-04  7:39   ` Martin Schwidefsky
2013-10-02 10:48 ` [PATCH RFC 04/77] PCI/MSI/s390: Remove superfluous check of MSI type Alexander Gordeev
2013-10-02 18:17   ` Greg KH
2013-10-04  7:40   ` Martin Schwidefsky
2013-10-02 10:48 ` [PATCH RFC 17/77] cciss: Update a misleading comment on interrupt usage Alexander Gordeev
2013-10-02 10:48 ` [PATCH RFC 18/77] cciss: Fallback to single MSI mode in case MSI-X failed Alexander Gordeev
2013-10-02 10:48 ` [PATCH RFC 19/77] csiostor: Do not call pci_disable_msix() if pci_enable_msix() failed Alexander Gordeev
2013-10-02 10:48 ` [PATCH RFC 20/77] csiostor: Return -ENOSPC when not enough MSI-X vectors available Alexander Gordeev
2013-10-02 10:48 ` [PATCH RFC 22/77] cxgb3: Do not call pci_disable_msix() if pci_enable_msix() failed Alexander Gordeev
2013-10-02 10:48 ` [PATCH RFC 23/77] cxgb3: Return -ENOSPC when not enough MSI-X vectors available Alexander Gordeev
2013-10-02 10:48 ` [PATCH RFC 25/77] cxgb4: " Alexander Gordeev
2013-10-02 10:48 ` [PATCH RFC 27/77] cxgb4vf: Do not call pci_disable_msix() if pci_enable_msix() failed Alexander Gordeev
2013-10-02 10:48 ` [PATCH RFC 28/77] cxgb4vf: Return -ENOSPC when not enough MSI-X vectors available Alexander Gordeev
2013-10-02 10:48 ` [PATCH RFC 30/77] hpsa: Update a misleading comment on interrupt usage Alexander Gordeev
2013-10-02 10:48 ` [PATCH RFC 32/77] hpsa: Fallback to single MSI mode in case MSI-X failed Alexander Gordeev
2013-10-02 10:48 ` [PATCH RFC 33/77] ioat: Disable MSI-X in case request of IRQ failed Alexander Gordeev
2013-10-02 10:48 ` [PATCH RFC 35/77] ipr: Do not call pci_disable_msi/msix() if pci_enable_msi/msix() failed Alexander Gordeev
2013-10-02 10:48 ` [PATCH RFC 36/77] ipr: Enable MSI-X when IPR_USE_MSIX type is set, not IPR_USE_MSI Alexander Gordeev
2013-10-02 19:31   ` Brian King
2013-10-02 10:48 ` [PATCH RFC 39/77] ixgbevf: Return -ENOSPC when not enough MSI-X vectors available Alexander Gordeev
2013-10-02 10:48 ` [PATCH RFC 41/77] lpfc: Do not call pci_disable_msix() if pci_enable_msix() failed Alexander Gordeev
2013-10-02 10:48 ` [PATCH RFC 43/77] lpfc: Return -ENOSPC when not enough MSI-X vectors available Alexander Gordeev
2013-10-02 10:49 ` [PATCH RFC 44/77] lpfc: Make MSI-X initialization routine more readable Alexander Gordeev
2013-10-02 10:49 ` [PATCH RFC 47/77] mlx5: Fix memory leak in case not enough MSI-X vectors available Alexander Gordeev
2013-10-02 10:49 ` [PATCH RFC 48/77] mlx5: Return -ENOSPC when " Alexander Gordeev
2013-10-02 10:49 ` [PATCH RFC 49/77] mlx5: Fix minimum number of MSI-Xs Alexander Gordeev
2013-10-02 10:49 ` [PATCH RFC 53/77] ntb: Fix missed call to pci_enable_msix() Alexander Gordeev
2013-10-03  0:49   ` Jon Mason
2013-10-02 10:49 ` [PATCH RFC 54/77] ntb: Ensure number of MSIs on SNB is enough for the link interrupt Alexander Gordeev
2013-10-03  0:48   ` Jon Mason
2013-10-05 21:43     ` Alexander Gordeev
2013-10-07 16:50       ` Jon Mason
2013-10-07 18:38         ` Alexander Gordeev
2013-10-07 20:31           ` Jon Mason
2013-10-02 10:49 ` [PATCH RFC 60/77] qlcnic: Return -ENOSPC when not enough MSI-X vectors available Alexander Gordeev
2013-10-02 10:49 ` [PATCH RFC 61/77] qlogic: Return -EINVAL in case MSI-X is not supported Alexander Gordeev
2013-10-02 10:49 ` [PATCH RFC 62/77] qlcnic: Remove redundant return operator Alexander Gordeev
2013-10-02 10:49 ` [PATCH RFC 65/77] qlge: Remove a redundant assignment Alexander Gordeev
2013-10-02 10:49 ` [PATCH RFC 71/77] vmxnet3: Return -EINVAL if number of requested MSI-Xs is not enough Alexander Gordeev
2013-10-02 10:49 ` [PATCH RFC 72/77] vmxnet3: Fixup a weird loop exit Alexander Gordeev
2013-10-02 10:49 ` [PATCH RFC 73/77] vmxnet3: Return -ENOSPC when not enough MSI-X vectors available Alexander Gordeev
2013-10-02 10:49 ` [PATCH RFC 74/77] vmxnet3: Limit number of rx queues to 1 if per-queue MSI-Xs failed Alexander Gordeev
2013-10-02 10:49 ` [PATCH RFC 76/77] vxge: Sanitize MSI-X allocation routine error codes Alexander Gordeev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20131003003905.GK6768@jonmason-lab \
    --to=jon.mason@intel.com \
    --cc=acking@vmware.com \
    --cc=agordeev@redhat.com \
    --cc=benh@kernel.crashing.org \
    --cc=bhelgaas@google.com \
    --cc=dan.j.williams@intel.com \
    --cc=e1000-devel@lists.sourceforge.net \
    --cc=iss_storagedev@hp.com \
    --cc=linux-driver@qlogic.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@linux-mips.org \
    --cc=linux-net-drivers@solarflare.com \
    --cc=linux-nvme@lists.infradead.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=linux390@de.ibm.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=michael@ellerman.id.au \
    --cc=mingo@redhat.com \
    --cc=mporter@kernel.crashing.org \
    --cc=netdev@vger.kernel.org \
    --cc=pv-drivers@vmware.com \
    --cc=ralf@linux-mips.org \
    --cc=schwidefsky@de.ibm.com \
    --cc=stable@vger.kernel.org \
    --cc=tj@kernel.org \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).