All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] stmmac: intel: Fix an error handling path in intel_eth_pci_probe()
@ 2022-06-05 20:50 ` Christophe JAILLET
  0 siblings, 0 replies; 10+ messages in thread
From: Christophe JAILLET @ 2022-06-05 20:50 UTC (permalink / raw)
  To: Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu,
	David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Maxime Coquelin, Wong Vee Khee
  Cc: linux-kernel, kernel-janitors, Christophe JAILLET, netdev,
	linux-stm32, linux-arm-kernel

When the managed API is used, there is no need to explicitly call
pci_free_irq_vectors().

This looks to be a left-over from the commit in the Fixes tag. Only the
.remove() function had been updated.

So remove this unused function call and update goto label accordingly.

Fixes: 8accc467758e ("stmmac: intel: use managed PCI function on probe and resume")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
 drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c
index f9f80933e0c9..38fe77d1035e 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c
@@ -1072,13 +1072,11 @@ static int intel_eth_pci_probe(struct pci_dev *pdev,
 
 	ret = stmmac_dvr_probe(&pdev->dev, plat, &res);
 	if (ret) {
-		goto err_dvr_probe;
+		goto err_alloc_irq;
 	}
 
 	return 0;
 
-err_dvr_probe:
-	pci_free_irq_vectors(pdev);
 err_alloc_irq:
 	clk_disable_unprepare(plat->stmmac_clk);
 	clk_unregister_fixed_rate(plat->stmmac_clk);
-- 
2.34.1


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

* [PATCH] stmmac: intel: Fix an error handling path in intel_eth_pci_probe()
@ 2022-06-05 20:50 ` Christophe JAILLET
  0 siblings, 0 replies; 10+ messages in thread
From: Christophe JAILLET @ 2022-06-05 20:50 UTC (permalink / raw)
  To: Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu,
	David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Maxime Coquelin, Wong Vee Khee
  Cc: linux-kernel, kernel-janitors, Christophe JAILLET, netdev,
	linux-stm32, linux-arm-kernel

When the managed API is used, there is no need to explicitly call
pci_free_irq_vectors().

This looks to be a left-over from the commit in the Fixes tag. Only the
.remove() function had been updated.

So remove this unused function call and update goto label accordingly.

Fixes: 8accc467758e ("stmmac: intel: use managed PCI function on probe and resume")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
 drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c
index f9f80933e0c9..38fe77d1035e 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c
@@ -1072,13 +1072,11 @@ static int intel_eth_pci_probe(struct pci_dev *pdev,
 
 	ret = stmmac_dvr_probe(&pdev->dev, plat, &res);
 	if (ret) {
-		goto err_dvr_probe;
+		goto err_alloc_irq;
 	}
 
 	return 0;
 
-err_dvr_probe:
-	pci_free_irq_vectors(pdev);
 err_alloc_irq:
 	clk_disable_unprepare(plat->stmmac_clk);
 	clk_unregister_fixed_rate(plat->stmmac_clk);
-- 
2.34.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH] stmmac: intel: Fix an error handling path in intel_eth_pci_probe()
  2022-06-05 20:50 ` Christophe JAILLET
@ 2022-06-06  6:26   ` Wong Vee Khee
  -1 siblings, 0 replies; 10+ messages in thread
From: Wong Vee Khee @ 2022-06-06  6:26 UTC (permalink / raw)
  To: Christophe JAILLET
  Cc: Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu,
	David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Maxime Coquelin, linux-kernel, kernel-janitors, netdev,
	linux-stm32, linux-arm-kernel

On Sun, Jun 05, 2022 at 10:50:48PM +0200, Christophe JAILLET wrote:
> When the managed API is used, there is no need to explicitly call
> pci_free_irq_vectors().
> 
> This looks to be a left-over from the commit in the Fixes tag. Only the
> .remove() function had been updated.
> 
> So remove this unused function call and update goto label accordingly.
> 
> Fixes: 8accc467758e ("stmmac: intel: use managed PCI function on probe and resume")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---
>  drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 

LGTM

Reviewed-by: Wong Vee Khee <vee.khee.wong@linux.intel.com>


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

