All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] crypto: keembay-ocs-ecc: Drop if with an always false condition
@ 2022-07-15 10:30 Uwe Kleine-König
  2022-07-15 16:00 ` Florian Fainelli
  0 siblings, 1 reply; 4+ messages in thread
From: Uwe Kleine-König @ 2022-07-15 10:30 UTC (permalink / raw)
  To: Kalle Valo
  Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	linux-wireless, netdev, kernel

The remove callback is only called after probe completed successfully.
In this case platform_set_drvdata() was called with a non-NULL argument
(in wlcore_probe()) and so wl is never NULL.

This is a preparation for making platform remove callbacks return void.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/net/wireless/ti/wl12xx/main.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/net/wireless/ti/wl12xx/main.c b/drivers/net/wireless/ti/wl12xx/main.c
index c6da0cfb4afb..d06a2c419447 100644
--- a/drivers/net/wireless/ti/wl12xx/main.c
+++ b/drivers/net/wireless/ti/wl12xx/main.c
@@ -1924,13 +1924,10 @@ static int wl12xx_remove(struct platform_device *pdev)
 	struct wl1271 *wl = platform_get_drvdata(pdev);
 	struct wl12xx_priv *priv;
 
-	if (!wl)
-		goto out;
 	priv = wl->priv;
 
 	kfree(priv->rx_mem_addr);
 
-out:
 	return wlcore_remove(pdev);
 }
 

base-commit: f2906aa863381afb0015a9eb7fefad885d4e5a56
-- 
2.36.1


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

* Re: [PATCH] crypto: keembay-ocs-ecc: Drop if with an always false condition
  2022-07-15 10:30 [PATCH] crypto: keembay-ocs-ecc: Drop if with an always false condition Uwe Kleine-König
@ 2022-07-15 16:00 ` Florian Fainelli
  2022-07-15 22:46   ` [PATCH] wlcore/wl12xx: " Uwe Kleine-König
  0 siblings, 1 reply; 4+ messages in thread
From: Florian Fainelli @ 2022-07-15 16:00 UTC (permalink / raw)
  To: Uwe Kleine-König, Kalle Valo
  Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	linux-wireless, netdev, kernel

On 7/15/22 03:30, Uwe Kleine-König wrote:
> The remove callback is only called after probe completed successfully.
> In this case platform_set_drvdata() was called with a non-NULL argument
> (in wlcore_probe()) and so wl is never NULL.
> 
> This is a preparation for making platform remove callbacks return void.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

The subject appears to have been borrowed from another file/subsystem.
-- 
Florian

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

* [PATCH] wlcore/wl12xx: Drop if with an always false condition
  2022-07-15 16:00 ` Florian Fainelli
@ 2022-07-15 22:46   ` Uwe Kleine-König
  2022-07-27 12:52     ` wifi: wl12xx: " Kalle Valo
  0 siblings, 1 reply; 4+ messages in thread
From: Uwe Kleine-König @ 2022-07-15 22:46 UTC (permalink / raw)
  To: Florian Fainelli, Kalle Valo
  Cc: netdev, linux-wireless, Eric Dumazet, kernel, Jakub Kicinski,
	Paolo Abeni, David S. Miller

[-- Attachment #1: Type: text/plain, Size: 1787 bytes --]

The remove callback is only called after probe completed successfully.
In this case platform_set_drvdata() was called with a non-NULL argument
(in wlcore_probe()) and so wl is never NULL.

This is a preparation for making platform remove callbacks return void.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
On Fri, Jul 15, 2022 at 09:00:42AM -0700, Florian Fainelli wrote:
> On 7/15/22 03:30, Uwe Kleine-König wrote:
> > The remove callback is only called after probe completed successfully.
> > In this case platform_set_drvdata() was called with a non-NULL argument
> > (in wlcore_probe()) and so wl is never NULL.
> > 
> > This is a preparation for making platform remove callbacks return void.
> > 
> > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> 
> The subject appears to have been borrowed from another file/subsystem.

Damn! Fixed here. Thanks for your feedback.

Best regards
Uwe

 drivers/net/wireless/ti/wl12xx/main.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/net/wireless/ti/wl12xx/main.c b/drivers/net/wireless/ti/wl12xx/main.c
index c6da0cfb4afb..d06a2c419447 100644
--- a/drivers/net/wireless/ti/wl12xx/main.c
+++ b/drivers/net/wireless/ti/wl12xx/main.c
@@ -1924,13 +1924,10 @@ static int wl12xx_remove(struct platform_device *pdev)
 	struct wl1271 *wl = platform_get_drvdata(pdev);
 	struct wl12xx_priv *priv;
 
-	if (!wl)
-		goto out;
 	priv = wl->priv;
 
 	kfree(priv->rx_mem_addr);
 
-out:
 	return wlcore_remove(pdev);
 }
 

base-commit: f2906aa863381afb0015a9eb7fefad885d4e5a56
-- 
2.36.1


-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: wifi: wl12xx: Drop if with an always false condition
  2022-07-15 22:46   ` [PATCH] wlcore/wl12xx: " Uwe Kleine-König
@ 2022-07-27 12:52     ` Kalle Valo
  0 siblings, 0 replies; 4+ messages in thread
From: Kalle Valo @ 2022-07-27 12:52 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Florian Fainelli, netdev, linux-wireless, Eric Dumazet, kernel,
	Jakub Kicinski, Paolo Abeni, David S. Miller

Uwe Kleine-König <u.kleine-koenig@pengutronix.de> wrote:

> The remove callback is only called after probe completed successfully.
> In this case platform_set_drvdata() was called with a non-NULL argument
> (in wlcore_probe()) and so wl is never NULL.
> 
> This is a preparation for making platform remove callbacks return void.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Patch applied to wireless-next.git, thanks.

69ddcea56443 wifi: wl12xx: Drop if with an always false condition

-- 
https://patchwork.kernel.org/project/linux-wireless/patch/20220715224619.ht7bbzzrmysielm7@pengutronix.de/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


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

end of thread, other threads:[~2022-07-27 12:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-15 10:30 [PATCH] crypto: keembay-ocs-ecc: Drop if with an always false condition Uwe Kleine-König
2022-07-15 16:00 ` Florian Fainelli
2022-07-15 22:46   ` [PATCH] wlcore/wl12xx: " Uwe Kleine-König
2022-07-27 12:52     ` wifi: wl12xx: " Kalle Valo

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.