linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] PCI/MSI: Fix cut-and-paste errors in documentation
@ 2014-02-12 10:35 Alexander Gordeev
  2014-02-12 19:14 ` Bjorn Helgaas
  0 siblings, 1 reply; 2+ messages in thread
From: Alexander Gordeev @ 2014-02-12 10:35 UTC (permalink / raw)
  To: linux-kernel; +Cc: Alexander Gordeev, linux-pci

Function pci_enable_msi_range() is used in examples where
pci_enable_msix_range() should have been used instead.

Reported-by: Bjorn Helgaas <bhelgaas@google.com>
Cc: linux-pci@vger.kernel.org
Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
---
 Documentation/PCI/MSI-HOWTO.txt |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/Documentation/PCI/MSI-HOWTO.txt b/Documentation/PCI/MSI-HOWTO.txt
index a8d0100..43c5a5f 100644
--- a/Documentation/PCI/MSI-HOWTO.txt
+++ b/Documentation/PCI/MSI-HOWTO.txt
@@ -257,8 +257,8 @@ possible, likely up to the limit returned by pci_msix_vec_count() function:
 
 static int foo_driver_enable_msix(struct foo_adapter *adapter, int nvec)
 {
-	return pci_enable_msi_range(adapter->pdev, adapter->msix_entries,
-				    1, nvec);
+	return pci_enable_msix_range(adapter->pdev, adapter->msix_entries,
+				     1, nvec);
 }
 
 Note the value of 'minvec' parameter is 1.  As 'minvec' is inclusive,
@@ -269,8 +269,8 @@ In this case the function could look like this:
 
 static int foo_driver_enable_msix(struct foo_adapter *adapter, int nvec)
 {
-	return pci_enable_msi_range(adapter->pdev, adapter->msix_entries,
-				    FOO_DRIVER_MINIMUM_NVEC, nvec);
+	return pci_enable_msix_range(adapter->pdev, adapter->msix_entries,
+				     FOO_DRIVER_MINIMUM_NVEC, nvec);
 }
 
 4.3.1.2 Exact number of MSI-X interrupts
@@ -282,8 +282,8 @@ parameters:
 
 static int foo_driver_enable_msix(struct foo_adapter *adapter, int nvec)
 {
-	return pci_enable_msi_range(adapter->pdev, adapter->msix_entries,
-				    nvec, nvec);
+	return pci_enable_msix_range(adapter->pdev, adapter->msix_entries,
+				     nvec, nvec);
 }
 
 4.3.1.3 Specific requirements to the number of MSI-X interrupts
-- 
1.7.7.6


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] PCI/MSI: Fix cut-and-paste errors in documentation
  2014-02-12 10:35 [PATCH] PCI/MSI: Fix cut-and-paste errors in documentation Alexander Gordeev
@ 2014-02-12 19:14 ` Bjorn Helgaas
  0 siblings, 0 replies; 2+ messages in thread
From: Bjorn Helgaas @ 2014-02-12 19:14 UTC (permalink / raw)
  To: Alexander Gordeev; +Cc: linux-kernel, linux-pci

On Wed, Feb 12, 2014 at 11:35:25AM +0100, Alexander Gordeev wrote:
> Function pci_enable_msi_range() is used in examples where
> pci_enable_msix_range() should have been used instead.
> 
> Reported-by: Bjorn Helgaas <bhelgaas@google.com>
> Cc: linux-pci@vger.kernel.org
> Signed-off-by: Alexander Gordeev <agordeev@redhat.com>

Applied to pci/misc for v3.15, thanks!

Bjorn

> ---
>  Documentation/PCI/MSI-HOWTO.txt |   12 ++++++------
>  1 files changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/Documentation/PCI/MSI-HOWTO.txt b/Documentation/PCI/MSI-HOWTO.txt
> index a8d0100..43c5a5f 100644
> --- a/Documentation/PCI/MSI-HOWTO.txt
> +++ b/Documentation/PCI/MSI-HOWTO.txt
> @@ -257,8 +257,8 @@ possible, likely up to the limit returned by pci_msix_vec_count() function:
>  
>  static int foo_driver_enable_msix(struct foo_adapter *adapter, int nvec)
>  {
> -	return pci_enable_msi_range(adapter->pdev, adapter->msix_entries,
> -				    1, nvec);
> +	return pci_enable_msix_range(adapter->pdev, adapter->msix_entries,
> +				     1, nvec);
>  }
>  
>  Note the value of 'minvec' parameter is 1.  As 'minvec' is inclusive,
> @@ -269,8 +269,8 @@ In this case the function could look like this:
>  
>  static int foo_driver_enable_msix(struct foo_adapter *adapter, int nvec)
>  {
> -	return pci_enable_msi_range(adapter->pdev, adapter->msix_entries,
> -				    FOO_DRIVER_MINIMUM_NVEC, nvec);
> +	return pci_enable_msix_range(adapter->pdev, adapter->msix_entries,
> +				     FOO_DRIVER_MINIMUM_NVEC, nvec);
>  }
>  
>  4.3.1.2 Exact number of MSI-X interrupts
> @@ -282,8 +282,8 @@ parameters:
>  
>  static int foo_driver_enable_msix(struct foo_adapter *adapter, int nvec)
>  {
> -	return pci_enable_msi_range(adapter->pdev, adapter->msix_entries,
> -				    nvec, nvec);
> +	return pci_enable_msix_range(adapter->pdev, adapter->msix_entries,
> +				     nvec, nvec);
>  }
>  
>  4.3.1.3 Specific requirements to the number of MSI-X interrupts
> -- 
> 1.7.7.6
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pci" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-02-12 19:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-12 10:35 [PATCH] PCI/MSI: Fix cut-and-paste errors in documentation Alexander Gordeev
2014-02-12 19:14 ` Bjorn Helgaas

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).