* Re: [PATCH] stmmac: intel: Fix an error handling path in intel_eth_pci_probe()
@ 2022-06-06  6:26   ` Wong Vee Khee
  0 siblings, 0 replies; 10+ messages in thread
From: Wong Vee Khee @ 2022-06-06  6:26 UTC (permalink / raw)
  To: Christophe JAILLET
  Cc: Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu,
	David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Maxime Coquelin, linux-kernel, kernel-janitors, netdev,
	linux-stm32, linux-arm-kernel

On Sun, Jun 05, 2022 at 10:50:48PM +0200, Christophe JAILLET wrote:
> When the managed API is used, there is no need to explicitly call
> pci_free_irq_vectors().
> 
> This looks to be a left-over from the commit in the Fixes tag. Only the
> .remove() function had been updated.
> 
> So remove this unused function call and update goto label accordingly.
> 
> Fixes: 8accc467758e ("stmmac: intel: use managed PCI function on probe and resume")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---
>  drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 

LGTM

Reviewed-by: Wong Vee Khee <vee.khee.wong@linux.intel.com>


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH] stmmac: intel: Fix an error handling path in intel_eth_pci_probe()
  2022-06-06  6:26   ` Wong Vee Khee
@ 2022-06-06 20:42     ` Christophe JAILLET
  -1 siblings, 0 replies; 10+ messages in thread
From: Christophe JAILLET @ 2022-06-06 20:42 UTC (permalink / raw)
  To: Wong Vee Khee
  Cc: Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu,
	David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Maxime Coquelin, linux-kernel, kernel-janitors, netdev,
	linux-stm32, linux-arm-kernel

Le 06/06/2022 à 08:26, Wong Vee Khee a écrit :
> On Sun, Jun 05, 2022 at 10:50:48PM +0200, Christophe JAILLET wrote:
>> When the managed API is used, there is no need to explicitly call
>> pci_free_irq_vectors().
>>
>> This looks to be a left-over from the commit in the Fixes tag. Only the
>> .remove() function had been updated.
>>
>> So remove this unused function call and update goto label accordingly.
>>
>> Fixes: 8accc467758e ("stmmac: intel: use managed PCI function on probe and resume")
>> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
>> ---
>>   drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c | 4 +---
>>   1 file changed, 1 insertion(+), 3 deletions(-)
>>
> 
> LGTM
> 
> Reviewed-by: Wong Vee Khee <vee.khee.wong@linux.intel.com>
> 
> 

Hi,

I've looked at it again.

I still think that the patch is good, but pcim_release() has changed in 
5.18 since commit 3f35d2cf9fbc ("PCI/MSI: Decouple MSI[-X] disable from 
pcim_release()")

I guess that all the mechanic is in place so that everything is 
registered when needed, but I've not been able to figure it out in the 
case of dwmac-intel.c.

So, double check :).

CJ

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH] stmmac: intel: Fix an error handling path in intel_eth_pci_probe()
@ 2022-06-06 20:42     ` Christophe JAILLET
  0 siblings, 0 replies; 10+ messages in thread
From: Christophe JAILLET @ 2022-06-06 20:42 UTC (permalink / raw)
  To: Wong Vee Khee
  Cc: Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu,
	David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Maxime Coquelin, linux-kernel, kernel-janitors, netdev,
	linux-stm32, linux-arm-kernel

Le 06/06/2022 à 08:26, Wong Vee Khee a écrit :
> On Sun, Jun 05, 2022 at 10:50:48PM +0200, Christophe JAILLET wrote:
>> When the managed API is used, there is no need to explicitly call
>> pci_free_irq_vectors().
>>
>> This looks to be a left-over from the commit in the Fixes tag. Only the
>> .remove() function had been updated.
>>
>> So remove this unused function call and update goto label accordingly.
>>
>> Fixes: 8accc467758e ("stmmac: intel: use managed PCI function on probe and resume")
>> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
>> ---
>>   drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c | 4 +---
>>   1 file changed, 1 insertion(+), 3 deletions(-)
>>
> 
> LGTM
> 
> Reviewed-by: Wong Vee Khee <vee.khee.wong@linux.intel.com>
> 
> 

