linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] NTB: Fix 'request_irq()' and 'free_irq()' inconsistancy
@ 2016-12-19  5:52 Christophe JAILLET
  2016-12-19 17:04 ` Dave Jiang
  0 siblings, 1 reply; 3+ messages in thread
From: Christophe JAILLET @ 2016-12-19  5:52 UTC (permalink / raw)
  To: Xiangliang.Yu, jdmason, dave.jiang, Allen.Hubbe
  Cc: linux-ntb, linux-kernel, kernel-janitors, Christophe JAILLET

'request_irq()' and 'free_irq()' should have the same 'dev_id'.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
 drivers/ntb/hw/amd/ntb_hw_amd.c     | 2 +-
 drivers/ntb/hw/intel/ntb_hw_intel.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/ntb/hw/amd/ntb_hw_amd.c b/drivers/ntb/hw/amd/ntb_hw_amd.c
index 6ccba0d862df..a48c3e085eab 100644
--- a/drivers/ntb/hw/amd/ntb_hw_amd.c
+++ b/drivers/ntb/hw/amd/ntb_hw_amd.c
@@ -598,7 +598,7 @@ static int ndev_init_isr(struct amd_ntb_dev *ndev,
 
 err_msix_request:
 	while (i-- > 0)
-		free_irq(ndev->msix[i].vector, ndev);
+		free_irq(ndev->msix[i].vector, &ndev->vec[i]);
 	pci_disable_msix(pdev);
 err_msix_enable:
 	kfree(ndev->msix);
diff --git a/drivers/ntb/hw/intel/ntb_hw_intel.c b/drivers/ntb/hw/intel/ntb_hw_intel.c
index 7310a261c858..2413600aae30 100644
--- a/drivers/ntb/hw/intel/ntb_hw_intel.c
+++ b/drivers/ntb/hw/intel/ntb_hw_intel.c
@@ -472,7 +472,7 @@ static int ndev_init_isr(struct intel_ntb_dev *ndev,
 
 err_msix_request:
 	while (i-- > 0)
-		free_irq(ndev->msix[i].vector, ndev);
+		free_irq(ndev->msix[i].vector, &ndev->vec[i]);
 	pci_disable_msix(pdev);
 err_msix_enable:
 	kfree(ndev->msix);
-- 
2.9.3

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

* Re: [PATCH] NTB: Fix 'request_irq()' and 'free_irq()' inconsistancy
  2016-12-19  5:52 [PATCH] NTB: Fix 'request_irq()' and 'free_irq()' inconsistancy Christophe JAILLET
@ 2016-12-19 17:04 ` Dave Jiang
  2016-12-21 16:52   ` Jon Mason
  0 siblings, 1 reply; 3+ messages in thread
From: Dave Jiang @ 2016-12-19 17:04 UTC (permalink / raw)
  To: Christophe JAILLET, Xiangliang.Yu, jdmason, Allen.Hubbe
  Cc: linux-ntb, linux-kernel, kernel-janitors



On 12/18/2016 10:52 PM, Christophe JAILLET wrote:
> 'request_irq()' and 'free_irq()' should have the same 'dev_id'.
> 
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>

Acking the Intel driver portion.
Acked-by: Dave Jiang <dave.jiang@intel.com>

> ---
>  drivers/ntb/hw/amd/ntb_hw_amd.c     | 2 +-
>  drivers/ntb/hw/intel/ntb_hw_intel.c | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/ntb/hw/amd/ntb_hw_amd.c b/drivers/ntb/hw/amd/ntb_hw_amd.c
> index 6ccba0d862df..a48c3e085eab 100644
> --- a/drivers/ntb/hw/amd/ntb_hw_amd.c
> +++ b/drivers/ntb/hw/amd/ntb_hw_amd.c
> @@ -598,7 +598,7 @@ static int ndev_init_isr(struct amd_ntb_dev *ndev,
>  
>  err_msix_request:
>  	while (i-- > 0)
> -		free_irq(ndev->msix[i].vector, ndev);
> +		free_irq(ndev->msix[i].vector, &ndev->vec[i]);
>  	pci_disable_msix(pdev);
>  err_msix_enable:
>  	kfree(ndev->msix);
> diff --git a/drivers/ntb/hw/intel/ntb_hw_intel.c b/drivers/ntb/hw/intel/ntb_hw_intel.c
> index 7310a261c858..2413600aae30 100644
> --- a/drivers/ntb/hw/intel/ntb_hw_intel.c
> +++ b/drivers/ntb/hw/intel/ntb_hw_intel.c
> @@ -472,7 +472,7 @@ static int ndev_init_isr(struct intel_ntb_dev *ndev,
>  
>  err_msix_request:
>  	while (i-- > 0)
> -		free_irq(ndev->msix[i].vector, ndev);
> +		free_irq(ndev->msix[i].vector, &ndev->vec[i]);
>  	pci_disable_msix(pdev);
>  err_msix_enable:
>  	kfree(ndev->msix);
> 

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

* Re: [PATCH] NTB: Fix 'request_irq()' and 'free_irq()' inconsistancy
  2016-12-19 17:04 ` Dave Jiang
