Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH net-next] ionic: drop useless check of PCI driver data validity
@ 2021-07-21  9:54 Leon Romanovsky
  2021-07-21 15:55 ` Shannon Nelson
  2021-07-21 16:10 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Leon Romanovsky @ 2021-07-21  9:54 UTC (permalink / raw)
  To: David S. Miller, Jakub Kicinski, Shannon Nelson
  Cc: Leon Romanovsky, drivers, linux-kernel, netdev

From: Leon Romanovsky <leonro@nvidia.com>

The driver core will call to .remove callback only if .probe succeeded
and it will ensure that driver data has pointer to struct ionic.

There is no need to check it again.

Fixes: fbfb8031533c ("ionic: Add hardware init and device commands")
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
---
 drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c b/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c
index e4a5416adc80..505f605fa40b 100644
--- a/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c
+++ b/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c
@@ -373,9 +373,6 @@ static void ionic_remove(struct pci_dev *pdev)
 {
 	struct ionic *ionic = pci_get_drvdata(pdev);
 
-	if (!ionic)
-		return;
-
 	del_timer_sync(&ionic->watchdog_timer);
 
 	if (ionic->lif) {
-- 
2.31.1


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

* Re: [PATCH net-next] ionic: drop useless check of PCI driver data validity
  2021-07-21  9:54 [PATCH net-next] ionic: drop useless check of PCI driver data validity Leon Romanovsky
@ 2021-07-21 15:55 ` Shannon Nelson
  2021-07-21 16:10 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Shannon Nelson @ 2021-07-21 15:55 UTC (permalink / raw)
  To: Leon Romanovsky, David S. Miller, Jakub Kicinski
  Cc: Leon Romanovsky, drivers, linux-kernel, netdev

On 7/21/21 2:54 AM, Leon Romanovsky wrote:
> From: Leon Romanovsky <leonro@nvidia.com>
>
> The driver core will call to .remove callback only if .probe succeeded
> and it will ensure that driver data has pointer to struct ionic.
>
> There is no need to check it again.
>
> Fixes: fbfb8031533c ("ionic: Add hardware init and device commands")
> Signed-off-by: Leon Romanovsky <leonro@nvidia.com>

Thanks,

Acked-by: Shannon Nelson <snelson@pensando.io>

> ---
>   drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c | 3 ---
>   1 file changed, 3 deletions(-)
>
> diff --git a/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c b/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c
> index e4a5416adc80..505f605fa40b 100644
> --- a/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c
> +++ b/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c
> @@ -373,9 +373,6 @@ static void ionic_remove(struct pci_dev *pdev)
>   {
>   	struct ionic *ionic = pci_get_drvdata(pdev);
>   
> -	if (!ionic)
> -		return;
> -
>   	del_timer_sync(&ionic->watchdog_timer);
>   
>   	if (ionic->lif) {


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

* Re: [PATCH net-next] ionic: drop useless check of PCI driver data validity
  2021-07-21  9:54 [PATCH net-next] ionic: drop useless check of PCI driver data validity Leon Romanovsky
  2021-07-21 15:55 ` Shannon Nelson
@ 2021-07-21 16:10 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-07-21 16:10 UTC (permalink / raw)
  To: Leon Romanovsky
  Cc: davem, kuba, snelson, leonro, drivers, linux-kernel, netdev

Hello:

This patch was applied to netdev/net-next.git (refs/heads/master):

On Wed, 21 Jul 2021 12:54:13 +0300 you wrote:
> From: Leon Romanovsky <leonro@nvidia.com>
> 
> The driver core will call to .remove callback only if .probe succeeded
> and it will ensure that driver data has pointer to struct ionic.
> 
> There is no need to check it again.
> 
> [...]

Here is the summary with links:
  - [net-next] ionic: drop useless check of PCI driver data validity
    https://git.kernel.org/netdev/net-next/c/524df92c1907

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] 3+ messages in thread

end of thread, other threads:[~2021-07-21 16:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-21  9:54 [PATCH net-next] ionic: drop useless check of PCI driver data validity Leon Romanovsky
2021-07-21 15:55 ` Shannon Nelson
2021-07-21 16:10 ` patchwork-bot+netdevbpf

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