Hi,

I've looked at it again.

I still think that the patch is good, but pcim_release() has changed in 
5.18 since commit 3f35d2cf9fbc ("PCI/MSI: Decouple MSI[-X] disable from 
pcim_release()")

I guess that all the mechanic is in place so that everything is 
registered when needed, but I've not been able to figure it out in the 
case of dwmac-intel.c.

So, double check :).

CJ

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

* Re: [PATCH] stmmac: intel: Fix an error handling path in intel_eth_pci_probe()
  2022-06-06 20:42     ` Christophe JAILLET
@ 2022-06-07  9:55       ` Paolo Abeni
  -1 siblings, 0 replies; 10+ messages in thread
From: Paolo Abeni @ 2022-06-07  9:55 UTC (permalink / raw)
  To: Christophe JAILLET, Wong Vee Khee
  Cc: Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu,
	David S. Miller, Eric Dumazet, Jakub Kicinski, Maxime Coquelin,
	linux-kernel, kernel-janitors, netdev, linux-stm32,
	linux-arm-kernel

On Mon, 2022-06-06 at 22:42 +0200, Christophe JAILLET wrote:
> Le 06/06/2022 à 08:26, Wong Vee Khee a écrit :
> > On Sun, Jun 05, 2022 at 10:50:48PM +0200, Christophe JAILLET wrote:
> > > When the managed API is used, there is no need to explicitly call
> > > pci_free_irq_vectors().
> > > 
> > > This looks to be a left-over from the commit in the Fixes tag. Only the
> > > .remove() function had been updated.
> > > 
> > > So remove this unused function call and update goto label accordingly.
> > > 
> > > Fixes: 8accc467758e ("stmmac: intel: use managed PCI function on probe and resume")
> > > Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> > > ---
> > >   drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c | 4 +---
> > >   1 file changed, 1 insertion(+), 3 deletions(-)
> > > 
> > 
> > LGTM
> > 
> > Reviewed-by: Wong Vee Khee <vee.khee.wong@linux.intel.com>
> > 
> > 
> 
> Hi,
> 
> I've looked at it again.
> 
> I still think that the patch is good, but pcim_release() has changed in 
> 5.18 since commit 3f35d2cf9fbc ("PCI/MSI: Decouple MSI[-X] disable from 
> pcim_release()")
> 
> I guess that all the mechanic is in place so that everything is 
> registered when needed, but I've not been able to figure it out in the 
> case of dwmac-intel.c.
> 
> So, double check :).

AFACIS:

stmmac_config_{single,multi}_msi -> pci_alloc_irq_vectors ->
pci_alloc_irq_vectors_affinity -> __pci_enable_msix_range ->
pcim_setup_msi_release

So LGTM, thanks!

Paolo


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

* Re: [PATCH] stmmac: intel: Fix an error handling path in intel_eth_pci_probe()
@ 2022-06-07  9:55       ` Paolo Abeni
  0 siblings, 0 replies; 10+ messages in thread
From: Paolo Abeni @ 2022-06-07  9:55 UTC (permalink / raw)
  To: Christophe JAILLET, Wong Vee Khee
  Cc: Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu,
	David S. Miller, Eric Dumazet, Jakub Kicinski, Maxime Coquelin,
	linux-kernel, kernel-janitors, netdev, linux-stm32,
	linux-arm-kernel

On Mon, 2022-06-06 at 22:42 +0200, Christophe JAILLET wrote:
> Le 06/06/2022 à 08:26, Wong Vee Khee a écrit :
> > On Sun, Jun 05, 2022 at 10:50:48PM +0200, Christophe JAILLET wrote:
> > > When the managed API is used, there is no need to explicitly call
> > > pci_free_irq_vectors().
> > > 
> > > This looks to be a left-over from the commit in the Fixes tag. Only the
> > > .remove() function had been updated.
> > > 
> > > So remove this unused function call and update goto label accordingly.
> > > 
> > > Fixes: 8accc467758e ("stmmac: intel: use managed PCI function on probe and resume")
> > > Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> > > ---
> > >   drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c | 4 +---
> > >   1 file changed, 1 insertion(+), 3 deletions(-)
> > > 
> > 
> > LGTM
> > 
> > Reviewed-by: Wong Vee Khee <vee.khee.wong@linux.intel.com>
> > 
> > 
> 
> Hi,
> 
> I've looked at it again.
> 
> I still think that the patch is good, but pcim_release() has changed in 
> 5.18 since commit 3f35d2cf9fbc ("PCI/MSI: Decouple MSI[-X] disable from 
> pcim_release()")
> 
> I guess that all the mechanic is in place so that everything is 
> registered when needed, but I've not been able to figure it out in the 
> case of dwmac-intel.c.
> 
> So, double check :).

AFACIS:

stmmac_config_{single,multi}_msi -> pci_alloc_irq_vectors ->
pci_alloc_irq_vectors_affinity -> __pci_enable_msix_range ->
pcim_setup_msi_release

So LGTM, thanks!

Paolo


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH] stmmac: intel: Fix an error handling path in intel_eth_pci_probe()
  2022-06-05 20:50 ` Christophe JAILLET