@ 2016-12-21 16:52   ` Jon Mason
  0 siblings, 0 replies; 3+ messages in thread
From: Jon Mason @ 2016-12-21 16:52 UTC (permalink / raw)
  To: Dave Jiang
  Cc: Christophe JAILLET, Xiangliang.Yu, Allen.Hubbe, linux-ntb,
	linux-kernel, kernel-janitors

On Mon, Dec 19, 2016 at 10:04:24AM -0700, Dave Jiang wrote:
> 
> 
> On 12/18/2016 10:52 PM, Christophe JAILLET wrote:
> > 'request_irq()' and 'free_irq()' should have the same 'dev_id'.
> > 
> > Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> 
> Acking the Intel driver portion.
> Acked-by: Dave Jiang <dave.jiang@intel.com>

Applied to the ntb git branch

Thanks,
Jon

> 
> > ---
> >  drivers/ntb/hw/amd/ntb_hw_amd.c     | 2 +-
> >  drivers/ntb/hw/intel/ntb_hw_intel.c | 2 +-
> >  2 files changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/ntb/hw/amd/ntb_hw_amd.c b/drivers/ntb/hw/amd/ntb_hw_amd.c
> > index 6ccba0d862df..a48c3e085eab 100644
> > --- a/drivers/ntb/hw/amd/ntb_hw_amd.c
> > +++ b/drivers/ntb/hw/amd/ntb_hw_amd.c
> > @@ -598,7 +598,7 @@ static int ndev_init_isr(struct amd_ntb_dev *ndev,
> >  
> >  err_msix_request:
> >  	while (i-- > 0)
> > -		free_irq(ndev->msix[i].vector, ndev);
> > +		free_irq(ndev->msix[i].vector, &ndev->vec[i]);
> >  	pci_disable_msix(pdev);
> >  err_msix_enable:
> >  	kfree(ndev->msix);
> > diff --git a/drivers/ntb/hw/intel/ntb_hw_intel.c b/drivers/ntb/hw/intel/ntb_hw_intel.c
> > index 7310a261c858..2413600aae30 100644
> > --- a/drivers/ntb/hw/intel/ntb_hw_intel.c
> > +++ b/drivers/ntb/hw/intel/ntb_hw_intel.c
> > @@ -472,7 +472,7 @@ static int ndev_init_isr(struct intel_ntb_dev *ndev,
> >  
> >  err_msix_request:
> >  	while (i-- > 0)
> > -		free_irq(ndev->msix[i].vector, ndev);
> > +		free_irq(ndev->msix[i].vector, &ndev->vec[i]);
> >  	pci_disable_msix(pdev);
> >  err_msix_enable:
> >  	kfree(ndev->msix);
> > 
> 
> -- 
> You received this message because you are subscribed to the Google Groups "linux-ntb" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to linux-ntb+unsubscribe@googlegroups.com.
> To post to this group, send email to linux-ntb@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/linux-ntb/56b16dd5-b83b-e8b0-bf79-2dd2bc56f1e1%40intel.com.
> For more options, visit https://groups.google.com/d/optout.

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

end of thread, other threads:[~2016-12-21 16:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-19  5:52 [PATCH] NTB: Fix 'request_irq()' and 'free_irq()' inconsistancy Christophe JAILLET
2016-12-19 17:04 ` Dave Jiang
2016-12-21 16:52   ` Jon Mason

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