linux-staging.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] staging: rtl8723bs: remove unnecessary adapter
@ 2021-04-12 16:43 Bryan Brattlof
  2021-04-12 16:45 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 3+ messages in thread
From: Bryan Brattlof @ 2021-04-12 16:43 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Hans de Goede, Larry Finger
  Cc: linux-staging, linux-kernel, kernel-janitors, Bryan Brattlof

The if2 adapter is defined in rtw_dvr_init() and in the dvobj_priv
structure but never used anywhere in the driver. This will remove all
definitions of if2

Signed-off-by: Bryan Brattlof <hello@bryanbrattlof.com>
---
 drivers/staging/rtl8723bs/include/drv_types.h |  1 -
 drivers/staging/rtl8723bs/os_dep/sdio_intf.c  | 10 ++++------
 2 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/rtl8723bs/include/drv_types.h b/drivers/staging/rtl8723bs/include/drv_types.h
index 19da27fb5ddf..bf3de9a78f16 100644
--- a/drivers/staging/rtl8723bs/include/drv_types.h
+++ b/drivers/staging/rtl8723bs/include/drv_types.h
@@ -268,7 +268,6 @@ struct cam_entry_cache {
 struct dvobj_priv {
 	/*-------- below is common data --------*/
 	struct adapter *if1; /* PRIMARY_ADAPTER */
-	struct adapter *if2; /* SECONDARY_ADAPTER */
 
 	s32	processing_dev_remove;
 
diff --git a/drivers/staging/rtl8723bs/os_dep/sdio_intf.c b/drivers/staging/rtl8723bs/os_dep/sdio_intf.c
index 7090c1b3cc2f..a9a9631dd23c 100644
--- a/drivers/staging/rtl8723bs/os_dep/sdio_intf.c
+++ b/drivers/staging/rtl8723bs/os_dep/sdio_intf.c
@@ -369,7 +369,7 @@ static int rtw_drv_init(
 	const struct sdio_device_id *id)
 {
 	int status = _FAIL;
-	struct adapter *if1 = NULL, *if2 = NULL;
+	struct adapter *if1 = NULL;
 	struct dvobj_priv *dvobj;
 
 	dvobj = sdio_dvobj_init(func);
@@ -383,17 +383,15 @@ static int rtw_drv_init(
 	/* dev_alloc_name && register_netdev */
 	status = rtw_drv_register_netdev(if1);
 	if (status != _SUCCESS)
-		goto free_if2;
+		goto free_if1;
 
 	if (sdio_alloc_irq(dvobj) != _SUCCESS)
-		goto free_if2;
+		goto free_if1;
 
 	rtw_ndev_notifier_register();
 	status = _SUCCESS;
 
-free_if2:
-	if (status != _SUCCESS && if2) {
-	}
+free_if1:
 	if (status != _SUCCESS && if1)
 		rtw_sdio_if1_deinit(if1);
 
-- 
2.27.0



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

* Re: [PATCH v2] staging: rtl8723bs: remove unnecessary adapter
  2021-04-12 16:43 [PATCH v2] staging: rtl8723bs: remove unnecessary adapter Bryan Brattlof
@ 2021-04-12 16:45 ` Greg Kroah-Hartman
  2021-04-12 17:10   ` Bryan Brattlof
  0 siblings, 1 reply; 3+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-12 16:45 UTC (permalink / raw)
  To: Bryan Brattlof
  Cc: Hans de Goede, Larry Finger, linux-staging, linux-kernel,
	kernel-janitors

On Mon, Apr 12, 2021 at 04:43:56PM +0000, Bryan Brattlof wrote:
> The if2 adapter is defined in rtw_dvr_init() and in the dvobj_priv
> structure but never used anywhere in the driver. This will remove all
> definitions of if2
> 
> Signed-off-by: Bryan Brattlof <hello@bryanbrattlof.com>
> ---
>  drivers/staging/rtl8723bs/include/drv_types.h |  1 -
>  drivers/staging/rtl8723bs/os_dep/sdio_intf.c  | 10 ++++------
>  2 files changed, 4 insertions(+), 7 deletions(-)

What changed from v1?  That goes below the --- line.

v3?

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

* Re: [PATCH v2] staging: rtl8723bs: remove unnecessary adapter
  2021-04-12 16:45 ` Greg Kroah-Hartman
@ 2021-04-12 17:10   ` Bryan Brattlof
  0 siblings, 0 replies; 3+ messages in thread
From: Bryan Brattlof @ 2021-04-12 17:10 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Hans de Goede, Larry Finger, linux-staging, linux-kernel,
	kernel-janitors

On Mon, Apr 12, 2021 at 06:45:35PM +0200, Greg Kroah-Hartman wrote:
>
>On Mon, Apr 12, 2021 at 04:43:56PM +0000, Bryan Brattlof wrote:
>> The if2 adapter is defined in rtw_dvr_init() and in the dvobj_priv
>> structure but never used anywhere in the driver. This will remove all
>> definitions of if2
>>
>> Signed-off-by: Bryan Brattlof <hello@bryanbrattlof.com>
>> ---
>>  drivers/staging/rtl8723bs/include/drv_types.h |  1 -
>>  drivers/staging/rtl8723bs/os_dep/sdio_intf.c  | 10 ++++------
>>  2 files changed, 4 insertions(+), 7 deletions(-)
>
>What changed from v1?  That goes below the --- line.
>
>v3?

Oops.

it's the simple things that always seem to be the hardest :)

During the rebase to next-20210412, I lost the bracket on the 
conditional statement:

   394: +free_if1:
   395:          if (status != _SUCCESS && if1) {
						^

I'll be sending v3 shortly with a proper change long :)
--
~Bryan








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

end of thread, other threads:[~2021-04-12 17:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-12 16:43 [PATCH v2] staging: rtl8723bs: remove unnecessary adapter Bryan Brattlof
2021-04-12 16:45 ` Greg Kroah-Hartman
2021-04-12 17:10   ` Bryan Brattlof

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