@ 2022-06-07 10:10   ` patchwork-bot+netdevbpf
  -1 siblings, 0 replies; 10+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-06-07 10:10 UTC (permalink / raw)
  To: Christophe JAILLET
  Cc: peppe.cavallaro, alexandre.torgue, joabreu, davem, edumazet,
	kuba, pabeni, mcoquelin.stm32, vee.khee.wong, linux-kernel,
	kernel-janitors, netdev, linux-stm32, linux-arm-kernel

Hello:

This patch was applied to netdev/net.git (master)
by Paolo Abeni <pabeni@redhat.com>:

On Sun,  5 Jun 2022 22:50:48 +0200 you wrote:
> When the managed API is used, there is no need to explicitly call
> pci_free_irq_vectors().
> 
> This looks to be a left-over from the commit in the Fixes tag. Only the
> .remove() function had been updated.
> 
> So remove this unused function call and update goto label accordingly.
> 
> [...]

Here is the summary with links:
  - stmmac: intel: Fix an error handling path in intel_eth_pci_probe()
    https://git.kernel.org/netdev/net/c/5e74a4b3ec18

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



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

* Re: [PATCH] stmmac: intel: Fix an error handling path in intel_eth_pci_probe()
@ 2022-06-07 10:10   ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 10+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-06-07 10:10 UTC (permalink / raw)
  To: Christophe JAILLET
  Cc: peppe.cavallaro, alexandre.torgue, joabreu, davem, edumazet,
	kuba, pabeni, mcoquelin.stm32, vee.khee.wong, linux-kernel,
	kernel-janitors, netdev, linux-stm32, linux-arm-kernel

Hello:

This patch was applied to netdev/net.git (master)
by Paolo Abeni <pabeni@redhat.com>:

On Sun,  5 Jun 2022 22:50:48 +0200 you wrote:
> When the managed API is used, there is no need to explicitly call
> pci_free_irq_vectors().
> 
> This looks to be a left-over from the commit in the Fixes tag. Only the
> .remove() function had been updated.
> 
> So remove this unused function call and update goto label accordingly.
> 
> [...]

Here is the summary with links:
  - stmmac: intel: Fix an error handling path in intel_eth_pci_probe()
    https://git.kernel.org/netdev/net/c/5e74a4b3ec18

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2022-06-07 10:22 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-05 20:50 [PATCH] stmmac: intel: Fix an error handling path in intel_eth_pci_probe() Christophe JAILLET
2022-06-05 20:50 ` Christophe JAILLET
2022-06-06  6:26 ` Wong Vee Khee
2022-06-06  6:26   ` Wong Vee Khee
2022-06-06 20:42   ` Christophe JAILLET
2022-06-06 20:42     ` Christophe JAILLET
2022-06-07  9:55     ` Paolo Abeni
2022-06-07  9:55       ` Paolo Abeni
2022-06-07 10:10 ` patchwork-bot+netdevbpf
2022-06-07 10:10   ` patchwork-bot+netdevbpf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.