linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drivers: net: wireless: rsi: return explicit error values
@ 2019-07-29 15:24 Enrico Weigelt, metux IT consult
  2019-07-30  8:29 ` Kalle Valo
  2019-08-06 12:41 ` [PATCH] " Kalle Valo
  0 siblings, 2 replies; 5+ messages in thread
From: Enrico Weigelt, metux IT consult @ 2019-07-29 15:24 UTC (permalink / raw)
  To: linux-kernel; +Cc: amitkarwar, siva8118, kvalo, linux-wireless, netdev

From: Enrico Weigelt <info@metux.net>

Explicitly return constants instead of variable (and rely on
it to be explicitly initialized), if the value is supposed
to be fixed anyways. Align it with the rest of the driver,
which does it the same way.

Signed-off-by: Enrico Weigelt <info@metux.net>
---
 drivers/net/wireless/rsi/rsi_91x_sdio.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/rsi/rsi_91x_sdio.c b/drivers/net/wireless/rsi/rsi_91x_sdio.c
index b42cd50..2a3577d 100644
--- a/drivers/net/wireless/rsi/rsi_91x_sdio.c
+++ b/drivers/net/wireless/rsi/rsi_91x_sdio.c
@@ -844,11 +844,11 @@ static int rsi_init_sdio_interface(struct rsi_hw *adapter,
 				   struct sdio_func *pfunction)
 {
 	struct rsi_91x_sdiodev *rsi_91x_dev;
-	int status = -ENOMEM;
+	int status;
 
 	rsi_91x_dev = kzalloc(sizeof(*rsi_91x_dev), GFP_KERNEL);
 	if (!rsi_91x_dev)
-		return status;
+		return -ENOMEM;
 
 	adapter->rsi_dev = rsi_91x_dev;
 
@@ -890,7 +890,7 @@ static int rsi_init_sdio_interface(struct rsi_hw *adapter,
 #ifdef CONFIG_RSI_DEBUGFS
 	adapter->num_debugfs_entries = MAX_DEBUGFS_ENTRIES;
 #endif
-	return status;
+	return 0;
 fail:
 	sdio_disable_func(pfunction);
 	sdio_release_host(pfunction);
-- 
1.9.1


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

* Re: [PATCH] drivers: net: wireless: rsi: return explicit error values
  2019-07-29 15:24 [PATCH] drivers: net: wireless: rsi: return explicit error values Enrico Weigelt, metux IT consult
@ 2019-07-30  8:29 ` Kalle Valo
  2019-08-06 12:41 ` [PATCH] " Kalle Valo
  1 sibling, 0 replies; 5+ messages in thread
From: Kalle Valo @ 2019-07-30  8:29 UTC (permalink / raw)
  To: Enrico Weigelt, metux IT consult
  Cc: linux-kernel, amitkarwar, siva8118, linux-wireless, netdev

"Enrico Weigelt, metux IT consult" <info@metux.net> writes:

> From: Enrico Weigelt <info@metux.net>
>
> Explicitly return constants instead of variable (and rely on
> it to be explicitly initialized), if the value is supposed
> to be fixed anyways. Align it with the rest of the driver,
> which does it the same way.
>
> Signed-off-by: Enrico Weigelt <info@metux.net>
> ---
>  drivers/net/wireless/rsi/rsi_91x_sdio.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)

The prefix should be just "rsi:", I'll fix that.

-- 
Kalle Valo

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

* Re: [PATCH] rsi: return explicit error values
  2019-07-29 15:24 [PATCH] drivers: net: wireless: rsi: return explicit error values Enrico Weigelt, metux IT consult
  2019-07-30  8:29 ` Kalle Valo
@ 2019-08-06 12:41 ` Kalle Valo
  1 sibling, 0 replies; 5+ messages in thread
From: Kalle Valo @ 2019-08-06 12:41 UTC (permalink / raw)
  To: Enrico Weigelt, metux IT consult
  Cc: linux-kernel, amitkarwar, siva8118, linux-wireless, netdev

"Enrico Weigelt, metux IT consult" <info@metux.net> wrote:

> From: Enrico Weigelt <info@metux.net>
> 
> Explicitly return constants instead of variable (and rely on
> it to be explicitly initialized), if the value is supposed
> to be fixed anyways. Align it with the rest of the driver,
> which does it the same way.
> 
> Signed-off-by: Enrico Weigelt <info@metux.net>

Patch applied to wireless-drivers-next.git, thanks.

706f0182b1ad rt2800usb: Add new rt2800usb device PLANEX GW-USMicroN

-- 
https://patchwork.kernel.org/patch/11064039/

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


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

* Re: [PATCH] drivers: net: wireless: rsi: return explicit error values
  2019-06-27 14:30 [PATCH] drivers: net: wireless: " Enrico Weigelt, metux IT consult
@ 2019-07-24 11:36 ` Kalle Valo
  0 siblings, 0 replies; 5+ messages in thread
From: Kalle Valo @ 2019-07-24 11:36 UTC (permalink / raw)
  To: Enrico Weigelt, metux IT consult
  Cc: linux-kernel, amitkarwar, siva8118, linux-wireless, netdev

"Enrico Weigelt, metux IT consult" <info@metux.net> wrote:

> From: Enrico Weigelt <info@metux.net>
> 
> Explicitly return constants instead of variable (and rely on
> it to be explicitly initialized), if the value is supposed
> to be fixed anyways. Align it with the rest of the driver,
> which does it the same way.
> 
> Signed-off-by: Enrico Weigelt <info@metux.net>

I'll fix the title prefix to only have "rsi:", no need to have the full
directory path there.

-- 
https://patchwork.kernel.org/patch/11019801/

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


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

* [PATCH] drivers: net: wireless: rsi: return explicit error values
@ 2019-06-27 14:30 Enrico Weigelt, metux IT consult
  2019-07-24 11:36 ` Kalle Valo
  0 siblings, 1 reply; 5+ messages in thread
From: Enrico Weigelt, metux IT consult @ 2019-06-27 14:30 UTC (permalink / raw)
  To: linux-kernel; +Cc: amitkarwar, siva8118, kvalo, linux-wireless, netdev

From: Enrico Weigelt <info@metux.net>

Explicitly return constants instead of variable (and rely on
it to be explicitly initialized), if the value is supposed
to be fixed anyways. Align it with the rest of the driver,
which does it the same way.

Signed-off-by: Enrico Weigelt <info@metux.net>
---
 drivers/net/wireless/rsi/rsi_91x_sdio.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/rsi/rsi_91x_sdio.c b/drivers/net/wireless/rsi/rsi_91x_sdio.c
index b42cd50..2a3577d 100644
--- a/drivers/net/wireless/rsi/rsi_91x_sdio.c
+++ b/drivers/net/wireless/rsi/rsi_91x_sdio.c
@@ -844,11 +844,11 @@ static int rsi_init_sdio_interface(struct rsi_hw *adapter,
 				   struct sdio_func *pfunction)
 {
 	struct rsi_91x_sdiodev *rsi_91x_dev;
-	int status = -ENOMEM;
+	int status;
 
 	rsi_91x_dev = kzalloc(sizeof(*rsi_91x_dev), GFP_KERNEL);
 	if (!rsi_91x_dev)
-		return status;
+		return -ENOMEM;
 
 	adapter->rsi_dev = rsi_91x_dev;
 
@@ -890,7 +890,7 @@ static int rsi_init_sdio_interface(struct rsi_hw *adapter,
 #ifdef CONFIG_RSI_DEBUGFS
 	adapter->num_debugfs_entries = MAX_DEBUGFS_ENTRIES;
 #endif
-	return status;
+	return 0;
 fail:
 	sdio_disable_func(pfunction);
 	sdio_release_host(pfunction);
-- 
1.9.1


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

end of thread, other threads:[~2019-08-06 12:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-29 15:24 [PATCH] drivers: net: wireless: rsi: return explicit error values Enrico Weigelt, metux IT consult
2019-07-30  8:29 ` Kalle Valo
2019-08-06 12:41 ` [PATCH] " Kalle Valo
  -- strict thread matches above, loose matches on Subject: below --
2019-06-27 14:30 [PATCH] drivers: net: wireless: " Enrico Weigelt, metux IT consult
2019-07-24 11:36 ` Kalle Valo

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