From nobody Mon Sep 15 12:41:47 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 41C3CC46467 for ; Wed, 11 Jan 2023 19:57:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232608AbjAKT5M (ORCPT ); Wed, 11 Jan 2023 14:57:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55924 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229935AbjAKT5B (ORCPT ); Wed, 11 Jan 2023 14:57:01 -0500 Received: from viti.kaiser.cx (viti.kaiser.cx [IPv6:2a01:238:43fe:e600:cd0c:bd4a:7a3:8e9f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0E08C1789D for ; Wed, 11 Jan 2023 11:56:57 -0800 (PST) Received: from dslb-188-096-145-172.188.096.pools.vodafone-ip.de ([188.96.145.172] helo=martin-debian-2.paytec.ch) by viti.kaiser.cx with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1pFhDQ-0005F2-Hi; Wed, 11 Jan 2023 20:56:52 +0100 From: Martin Kaiser To: Greg Kroah-Hartman Cc: Larry Finger , Phillip Potter , Michael Straube , Pavel Skripkin , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Martin Kaiser Subject: [PATCH 01/20] staging: r8188eu: remove struct io_priv Date: Wed, 11 Jan 2023 20:56:21 +0100 Message-Id: <20230111195640.306748-2-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230111195640.306748-1-martin@kaiser.cx> References: <20230111195640.306748-1-martin@kaiser.cx> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" struct io_priv has only one member (and a pointer to the enclosing struct adapter). We can remove struct io_priv and move its member directly into struct adapter. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 --- drivers/staging/r8188eu/hal/usb_ops_linux.c | 21 +++++++-------------- drivers/staging/r8188eu/include/drv_types.h | 2 +- drivers/staging/r8188eu/include/rtw_io.h | 5 ----- drivers/staging/r8188eu/os_dep/usb_intf.c | 5 +---- 4 files changed, 9 insertions(+), 24 deletions(-) diff --git a/drivers/staging/r8188eu/hal/usb_ops_linux.c b/drivers/staging/= r8188eu/hal/usb_ops_linux.c index a238d29a3a46..0deaa5c24ab2 100644 --- a/drivers/staging/r8188eu/hal/usb_ops_linux.c +++ b/drivers/staging/r8188eu/hal/usb_ops_linux.c @@ -95,8 +95,7 @@ static int usb_write(struct intf_hdl *intf, u16 value, vo= id *data, u8 size) =20 int __must_check rtw_read8(struct adapter *adapter, u32 addr, u8 *data) { - struct io_priv *io_priv =3D &adapter->iopriv; - struct intf_hdl *intf =3D &io_priv->intf; + struct intf_hdl *intf =3D &adapter->intf; u16 value =3D addr & 0xffff; =20 return usb_read(intf, value, data, 1); @@ -104,8 +103,7 @@ int __must_check rtw_read8(struct adapter *adapter, u32= addr, u8 *data) =20 int __must_check rtw_read16(struct adapter *adapter, u32 addr, u16 *data) { - struct io_priv *io_priv =3D &adapter->iopriv; - struct intf_hdl *intf =3D &io_priv->intf; + struct intf_hdl *intf =3D &adapter->intf; u16 value =3D addr & 0xffff; __le16 le_data; int res; @@ -121,8 +119,7 @@ int __must_check rtw_read16(struct adapter *adapter, u3= 2 addr, u16 *data) =20 int __must_check rtw_read32(struct adapter *adapter, u32 addr, u32 *data) { - struct io_priv *io_priv =3D &adapter->iopriv; - struct intf_hdl *intf =3D &io_priv->intf; + struct intf_hdl *intf =3D &adapter->intf; u16 value =3D addr & 0xffff; __le32 le_data; int res; @@ -138,8 +135,7 @@ int __must_check rtw_read32(struct adapter *adapter, u3= 2 addr, u32 *data) =20 int rtw_write8(struct adapter *adapter, u32 addr, u8 val) { - struct io_priv *io_priv =3D &adapter->iopriv; - struct intf_hdl *intf =3D &io_priv->intf; + struct intf_hdl *intf =3D &adapter->intf; u16 value =3D addr & 0xffff; int ret; =20 @@ -150,8 +146,7 @@ int rtw_write8(struct adapter *adapter, u32 addr, u8 va= l) =20 int rtw_write16(struct adapter *adapter, u32 addr, u16 val) { - struct io_priv *io_priv =3D &adapter->iopriv; - struct intf_hdl *intf =3D &io_priv->intf; + struct intf_hdl *intf =3D &adapter->intf; u16 value =3D addr & 0xffff; __le16 data =3D cpu_to_le16(val); int ret; @@ -163,8 +158,7 @@ int rtw_write16(struct adapter *adapter, u32 addr, u16 = val) =20 int rtw_write32(struct adapter *adapter, u32 addr, u32 val) { - struct io_priv *io_priv =3D &adapter->iopriv; - struct intf_hdl *intf =3D &io_priv->intf; + struct intf_hdl *intf =3D &adapter->intf; u16 value =3D addr & 0xffff; __le32 data =3D cpu_to_le32(val); int ret; @@ -176,8 +170,7 @@ int rtw_write32(struct adapter *adapter, u32 addr, u32 = val) =20 int rtw_writeN(struct adapter *adapter, u32 addr, u32 length, u8 *data) { - struct io_priv *io_priv =3D &adapter->iopriv; - struct intf_hdl *intf =3D &io_priv->intf; + struct intf_hdl *intf =3D &adapter->intf; u16 value =3D addr & 0xffff; int ret; =20 diff --git a/drivers/staging/r8188eu/include/drv_types.h b/drivers/staging/= r8188eu/include/drv_types.h index 4803d0c77d70..614673902377 100644 --- a/drivers/staging/r8188eu/include/drv_types.h +++ b/drivers/staging/r8188eu/include/drv_types.h @@ -152,7 +152,7 @@ struct adapter { struct mlme_ext_priv mlmeextpriv; struct cmd_priv cmdpriv; struct evt_priv evtpriv; - struct io_priv iopriv; + struct intf_hdl intf; struct xmit_priv xmitpriv; struct recv_priv recvpriv; struct sta_priv stapriv; diff --git a/drivers/staging/r8188eu/include/rtw_io.h b/drivers/staging/r81= 88eu/include/rtw_io.h index e9744694204b..c15b2e873fd5 100644 --- a/drivers/staging/r8188eu/include/rtw_io.h +++ b/drivers/staging/r8188eu/include/rtw_io.h @@ -203,11 +203,6 @@ struct io_queue { struct intf_hdl intf; }; =20 -struct io_priv { - struct adapter *padapter; - struct intf_hdl intf; -}; - uint ioreq_flush(struct adapter *adapter, struct io_queue *ioqueue); void sync_ioreq_enqueue(struct io_req *preq, struct io_queue *ioqueue); uint sync_ioreq_flush(struct adapter *adapter, struct io_queue *ioqueue); diff --git a/drivers/staging/r8188eu/os_dep/usb_intf.c b/drivers/staging/r8= 188eu/os_dep/usb_intf.c index 5fbfbcd95de2..1f70e5fee1b2 100644 --- a/drivers/staging/r8188eu/os_dep/usb_intf.c +++ b/drivers/staging/r8188eu/os_dep/usb_intf.c @@ -290,7 +290,6 @@ static int rtw_usb_if1_init(struct dvobj_priv *dvobj, s= truct usb_interface *pusb { struct adapter *padapter =3D NULL; struct net_device *pnetdev =3D NULL; - struct io_priv *piopriv; struct intf_hdl *pintf; int ret; =20 @@ -319,9 +318,7 @@ static int rtw_usb_if1_init(struct dvobj_priv *dvobj, s= truct usb_interface *pusb padapter->intf_stop =3D &usb_intf_stop; =20 /* step init_io_priv */ - piopriv =3D &padapter->iopriv; - pintf =3D &piopriv->intf; - piopriv->padapter =3D padapter; + pintf =3D &padapter->intf; pintf->padapter =3D padapter; pintf->pintf_dev =3D adapter_to_dvobj(padapter); =20 --=20 2.30.2 From nobody Mon Sep 15 12:41:47 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6F3D5C5479D for ; Wed, 11 Jan 2023 19:57:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235796AbjAKT5R (ORCPT ); Wed, 11 Jan 2023 14:57:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55846 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234746AbjAKT5B (ORCPT ); Wed, 11 Jan 2023 14:57:01 -0500 Received: from viti.kaiser.cx (viti.kaiser.cx [IPv6:2a01:238:43fe:e600:cd0c:bd4a:7a3:8e9f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BCB12E020 for ; Wed, 11 Jan 2023 11:56:59 -0800 (PST) Received: from dslb-188-096-145-172.188.096.pools.vodafone-ip.de ([188.96.145.172] helo=martin-debian-2.paytec.ch) by viti.kaiser.cx with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1pFhDR-0005F2-DZ; Wed, 11 Jan 2023 20:56:53 +0100 From: Martin Kaiser To: Greg Kroah-Hartman Cc: Larry Finger , Phillip Potter , Michael Straube , Pavel Skripkin , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Martin Kaiser Subject: [PATCH 02/20] staging: r8188eu: remove io function prototypes Date: Wed, 11 Jan 2023 20:56:22 +0100 Message-Id: <20230111195640.306748-3-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230111195640.306748-1-martin@kaiser.cx> References: <20230111195640.306748-1-martin@kaiser.cx> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Remove some prototypes for io functions which are not present in the r8188eu driver. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 --- drivers/staging/r8188eu/include/rtw_io.h | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/drivers/staging/r8188eu/include/rtw_io.h b/drivers/staging/r81= 88eu/include/rtw_io.h index c15b2e873fd5..18e95bccda49 100644 --- a/drivers/staging/r8188eu/include/rtw_io.h +++ b/drivers/staging/r8188eu/include/rtw_io.h @@ -203,12 +203,6 @@ struct io_queue { struct intf_hdl intf; }; =20 -uint ioreq_flush(struct adapter *adapter, struct io_queue *ioqueue); -void sync_ioreq_enqueue(struct io_req *preq, struct io_queue *ioqueue); -uint sync_ioreq_flush(struct adapter *adapter, struct io_queue *ioqueue); -uint free_ioreq(struct io_req *preq, struct io_queue *pio_queue); -struct io_req *alloc_ioreq(struct io_queue *pio_q); - uint register_intf_hdl(u8 *dev, struct intf_hdl *pintfhdl); void unregister_intf_hdl(struct intf_hdl *pintfhdl); =20 @@ -273,11 +267,6 @@ void async_write32(struct adapter *adapter, u32 addr, = u32 val, void async_write_mem(struct adapter *adapter, u32 addr, u32 cnt, u8 *pmem); void async_write_port(struct adapter *adapter, u32 addr, u32 cnt, u8 *pmem= ); =20 -uint alloc_io_queue(struct adapter *adapter); -void free_io_queue(struct adapter *adapter); -void async_bus_io(struct io_queue *pio_q); -void bus_sync_io(struct io_queue *pio_q); -u32 _ioreq2rwmem(struct io_queue *pio_q); void dev_power_down(struct adapter *Adapter, u8 bpwrup); =20 #endif /* _RTL8711_IO_H_ */ --=20 2.30.2 From nobody Mon Sep 15 12:41:47 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0EAB3C5479D for ; Wed, 11 Jan 2023 19:57:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238196AbjAKT5W (ORCPT ); Wed, 11 Jan 2023 14:57:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55520 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234769AbjAKT5B (ORCPT ); Wed, 11 Jan 2023 14:57:01 -0500 Received: from viti.kaiser.cx (viti.kaiser.cx [IPv6:2a01:238:43fe:e600:cd0c:bd4a:7a3:8e9f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 40BD9183AA for ; Wed, 11 Jan 2023 11:57:00 -0800 (PST) Received: from dslb-188-096-145-172.188.096.pools.vodafone-ip.de ([188.96.145.172] helo=martin-debian-2.paytec.ch) by viti.kaiser.cx with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1pFhDS-0005F2-6H; Wed, 11 Jan 2023 20:56:54 +0100 From: Martin Kaiser To: Greg Kroah-Hartman Cc: Larry Finger , Phillip Potter , Michael Straube , Pavel Skripkin , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Martin Kaiser Subject: [PATCH 03/20] staging: r8188eu: remove ioreq function prototypes Date: Wed, 11 Jan 2023 20:56:23 +0100 Message-Id: <20230111195640.306748-4-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230111195640.306748-1-martin@kaiser.cx> References: <20230111195640.306748-1-martin@kaiser.cx> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Remove some prototypes for ioreq functions which are not present in the r8188eu driver. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 --- drivers/staging/r8188eu/include/rtw_io.h | 8 -------- 1 file changed, 8 deletions(-) diff --git a/drivers/staging/r8188eu/include/rtw_io.h b/drivers/staging/r81= 88eu/include/rtw_io.h index 18e95bccda49..1d65c60cbe27 100644 --- a/drivers/staging/r8188eu/include/rtw_io.h +++ b/drivers/staging/r8188eu/include/rtw_io.h @@ -227,14 +227,6 @@ void rtw_write_port_cancel(struct adapter *adapter); =20 void rtw_write_scsi(struct adapter *adapter, u32 cnt, u8 *pmem); =20 -/* ioreq */ -void ioreq_read8(struct adapter *adapter, u32 addr, u8 *pval); -void ioreq_read16(struct adapter *adapter, u32 addr, u16 *pval); -void ioreq_read32(struct adapter *adapter, u32 addr, u32 *pval); -void ioreq_write8(struct adapter *adapter, u32 addr, u8 val); -void ioreq_write16(struct adapter *adapter, u32 addr, u16 val); -void ioreq_write32(struct adapter *adapter, u32 addr, u32 val); - uint async_read8(struct adapter *adapter, u32 addr, u8 *pbuff, void (*_async_io_callback)(struct adapter *padater, struct io_req *pio_req, --=20 2.30.2 From nobody Mon Sep 15 12:41:47 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9FFABC54EBC for ; Wed, 11 Jan 2023 19:57:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234746AbjAKT53 (ORCPT ); Wed, 11 Jan 2023 14:57:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56170 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235167AbjAKT5B (ORCPT ); Wed, 11 Jan 2023 14:57:01 -0500 Received: from viti.kaiser.cx (viti.kaiser.cx [IPv6:2a01:238:43fe:e600:cd0c:bd4a:7a3:8e9f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B4B95183BE for ; Wed, 11 Jan 2023 11:57:00 -0800 (PST) Received: from dslb-188-096-145-172.188.096.pools.vodafone-ip.de ([188.96.145.172] helo=martin-debian-2.paytec.ch) by viti.kaiser.cx with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1pFhDT-0005F2-QF; Wed, 11 Jan 2023 20:56:56 +0100 From: Martin Kaiser To: Greg Kroah-Hartman Cc: Larry Finger , Phillip Potter , Michael Straube , Pavel Skripkin , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Martin Kaiser Subject: [PATCH 04/20] staging: r8188eu: remove async read function prototypes Date: Wed, 11 Jan 2023 20:56:24 +0100 Message-Id: <20230111195640.306748-5-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230111195640.306748-1-martin@kaiser.cx> References: <20230111195640.306748-1-martin@kaiser.cx> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Remove some prototypes for async read functions which are not present in the r8188eu driver. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 --- drivers/staging/r8188eu/include/rtw_io.h | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/drivers/staging/r8188eu/include/rtw_io.h b/drivers/staging/r81= 88eu/include/rtw_io.h index 1d65c60cbe27..f9394329b674 100644 --- a/drivers/staging/r8188eu/include/rtw_io.h +++ b/drivers/staging/r8188eu/include/rtw_io.h @@ -227,22 +227,6 @@ void rtw_write_port_cancel(struct adapter *adapter); =20 void rtw_write_scsi(struct adapter *adapter, u32 cnt, u8 *pmem); =20 -uint async_read8(struct adapter *adapter, u32 addr, u8 *pbuff, - void (*_async_io_callback)(struct adapter *padater, - struct io_req *pio_req, - u8 *cnxt), u8 *cnxt); -uint async_read16(struct adapter *adapter, u32 addr, u8 *pbuff, - void (*_async_io_callback)(struct adapter *padater, - struct io_req *pio_req, - u8 *cnxt), u8 *cnxt); -uint async_read32(struct adapter *adapter, u32 addr, u8 *pbuff, - void (*_async_io_callback)(struct adapter *padater, - struct io_req *pio_req, - u8 *cnxt), u8 *cnxt); - -void async_read_mem(struct adapter *adapter, u32 addr, u32 cnt, u8 *pmem); -void async_read_port(struct adapter *adapter, u32 addr, u32 cnt, u8 *pmem); - void async_write8(struct adapter *adapter, u32 addr, u8 val, void (*_async_io_callback)(struct adapter *padater, struct io_req *pio_req, --=20 2.30.2 From nobody Mon Sep 15 12:41:47 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2C210C46467 for ; Wed, 11 Jan 2023 19:57:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239512AbjAKT5o (ORCPT ); Wed, 11 Jan 2023 14:57:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55984 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233899AbjAKT5C (ORCPT ); Wed, 11 Jan 2023 14:57:02 -0500 Received: from viti.kaiser.cx (viti.kaiser.cx [IPv6:2a01:238:43fe:e600:cd0c:bd4a:7a3:8e9f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DA2832BF for ; Wed, 11 Jan 2023 11:57:01 -0800 (PST) Received: from dslb-188-096-145-172.188.096.pools.vodafone-ip.de ([188.96.145.172] helo=martin-debian-2.paytec.ch) by viti.kaiser.cx with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1pFhDV-0005F2-3Z; Wed, 11 Jan 2023 20:56:57 +0100 From: Martin Kaiser To: Greg Kroah-Hartman Cc: Larry Finger , Phillip Potter , Michael Straube , Pavel Skripkin , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Martin Kaiser Subject: [PATCH 05/20] staging: r8188eu: remove async write function prototypes Date: Wed, 11 Jan 2023 20:56:25 +0100 Message-Id: <20230111195640.306748-6-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230111195640.306748-1-martin@kaiser.cx> References: <20230111195640.306748-1-martin@kaiser.cx> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Remove some prototypes for async write functions which are not present in the r8188eu driver. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 --- drivers/staging/r8188eu/include/rtw_io.h | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/drivers/staging/r8188eu/include/rtw_io.h b/drivers/staging/r81= 88eu/include/rtw_io.h index f9394329b674..6ce099e91e20 100644 --- a/drivers/staging/r8188eu/include/rtw_io.h +++ b/drivers/staging/r8188eu/include/rtw_io.h @@ -227,22 +227,6 @@ void rtw_write_port_cancel(struct adapter *adapter); =20 void rtw_write_scsi(struct adapter *adapter, u32 cnt, u8 *pmem); =20 -void async_write8(struct adapter *adapter, u32 addr, u8 val, - void (*_async_io_callback)(struct adapter *padater, - struct io_req *pio_req, - u8 *cnxt), u8 *cnxt); -void async_write16(struct adapter *adapter, u32 addr, u16 val, - void (*_async_io_callback)(struct adapter *padater, - struct io_req *pio_req, - u8 *cnxt), u8 *cnxt); -void async_write32(struct adapter *adapter, u32 addr, u32 val, - void (*_async_io_callback)(struct adapter *padater, - struct io_req *pio_req, - u8 *cnxt), u8 *cnxt); - -void async_write_mem(struct adapter *adapter, u32 addr, u32 cnt, u8 *pmem); -void async_write_port(struct adapter *adapter, u32 addr, u32 cnt, u8 *pmem= ); - void dev_power_down(struct adapter *Adapter, u8 bpwrup); =20 #endif /* _RTL8711_IO_H_ */ --=20 2.30.2 From nobody Mon Sep 15 12:41:47 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7A79CC46467 for ; Wed, 11 Jan 2023 19:57:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239364AbjAKT5l (ORCPT ); Wed, 11 Jan 2023 14:57:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56232 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234409AbjAKT5F (ORCPT ); Wed, 11 Jan 2023 14:57:05 -0500 Received: from viti.kaiser.cx (viti.kaiser.cx [IPv6:2a01:238:43fe:e600:cd0c:bd4a:7a3:8e9f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2A287BA5 for ; Wed, 11 Jan 2023 11:57:04 -0800 (PST) Received: from dslb-188-096-145-172.188.096.pools.vodafone-ip.de ([188.96.145.172] helo=martin-debian-2.paytec.ch) by viti.kaiser.cx with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1pFhDV-0005F2-Tu; Wed, 11 Jan 2023 20:56:57 +0100 From: Martin Kaiser To: Greg Kroah-Hartman Cc: Larry Finger , Phillip Potter , Michael Straube , Pavel Skripkin , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Martin Kaiser Subject: [PATCH 06/20] staging: r8188eu: remove struct io_queue Date: Wed, 11 Jan 2023 20:56:26 +0100 Message-Id: <20230111195640.306748-7-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230111195640.306748-1-martin@kaiser.cx> References: <20230111195640.306748-1-martin@kaiser.cx> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" struct io_queue is not used in the r8188eu driver. Remove it. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 --- drivers/staging/r8188eu/include/rtw_io.h | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/drivers/staging/r8188eu/include/rtw_io.h b/drivers/staging/r81= 88eu/include/rtw_io.h index 6ce099e91e20..7d1f3cc20b57 100644 --- a/drivers/staging/r8188eu/include/rtw_io.h +++ b/drivers/staging/r8188eu/include/rtw_io.h @@ -82,7 +82,6 @@ =20 struct intf_priv; struct intf_hdl; -struct io_queue; =20 struct io_req { struct list_head list; @@ -188,21 +187,6 @@ struct reg_protocol_wt { #endif }; =20 -/* -Below is the data structure used by _io_handler -*/ - -struct io_queue { - spinlock_t lock; - struct list_head free_ioreqs; - struct list_head pending; /* The io_req list that will be served - * in the single protocol read/write.*/ - struct list_head processing; - u8 *free_ioreqs_buf; /* 4-byte aligned */ - u8 *pallocated_free_ioreqs_buf; - struct intf_hdl intf; -}; - uint register_intf_hdl(u8 *dev, struct intf_hdl *pintfhdl); void unregister_intf_hdl(struct intf_hdl *pintfhdl); =20 --=20 2.30.2 From nobody Mon Sep 15 12:41:47 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0CF3EC46467 for ; Wed, 11 Jan 2023 19:57:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235430AbjAKT5u (ORCPT ); Wed, 11 Jan 2023 14:57:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56078 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232580AbjAKT5D (ORCPT ); Wed, 11 Jan 2023 14:57:03 -0500 Received: from viti.kaiser.cx (viti.kaiser.cx [IPv6:2a01:238:43fe:e600:cd0c:bd4a:7a3:8e9f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3DCFBB73 for ; Wed, 11 Jan 2023 11:57:03 -0800 (PST) Received: from dslb-188-096-145-172.188.096.pools.vodafone-ip.de ([188.96.145.172] helo=martin-debian-2.paytec.ch) by viti.kaiser.cx with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1pFhDW-0005F2-NW; Wed, 11 Jan 2023 20:56:58 +0100 From: Martin Kaiser To: Greg Kroah-Hartman Cc: Larry Finger , Phillip Potter , Michael Straube , Pavel Skripkin , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Martin Kaiser Subject: [PATCH 07/20] staging: r8188eu: remove attrib function prototypes Date: Wed, 11 Jan 2023 20:56:27 +0100 Message-Id: <20230111195640.306748-8-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230111195640.306748-1-martin@kaiser.cx> References: <20230111195640.306748-1-martin@kaiser.cx> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Remove the prototypes for attrib read and write functions which are not present in the r8188eu driver. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 --- drivers/staging/r8188eu/include/rtw_io.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/staging/r8188eu/include/rtw_io.h b/drivers/staging/r81= 88eu/include/rtw_io.h index 7d1f3cc20b57..9cf4f233ae60 100644 --- a/drivers/staging/r8188eu/include/rtw_io.h +++ b/drivers/staging/r8188eu/include/rtw_io.h @@ -190,9 +190,6 @@ struct reg_protocol_wt { uint register_intf_hdl(u8 *dev, struct intf_hdl *pintfhdl); void unregister_intf_hdl(struct intf_hdl *pintfhdl); =20 -void _rtw_attrib_read(struct adapter *adapter, u32 addr, u32 cnt, u8 *pmem= ); -void _rtw_attrib_write(struct adapter *adapter, u32 addr, u32 cnt, u8 *pme= m); - int __must_check rtw_read8(struct adapter *adapter, u32 addr, u8 *data); int __must_check rtw_read16(struct adapter *adapter, u32 addr, u16 *data); int __must_check rtw_read32(struct adapter *adapter, u32 addr, u32 *data); --=20 2.30.2 From nobody Mon Sep 15 12:41:47 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 21521C46467 for ; Wed, 11 Jan 2023 19:57:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239175AbjAKT5e (ORCPT ); Wed, 11 Jan 2023 14:57:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56132 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234039AbjAKT5E (ORCPT ); Wed, 11 Jan 2023 14:57:04 -0500 Received: from viti.kaiser.cx (viti.kaiser.cx [IPv6:2a01:238:43fe:e600:cd0c:bd4a:7a3:8e9f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EDB71302 for ; Wed, 11 Jan 2023 11:57:03 -0800 (PST) Received: from dslb-188-096-145-172.188.096.pools.vodafone-ip.de ([188.96.145.172] helo=martin-debian-2.paytec.ch) by viti.kaiser.cx with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1pFhDX-0005F2-GP; Wed, 11 Jan 2023 20:56:59 +0100 From: Martin Kaiser To: Greg Kroah-Hartman Cc: Larry Finger , Phillip Potter , Michael Straube , Pavel Skripkin , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Martin Kaiser Subject: [PATCH 08/20] staging: r8188eu: remove rtw_write_scsi function prototype Date: Wed, 11 Jan 2023 20:56:28 +0100 Message-Id: <20230111195640.306748-9-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230111195640.306748-1-martin@kaiser.cx> References: <20230111195640.306748-1-martin@kaiser.cx> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" The rtw_write_scsi function is not present in the r8188eu driver. Remove its prototype. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 --- drivers/staging/r8188eu/include/rtw_io.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/staging/r8188eu/include/rtw_io.h b/drivers/staging/r81= 88eu/include/rtw_io.h index 9cf4f233ae60..7c4fe273cc0d 100644 --- a/drivers/staging/r8188eu/include/rtw_io.h +++ b/drivers/staging/r8188eu/include/rtw_io.h @@ -206,8 +206,6 @@ void _rtw_write_mem(struct adapter *adapter, u32 addr, = u32 cnt, u8 *pmem); u32 rtw_write_port(struct adapter *adapter, u32 addr, u32 cnt, u8 *pmem); void rtw_write_port_cancel(struct adapter *adapter); =20 -void rtw_write_scsi(struct adapter *adapter, u32 cnt, u8 *pmem); - void dev_power_down(struct adapter *Adapter, u8 bpwrup); =20 #endif /* _RTL8711_IO_H_ */ --=20 2.30.2 From nobody Mon Sep 15 12:41:47 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 84EE4C5479D for ; Wed, 11 Jan 2023 19:57:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239286AbjAKT5i (ORCPT ); Wed, 11 Jan 2023 14:57:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56156 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232344AbjAKT5F (ORCPT ); Wed, 11 Jan 2023 14:57:05 -0500 Received: from viti.kaiser.cx (viti.kaiser.cx [IPv6:2a01:238:43fe:e600:cd0c:bd4a:7a3:8e9f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 48080BB7 for ; Wed, 11 Jan 2023 11:57:05 -0800 (PST) Received: from dslb-188-096-145-172.188.096.pools.vodafone-ip.de ([188.96.145.172] helo=martin-debian-2.paytec.ch) by viti.kaiser.cx with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1pFhDY-0005F2-8f; Wed, 11 Jan 2023 20:57:00 +0100 From: Martin Kaiser To: Greg Kroah-Hartman Cc: Larry Finger , Phillip Potter , Michael Straube , Pavel Skripkin , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Martin Kaiser Subject: [PATCH 09/20] staging: r8188eu: remove dev_power_down function prototype Date: Wed, 11 Jan 2023 20:56:29 +0100 Message-Id: <20230111195640.306748-10-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230111195640.306748-1-martin@kaiser.cx> References: <20230111195640.306748-1-martin@kaiser.cx> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" The dev_power_down function is not present in the r8188eu driver. Remove its prototype. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 --- drivers/staging/r8188eu/include/rtw_io.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/staging/r8188eu/include/rtw_io.h b/drivers/staging/r81= 88eu/include/rtw_io.h index 7c4fe273cc0d..4800c8249721 100644 --- a/drivers/staging/r8188eu/include/rtw_io.h +++ b/drivers/staging/r8188eu/include/rtw_io.h @@ -206,6 +206,4 @@ void _rtw_write_mem(struct adapter *adapter, u32 addr, = u32 cnt, u8 *pmem); u32 rtw_write_port(struct adapter *adapter, u32 addr, u32 cnt, u8 *pmem); void rtw_write_port_cancel(struct adapter *adapter); =20 -void dev_power_down(struct adapter *Adapter, u8 bpwrup); - #endif /* _RTL8711_IO_H_ */ --=20 2.30.2 From nobody Mon Sep 15 12:41:47 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7CA21C46467 for ; Wed, 11 Jan 2023 19:57:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229869AbjAKT55 (ORCPT ); Wed, 11 Jan 2023 14:57:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56246 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234959AbjAKT5G (ORCPT ); Wed, 11 Jan 2023 14:57:06 -0500 Received: from viti.kaiser.cx (viti.kaiser.cx [IPv6:2a01:238:43fe:e600:cd0c:bd4a:7a3:8e9f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CC085D6B for ; Wed, 11 Jan 2023 11:57:05 -0800 (PST) Received: from dslb-188-096-145-172.188.096.pools.vodafone-ip.de ([188.96.145.172] helo=martin-debian-2.paytec.ch) by viti.kaiser.cx with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1pFhDZ-0005F2-0e; Wed, 11 Jan 2023 20:57:01 +0100 From: Martin Kaiser To: Greg Kroah-Hartman Cc: Larry Finger , Phillip Potter , Michael Straube , Pavel Skripkin , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Martin Kaiser Subject: [PATCH 10/20] staging: r8188eu: remove struct reg_protocol_rd Date: Wed, 11 Jan 2023 20:56:30 +0100 Message-Id: <20230111195640.306748-11-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230111195640.306748-1-martin@kaiser.cx> References: <20230111195640.306748-1-martin@kaiser.cx> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Remove struct reg_protocol_rd. It's not used in the r8188eu driver. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 --- drivers/staging/r8188eu/include/rtw_io.h | 43 ------------------------ 1 file changed, 43 deletions(-) diff --git a/drivers/staging/r8188eu/include/rtw_io.h b/drivers/staging/r81= 88eu/include/rtw_io.h index 4800c8249721..858fd9cbb57a 100644 --- a/drivers/staging/r8188eu/include/rtw_io.h +++ b/drivers/staging/r8188eu/include/rtw_io.h @@ -102,49 +102,6 @@ struct intf_hdl { struct dvobj_priv *pintf_dev; }; =20 -struct reg_protocol_rd { -#ifdef __LITTLE_ENDIAN - /* DW1 */ - u32 NumOfTrans:4; - u32 Reserved1:4; - u32 Reserved2:24; - /* DW2 */ - u32 ByteCount:7; - u32 WriteEnable:1; /* 0:read, 1:write */ - u32 FixOrContinuous:1; /* 0:continuous, 1: Fix */ - u32 BurstMode:1; - u32 Byte1Access:1; - u32 Byte2Access:1; - u32 Byte4Access:1; - u32 Reserved3:3; - u32 Reserved4:16; - /* DW3 */ - u32 BusAddress; - /* DW4 */ - /* u32 Value; */ -#else -/* DW1 */ - u32 Reserved1:4; - u32 NumOfTrans:4; - u32 Reserved2:24; - /* DW2 */ - u32 WriteEnable:1; - u32 ByteCount:7; - u32 Reserved3:3; - u32 Byte4Access:1; - - u32 Byte2Access:1; - u32 Byte1Access:1; - u32 BurstMode:1; - u32 FixOrContinuous:1; - u32 Reserved4:16; - /* DW3 */ - u32 BusAddress; - - /* DW4 */ -#endif -}; - struct reg_protocol_wt { #ifdef __LITTLE_ENDIAN /* DW1 */ --=20 2.30.2 From nobody Mon Sep 15 12:41:47 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3CFD2C5479D for ; Wed, 11 Jan 2023 19:58:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235822AbjAKT6D (ORCPT ); Wed, 11 Jan 2023 14:58:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56168 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233532AbjAKT5I (ORCPT ); Wed, 11 Jan 2023 14:57:08 -0500 Received: from viti.kaiser.cx (viti.kaiser.cx [IPv6:2a01:238:43fe:e600:cd0c:bd4a:7a3:8e9f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1B4BED93 for ; Wed, 11 Jan 2023 11:57:06 -0800 (PST) Received: from dslb-188-096-145-172.188.096.pools.vodafone-ip.de ([188.96.145.172] helo=martin-debian-2.paytec.ch) by viti.kaiser.cx with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1pFhDZ-0005F2-PV; Wed, 11 Jan 2023 20:57:01 +0100 From: Martin Kaiser To: Greg Kroah-Hartman Cc: Larry Finger , Phillip Potter , Michael Straube , Pavel Skripkin , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Martin Kaiser Subject: [PATCH 11/20] staging: r8188eu: remove struct reg_protocol_wt Date: Wed, 11 Jan 2023 20:56:31 +0100 Message-Id: <20230111195640.306748-12-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230111195640.306748-1-martin@kaiser.cx> References: <20230111195640.306748-1-martin@kaiser.cx> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Remove struct reg_protocol_wt. It's not used in the r8188eu driver. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 --- drivers/staging/r8188eu/include/rtw_io.h | 42 ------------------------ 1 file changed, 42 deletions(-) diff --git a/drivers/staging/r8188eu/include/rtw_io.h b/drivers/staging/r81= 88eu/include/rtw_io.h index 858fd9cbb57a..ae290a18e593 100644 --- a/drivers/staging/r8188eu/include/rtw_io.h +++ b/drivers/staging/r8188eu/include/rtw_io.h @@ -102,48 +102,6 @@ struct intf_hdl { struct dvobj_priv *pintf_dev; }; =20 -struct reg_protocol_wt { -#ifdef __LITTLE_ENDIAN - /* DW1 */ - u32 NumOfTrans:4; - u32 Reserved1:4; - u32 Reserved2:24; - /* DW2 */ - u32 ByteCount:7; - u32 WriteEnable:1; /* 0:read, 1:write */ - u32 FixOrContinuous:1; /* 0:continuous, 1: Fix */ - u32 BurstMode:1; - u32 Byte1Access:1; - u32 Byte2Access:1; - u32 Byte4Access:1; - u32 Reserved3:3; - u32 Reserved4:16; - /* DW3 */ - u32 BusAddress; - /* DW4 */ - u32 Value; -#else - /* DW1 */ - u32 Reserved1 :4; - u32 NumOfTrans:4; - u32 Reserved2:24; - /* DW2 */ - u32 WriteEnable:1; - u32 ByteCount:7; - u32 Reserved3:3; - u32 Byte4Access:1; - u32 Byte2Access:1; - u32 Byte1Access:1; - u32 BurstMode:1; - u32 FixOrContinuous:1; - u32 Reserved4:16; - /* DW3 */ - u32 BusAddress; - /* DW4 */ - u32 Value; -#endif -}; - uint register_intf_hdl(u8 *dev, struct intf_hdl *pintfhdl); void unregister_intf_hdl(struct intf_hdl *pintfhdl); =20 --=20 2.30.2 From nobody Mon Sep 15 12:41:47 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DC40DC5479D for ; Wed, 11 Jan 2023 19:58:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239609AbjAKT6K (ORCPT ); Wed, 11 Jan 2023 14:58:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55520 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235030AbjAKT5K (ORCPT ); Wed, 11 Jan 2023 14:57:10 -0500 Received: from viti.kaiser.cx (viti.kaiser.cx [IPv6:2a01:238:43fe:e600:cd0c:bd4a:7a3:8e9f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 326046149 for ; Wed, 11 Jan 2023 11:57:07 -0800 (PST) Received: from dslb-188-096-145-172.188.096.pools.vodafone-ip.de ([188.96.145.172] helo=martin-debian-2.paytec.ch) by viti.kaiser.cx with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1pFhDa-0005F2-KU; Wed, 11 Jan 2023 20:57:02 +0100 From: Martin Kaiser To: Greg Kroah-Hartman Cc: Larry Finger , Phillip Potter , Michael Straube , Pavel Skripkin , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Martin Kaiser Subject: [PATCH 12/20] staging: r8188eu: remove interface handler prototypes Date: Wed, 11 Jan 2023 20:56:32 +0100 Message-Id: <20230111195640.306748-13-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230111195640.306748-1-martin@kaiser.cx> References: <20230111195640.306748-1-martin@kaiser.cx> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Remove prototypes for interface handler functions. They are not used by the r8188eu driver. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 --- drivers/staging/r8188eu/include/rtw_io.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/staging/r8188eu/include/rtw_io.h b/drivers/staging/r81= 88eu/include/rtw_io.h index ae290a18e593..c9ddba66d852 100644 --- a/drivers/staging/r8188eu/include/rtw_io.h +++ b/drivers/staging/r8188eu/include/rtw_io.h @@ -102,9 +102,6 @@ struct intf_hdl { struct dvobj_priv *pintf_dev; }; =20 -uint register_intf_hdl(u8 *dev, struct intf_hdl *pintfhdl); -void unregister_intf_hdl(struct intf_hdl *pintfhdl); - int __must_check rtw_read8(struct adapter *adapter, u32 addr, u8 *data); int __must_check rtw_read16(struct adapter *adapter, u32 addr, u16 *data); int __must_check rtw_read32(struct adapter *adapter, u32 addr, u32 *data); --=20 2.30.2 From nobody Mon Sep 15 12:41:47 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8D112C46467 for ; Wed, 11 Jan 2023 19:58:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238568AbjAKT6a (ORCPT ); Wed, 11 Jan 2023 14:58:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56374 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235265AbjAKT5K (ORCPT ); Wed, 11 Jan 2023 14:57:10 -0500 Received: from viti.kaiser.cx (viti.kaiser.cx [IPv6:2a01:238:43fe:e600:cd0c:bd4a:7a3:8e9f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 609F22BE6 for ; Wed, 11 Jan 2023 11:57:09 -0800 (PST) Received: from dslb-188-096-145-172.188.096.pools.vodafone-ip.de ([188.96.145.172] helo=martin-debian-2.paytec.ch) by viti.kaiser.cx with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1pFhDb-0005F2-Da; Wed, 11 Jan 2023 20:57:03 +0100 From: Martin Kaiser To: Greg Kroah-Hartman Cc: Larry Finger , Phillip Potter , Michael Straube , Pavel Skripkin , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Martin Kaiser Subject: [PATCH 13/20] staging: r8188eu: remove readmem and writemem prototypes Date: Wed, 11 Jan 2023 20:56:33 +0100 Message-Id: <20230111195640.306748-14-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230111195640.306748-1-martin@kaiser.cx> References: <20230111195640.306748-1-martin@kaiser.cx> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Remove the prototypes for the unused _rtw_read_mem and _rtw_write_mem functions. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 --- drivers/staging/r8188eu/include/rtw_io.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/staging/r8188eu/include/rtw_io.h b/drivers/staging/r81= 88eu/include/rtw_io.h index c9ddba66d852..95dd66c0be82 100644 --- a/drivers/staging/r8188eu/include/rtw_io.h +++ b/drivers/staging/r8188eu/include/rtw_io.h @@ -105,7 +105,6 @@ struct intf_hdl { int __must_check rtw_read8(struct adapter *adapter, u32 addr, u8 *data); int __must_check rtw_read16(struct adapter *adapter, u32 addr, u16 *data); int __must_check rtw_read32(struct adapter *adapter, u32 addr, u32 *data); -void _rtw_read_mem(struct adapter *adapter, u32 addr, u32 cnt, u8 *pmem); u32 rtw_read_port(struct adapter *adapter, u8 *pmem); void rtw_read_port_cancel(struct adapter *adapter); =20 @@ -114,7 +113,6 @@ int rtw_write16(struct adapter *adapter, u32 addr, u16 = val); int rtw_write32(struct adapter *adapter, u32 addr, u32 val); int rtw_writeN(struct adapter *adapter, u32 addr, u32 length, u8 *pdata); =20 -void _rtw_write_mem(struct adapter *adapter, u32 addr, u32 cnt, u8 *pmem); u32 rtw_write_port(struct adapter *adapter, u32 addr, u32 cnt, u8 *pmem); void rtw_write_port_cancel(struct adapter *adapter); =20 --=20 2.30.2 From nobody Mon Sep 15 12:41:47 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3B5B7C5479D for ; Wed, 11 Jan 2023 19:58:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239626AbjAKT6T (ORCPT ); Wed, 11 Jan 2023 14:58:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56354 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235180AbjAKT5K (ORCPT ); Wed, 11 Jan 2023 14:57:10 -0500 Received: from viti.kaiser.cx (viti.kaiser.cx [IPv6:2a01:238:43fe:e600:cd0c:bd4a:7a3:8e9f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C22AB6174 for ; Wed, 11 Jan 2023 11:57:08 -0800 (PST) Received: from dslb-188-096-145-172.188.096.pools.vodafone-ip.de ([188.96.145.172] helo=martin-debian-2.paytec.ch) by viti.kaiser.cx with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1pFhDc-0005F2-5s; Wed, 11 Jan 2023 20:57:04 +0100 From: Martin Kaiser To: Greg Kroah-Hartman Cc: Larry Finger , Phillip Potter , Michael Straube , Pavel Skripkin , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Martin Kaiser Subject: [PATCH 14/20] staging: r8188eu: remove IO defines Date: Wed, 11 Jan 2023 20:56:34 +0100 Message-Id: <20230111195640.306748-15-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230111195640.306748-1-martin@kaiser.cx> References: <20230111195640.306748-1-martin@kaiser.cx> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Remove a couple of IO related defines which are not used in the r8188eu driver. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 --- drivers/staging/r8188eu/include/rtw_io.h | 58 ------------------------ 1 file changed, 58 deletions(-) diff --git a/drivers/staging/r8188eu/include/rtw_io.h b/drivers/staging/r81= 88eu/include/rtw_io.h index 95dd66c0be82..749bb1d0eeed 100644 --- a/drivers/staging/r8188eu/include/rtw_io.h +++ b/drivers/staging/r8188eu/include/rtw_io.h @@ -22,64 +22,6 @@ #define rtw_usb_buffer_free(dev, size, addr, dma) \ usb_free_coherent((dev), (size), (addr), (dma)) =20 -#define NUM_IOREQ 8 - -#define MAX_PROT_SZ (64-16) - -#define _IOREADY 0 -#define _IO_WAIT_COMPLETE 1 -#define _IO_WAIT_RSP 2 - -/* IO COMMAND TYPE */ -#define _IOSZ_MASK_ (0x7F) -#define _IO_WRITE_ BIT(7) -#define _IO_FIXED_ BIT(8) -#define _IO_BURST_ BIT(9) -#define _IO_BYTE_ BIT(10) -#define _IO_HW_ BIT(11) -#define _IO_WORD_ BIT(12) -#define _IO_SYNC_ BIT(13) -#define _IO_CMDMASK_ (0x1F80) - -/* - For prompt mode accessing, caller shall free io_req - Otherwise, io_handler will free io_req -*/ - -/* IO STATUS TYPE */ -#define _IO_ERR_ BIT(2) -#define _IO_SUCCESS_ BIT(1) -#define _IO_DONE_ BIT(0) - -#define IO_RD32 (_IO_SYNC_ | _IO_WORD_) -#define IO_RD16 (_IO_SYNC_ | _IO_HW_) -#define IO_RD8 (_IO_SYNC_ | _IO_BYTE_) - -#define IO_RD32_ASYNC (_IO_WORD_) -#define IO_RD16_ASYNC (_IO_HW_) -#define IO_RD8_ASYNC (_IO_BYTE_) - -#define IO_WR32 (_IO_WRITE_ | _IO_SYNC_ | _IO_WORD_) -#define IO_WR16 (_IO_WRITE_ | _IO_SYNC_ | _IO_HW_) -#define IO_WR8 (_IO_WRITE_ | _IO_SYNC_ | _IO_BYTE_) - -#define IO_WR32_ASYNC (_IO_WRITE_ | _IO_WORD_) -#define IO_WR16_ASYNC (_IO_WRITE_ | _IO_HW_) -#define IO_WR8_ASYNC (_IO_WRITE_ | _IO_BYTE_) - -/* - Only Sync. burst accessing is provided. -*/ - -#define IO_WR_BURST(x) \ - (_IO_WRITE_ | _IO_SYNC_ | _IO_BURST_ | ((x) & _IOSZ_MASK_)) -#define IO_RD_BURST(x) \ - (_IO_SYNC_ | _IO_BURST_ | ((x) & _IOSZ_MASK_)) - -/* below is for the intf_option bit defition... */ - -#define _INTF_ASYNC_ BIT(0) /* support async io */ - struct intf_priv; struct intf_hdl; =20 --=20 2.30.2 From nobody Mon Sep 15 12:41:47 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E92E3C46467 for ; Wed, 11 Jan 2023 19:59:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238469AbjAKT6e (ORCPT ); Wed, 11 Jan 2023 14:58:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56380 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235290AbjAKT5K (ORCPT ); Wed, 11 Jan 2023 14:57:10 -0500 Received: from viti.kaiser.cx (viti.kaiser.cx [IPv6:2a01:238:43fe:e600:cd0c:bd4a:7a3:8e9f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 08EFD178BD for ; Wed, 11 Jan 2023 11:57:09 -0800 (PST) Received: from dslb-188-096-145-172.188.096.pools.vodafone-ip.de ([188.96.145.172] helo=martin-debian-2.paytec.ch) by viti.kaiser.cx with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1pFhDd-0005F2-0I; Wed, 11 Jan 2023 20:57:05 +0100 From: Martin Kaiser To: Greg Kroah-Hartman Cc: Larry Finger , Phillip Potter , Michael Straube , Pavel Skripkin , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Martin Kaiser Subject: [PATCH 15/20] staging: r8188eu: remove struct io_req Date: Wed, 11 Jan 2023 20:56:35 +0100 Message-Id: <20230111195640.306748-16-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230111195640.306748-1-martin@kaiser.cx> References: <20230111195640.306748-1-martin@kaiser.cx> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" struct io_req is not needed in the r8188eu driver. Remove it. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 --- drivers/staging/r8188eu/include/rtw_io.h | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/drivers/staging/r8188eu/include/rtw_io.h b/drivers/staging/r81= 88eu/include/rtw_io.h index 749bb1d0eeed..900ed2c648d4 100644 --- a/drivers/staging/r8188eu/include/rtw_io.h +++ b/drivers/staging/r8188eu/include/rtw_io.h @@ -25,20 +25,6 @@ struct intf_priv; struct intf_hdl; =20 -struct io_req { - struct list_head list; - u32 addr; - u32 val; - u32 command; - u32 status; - u8 *pbuf; - struct semaphore sema; - - void (*_async_io_callback)(struct adapter *padater, - struct io_req *pio_req, u8 *cnxt); - u8 *cnxt; -}; - struct intf_hdl { struct adapter *padapter; struct dvobj_priv *pintf_dev; --=20 2.30.2 From nobody Mon Sep 15 12:41:47 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D58F2C5479D for ; Wed, 11 Jan 2023 19:58:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235900AbjAKT6Z (ORCPT ); Wed, 11 Jan 2023 14:58:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56390 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235351AbjAKT5L (ORCPT ); Wed, 11 Jan 2023 14:57:11 -0500 Received: from viti.kaiser.cx (viti.kaiser.cx [IPv6:2a01:238:43fe:e600:cd0c:bd4a:7a3:8e9f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 52976183AA for ; Wed, 11 Jan 2023 11:57:10 -0800 (PST) Received: from dslb-188-096-145-172.188.096.pools.vodafone-ip.de ([188.96.145.172] helo=martin-debian-2.paytec.ch) by viti.kaiser.cx with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1pFhDd-0005F2-OS; Wed, 11 Jan 2023 20:57:05 +0100 From: Martin Kaiser To: Greg Kroah-Hartman Cc: Larry Finger , Phillip Potter , Michael Straube , Pavel Skripkin , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Martin Kaiser Subject: [PATCH 16/20] staging: r8188eu: remove usb buffer macros Date: Wed, 11 Jan 2023 20:56:36 +0100 Message-Id: <20230111195640.306748-17-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230111195640.306748-1-martin@kaiser.cx> References: <20230111195640.306748-1-martin@kaiser.cx> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Remove two unused macros that allocate and free usb buffers. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 --- drivers/staging/r8188eu/include/rtw_io.h | 6 ------ 1 file changed, 6 deletions(-) diff --git a/drivers/staging/r8188eu/include/rtw_io.h b/drivers/staging/r81= 88eu/include/rtw_io.h index 900ed2c648d4..0d2aa432f88d 100644 --- a/drivers/staging/r8188eu/include/rtw_io.h +++ b/drivers/staging/r8188eu/include/rtw_io.h @@ -16,12 +16,6 @@ #include #include =20 -#define rtw_usb_buffer_alloc(dev, size, dma) \ - usb_alloc_coherent((dev), (size), (in_interrupt() ? \ - GFP_ATOMIC : GFP_KERNEL), (dma)) -#define rtw_usb_buffer_free(dev, size, addr, dma) \ - usb_free_coherent((dev), (size), (addr), (dma)) - struct intf_priv; struct intf_hdl; =20 --=20 2.30.2 From nobody Mon Sep 15 12:41:47 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8FE83C46467 for ; Wed, 11 Jan 2023 20:00:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239789AbjAKT7R (ORCPT ); Wed, 11 Jan 2023 14:59:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56638 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235793AbjAKT5Q (ORCPT ); Wed, 11 Jan 2023 14:57:16 -0500 Received: from viti.kaiser.cx (viti.kaiser.cx [IPv6:2a01:238:43fe:e600:cd0c:bd4a:7a3:8e9f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 08B4DB73 for ; Wed, 11 Jan 2023 11:57:15 -0800 (PST) Received: from dslb-188-096-145-172.188.096.pools.vodafone-ip.de ([188.96.145.172] helo=martin-debian-2.paytec.ch) by viti.kaiser.cx with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1pFhDe-0005F2-IF; Wed, 11 Jan 2023 20:57:06 +0100 From: Martin Kaiser To: Greg Kroah-Hartman Cc: Larry Finger , Phillip Potter , Michael Straube , Pavel Skripkin , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Martin Kaiser Subject: [PATCH 17/20] staging: r8188eu: pass struct adapter to usb_read Date: Wed, 11 Jan 2023 20:56:37 +0100 Message-Id: <20230111195640.306748-18-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230111195640.306748-1-martin@kaiser.cx> References: <20230111195640.306748-1-martin@kaiser.cx> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" The usb_read function takes a struct intf_hdl only to extract the struct adapter from it. We can pass struct adapter directly. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 --- drivers/staging/r8188eu/hal/usb_ops_linux.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/staging/r8188eu/hal/usb_ops_linux.c b/drivers/staging/= r8188eu/hal/usb_ops_linux.c index 0deaa5c24ab2..f8900b51d750 100644 --- a/drivers/staging/r8188eu/hal/usb_ops_linux.c +++ b/drivers/staging/r8188eu/hal/usb_ops_linux.c @@ -7,9 +7,8 @@ #include "../include/usb_ops.h" #include "../include/rtl8188e_hal.h" =20 -static int usb_read(struct intf_hdl *intf, u16 value, void *data, u8 size) +static int usb_read(struct adapter *adapt, u16 value, void *data, u8 size) { - struct adapter *adapt =3D intf->padapter; struct dvobj_priv *dvobjpriv =3D adapter_to_dvobj(adapt); struct usb_device *udev =3D dvobjpriv->pusbdev; int status; @@ -95,20 +94,18 @@ static int usb_write(struct intf_hdl *intf, u16 value, = void *data, u8 size) =20 int __must_check rtw_read8(struct adapter *adapter, u32 addr, u8 *data) { - struct intf_hdl *intf =3D &adapter->intf; u16 value =3D addr & 0xffff; =20 - return usb_read(intf, value, data, 1); + return usb_read(adapter, value, data, 1); } =20 int __must_check rtw_read16(struct adapter *adapter, u32 addr, u16 *data) { - struct intf_hdl *intf =3D &adapter->intf; u16 value =3D addr & 0xffff; __le16 le_data; int res; =20 - res =3D usb_read(intf, value, &le_data, 2); + res =3D usb_read(adapter, value, &le_data, 2); if (res) return res; =20 @@ -119,12 +116,11 @@ int __must_check rtw_read16(struct adapter *adapter, = u32 addr, u16 *data) =20 int __must_check rtw_read32(struct adapter *adapter, u32 addr, u32 *data) { - struct intf_hdl *intf =3D &adapter->intf; u16 value =3D addr & 0xffff; __le32 le_data; int res; =20 - res =3D usb_read(intf, value, &le_data, 4); + res =3D usb_read(adapter, value, &le_data, 4); if (res) return res; =20 --=20 2.30.2 From nobody Mon Sep 15 12:41:47 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 517CDC5479D for ; Wed, 11 Jan 2023 20:00:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239663AbjAKT6i (ORCPT ); Wed, 11 Jan 2023 14:58:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56452 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235401AbjAKT5N (ORCPT ); Wed, 11 Jan 2023 14:57:13 -0500 Received: from viti.kaiser.cx (viti.kaiser.cx [IPv6:2a01:238:43fe:e600:cd0c:bd4a:7a3:8e9f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5B9021C90D for ; Wed, 11 Jan 2023 11:57:12 -0800 (PST) Received: from dslb-188-096-145-172.188.096.pools.vodafone-ip.de ([188.96.145.172] helo=martin-debian-2.paytec.ch) by viti.kaiser.cx with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1pFhDf-0005F2-Aj; Wed, 11 Jan 2023 20:57:07 +0100 From: Martin Kaiser To: Greg Kroah-Hartman Cc: Larry Finger , Phillip Potter , Michael Straube , Pavel Skripkin , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Martin Kaiser Subject: [PATCH 18/20] staging: r8188eu: pass struct adapter to usb_write Date: Wed, 11 Jan 2023 20:56:38 +0100 Message-Id: <20230111195640.306748-19-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230111195640.306748-1-martin@kaiser.cx> References: <20230111195640.306748-1-martin@kaiser.cx> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" The usb_write function takes a struct intf_hdl only to extract the struct adapter from it. We can pass struct adapter directly. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 --- drivers/staging/r8188eu/hal/usb_ops_linux.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/drivers/staging/r8188eu/hal/usb_ops_linux.c b/drivers/staging/= r8188eu/hal/usb_ops_linux.c index f8900b51d750..2784fc69f7d9 100644 --- a/drivers/staging/r8188eu/hal/usb_ops_linux.c +++ b/drivers/staging/r8188eu/hal/usb_ops_linux.c @@ -49,9 +49,8 @@ static int usb_read(struct adapter *adapt, u16 value, voi= d *data, u8 size) return status; } =20 -static int usb_write(struct intf_hdl *intf, u16 value, void *data, u8 size) +static int usb_write(struct adapter *adapt, u16 value, void *data, u8 size) { - struct adapter *adapt =3D intf->padapter; struct dvobj_priv *dvobjpriv =3D adapter_to_dvobj(adapt); struct usb_device *udev =3D dvobjpriv->pusbdev; int status; @@ -131,49 +130,45 @@ int __must_check rtw_read32(struct adapter *adapter, = u32 addr, u32 *data) =20 int rtw_write8(struct adapter *adapter, u32 addr, u8 val) { - struct intf_hdl *intf =3D &adapter->intf; u16 value =3D addr & 0xffff; int ret; =20 - ret =3D usb_write(intf, value, &val, 1); + ret =3D usb_write(adapter, value, &val, 1); =20 return RTW_STATUS_CODE(ret); } =20 int rtw_write16(struct adapter *adapter, u32 addr, u16 val) { - struct intf_hdl *intf =3D &adapter->intf; u16 value =3D addr & 0xffff; __le16 data =3D cpu_to_le16(val); int ret; =20 - ret =3D usb_write(intf, value, &data, 2); + ret =3D usb_write(adapter, value, &data, 2); =20 return RTW_STATUS_CODE(ret); } =20 int rtw_write32(struct adapter *adapter, u32 addr, u32 val) { - struct intf_hdl *intf =3D &adapter->intf; u16 value =3D addr & 0xffff; __le32 data =3D cpu_to_le32(val); int ret; =20 - ret =3D usb_write(intf, value, &data, 4); + ret =3D usb_write(adapter, value, &data, 4); =20 return RTW_STATUS_CODE(ret); } =20 int rtw_writeN(struct adapter *adapter, u32 addr, u32 length, u8 *data) { - struct intf_hdl *intf =3D &adapter->intf; u16 value =3D addr & 0xffff; int ret; =20 if (length > VENDOR_CMD_MAX_DATA_LEN) return _FAIL; =20 - ret =3D usb_write(intf, value, data, length); + ret =3D usb_write(adapter, value, data, length); =20 return RTW_STATUS_CODE(ret); } --=20 2.30.2 From nobody Mon Sep 15 12:41:47 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7A502C54EBC for ; Wed, 11 Jan 2023 20:00:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235814AbjAKT6n (ORCPT ); Wed, 11 Jan 2023 14:58:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56494 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235549AbjAKT5O (ORCPT ); Wed, 11 Jan 2023 14:57:14 -0500 Received: from viti.kaiser.cx (viti.kaiser.cx [IPv6:2a01:238:43fe:e600:cd0c:bd4a:7a3:8e9f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C45D2E020 for ; Wed, 11 Jan 2023 11:57:13 -0800 (PST) Received: from dslb-188-096-145-172.188.096.pools.vodafone-ip.de ([188.96.145.172] helo=martin-debian-2.paytec.ch) by viti.kaiser.cx with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1pFhDg-0005F2-67; Wed, 11 Jan 2023 20:57:08 +0100 From: Martin Kaiser To: Greg Kroah-Hartman Cc: Larry Finger , Phillip Potter , Michael Straube , Pavel Skripkin , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Martin Kaiser Subject: [PATCH 19/20] staging: r8188eu: remove struct intf_hdl Date: Wed, 11 Jan 2023 20:56:39 +0100 Message-Id: <20230111195640.306748-20-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230111195640.306748-1-martin@kaiser.cx> References: <20230111195640.306748-1-martin@kaiser.cx> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" There are no more users of struct intf_hdl in the r8188eu driver. We can now remove this struct. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 --- drivers/staging/r8188eu/include/drv_types.h | 1 - drivers/staging/r8188eu/include/rtw_io.h | 6 ------ drivers/staging/r8188eu/os_dep/usb_intf.c | 6 ------ 3 files changed, 13 deletions(-) diff --git a/drivers/staging/r8188eu/include/drv_types.h b/drivers/staging/= r8188eu/include/drv_types.h index 614673902377..7b170eed66b3 100644 --- a/drivers/staging/r8188eu/include/drv_types.h +++ b/drivers/staging/r8188eu/include/drv_types.h @@ -152,7 +152,6 @@ struct adapter { struct mlme_ext_priv mlmeextpriv; struct cmd_priv cmdpriv; struct evt_priv evtpriv; - struct intf_hdl intf; struct xmit_priv xmitpriv; struct recv_priv recvpriv; struct sta_priv stapriv; diff --git a/drivers/staging/r8188eu/include/rtw_io.h b/drivers/staging/r81= 88eu/include/rtw_io.h index 0d2aa432f88d..033ea7146861 100644 --- a/drivers/staging/r8188eu/include/rtw_io.h +++ b/drivers/staging/r8188eu/include/rtw_io.h @@ -17,12 +17,6 @@ #include =20 struct intf_priv; -struct intf_hdl; - -struct intf_hdl { - struct adapter *padapter; - struct dvobj_priv *pintf_dev; -}; =20 int __must_check rtw_read8(struct adapter *adapter, u32 addr, u8 *data); int __must_check rtw_read16(struct adapter *adapter, u32 addr, u16 *data); diff --git a/drivers/staging/r8188eu/os_dep/usb_intf.c b/drivers/staging/r8= 188eu/os_dep/usb_intf.c index 1f70e5fee1b2..1f114b1fc4d5 100644 --- a/drivers/staging/r8188eu/os_dep/usb_intf.c +++ b/drivers/staging/r8188eu/os_dep/usb_intf.c @@ -290,7 +290,6 @@ static int rtw_usb_if1_init(struct dvobj_priv *dvobj, s= truct usb_interface *pusb { struct adapter *padapter =3D NULL; struct net_device *pnetdev =3D NULL; - struct intf_hdl *pintf; int ret; =20 padapter =3D vzalloc(sizeof(*padapter)); @@ -317,11 +316,6 @@ static int rtw_usb_if1_init(struct dvobj_priv *dvobj, = struct usb_interface *pusb padapter->intf_start =3D &usb_intf_start; padapter->intf_stop =3D &usb_intf_stop; =20 - /* step init_io_priv */ - pintf =3D &padapter->intf; - pintf->padapter =3D padapter; - pintf->pintf_dev =3D adapter_to_dvobj(padapter); - /* step read_chip_version */ rtl8188e_read_chip_version(padapter); =20 --=20 2.30.2 From nobody Mon Sep 15 12:41:47 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D9356C5479D for ; Wed, 11 Jan 2023 20:04:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236018AbjAKUEW (ORCPT ); Wed, 11 Jan 2023 15:04:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35144 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239800AbjAKUDx (ORCPT ); Wed, 11 Jan 2023 15:03:53 -0500 Received: from viti.kaiser.cx (viti.kaiser.cx [IPv6:2a01:238:43fe:e600:cd0c:bd4a:7a3:8e9f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BDA9041039 for ; Wed, 11 Jan 2023 11:59:39 -0800 (PST) Received: from dslb-188-096-145-172.188.096.pools.vodafone-ip.de ([188.96.145.172] helo=martin-debian-2.paytec.ch) by viti.kaiser.cx with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1pFhDh-0005F2-0I; Wed, 11 Jan 2023 20:57:09 +0100 From: Martin Kaiser To: Greg Kroah-Hartman Cc: Larry Finger , Phillip Potter , Michael Straube , Pavel Skripkin , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Martin Kaiser Subject: [PATCH 20/20] staging: r8188eu: remove struct intf_priv Date: Wed, 11 Jan 2023 20:56:40 +0100 Message-Id: <20230111195640.306748-21-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230111195640.306748-1-martin@kaiser.cx> References: <20230111195640.306748-1-martin@kaiser.cx> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" struct intf_priv is not used in the r8188eu driver. It can be removed. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 --- drivers/staging/r8188eu/include/osdep_intf.h | 32 -------------------- drivers/staging/r8188eu/include/rtw_io.h | 2 -- 2 files changed, 34 deletions(-) diff --git a/drivers/staging/r8188eu/include/osdep_intf.h b/drivers/staging= /r8188eu/include/osdep_intf.h index 6d66cb57225e..457fb3852a19 100644 --- a/drivers/staging/r8188eu/include/osdep_intf.h +++ b/drivers/staging/r8188eu/include/osdep_intf.h @@ -7,38 +7,6 @@ #include "osdep_service.h" #include "drv_types.h" =20 -struct intf_priv { - u8 *intf_dev; - u32 max_iosz; /* USB2.0: 128, USB1.1: 64, SDIO:64 */ - u32 max_xmitsz; /* USB2.0: unlimited, SDIO:512 */ - u32 max_recvsz; /* USB2.0: unlimited, SDIO:512 */ - - u8 *io_rwmem; - u8 *allocated_io_rwmem; - u32 io_wsz; /* unit: 4bytes */ - u32 io_rsz;/* unit: 4bytes */ - u8 intf_status; - - void (*_bus_io)(u8 *priv); - -/* -Under Sync. IRP (SDIO/USB) -A protection mechanism is necessary for the io_rwmem(read/write protocol) - -Under Async. IRP (SDIO/USB) -The protection mechanism is through the pending queue. -*/ - struct mutex ioctl_mutex; - /* when in USB, IO is through interrupt in/out endpoints */ - struct usb_device *udev; - struct urb *piorw_urb; - u8 io_irp_cnt; - u8 bio_irp_pending; - struct timer_list io_timer; - u8 bio_irp_timeout; - u8 bio_timer_cancel; -}; - int netdev_open(struct net_device *pnetdev); int netdev_close(struct net_device *pnetdev); =20 diff --git a/drivers/staging/r8188eu/include/rtw_io.h b/drivers/staging/r81= 88eu/include/rtw_io.h index 033ea7146861..090555f562f2 100644 --- a/drivers/staging/r8188eu/include/rtw_io.h +++ b/drivers/staging/r8188eu/include/rtw_io.h @@ -16,8 +16,6 @@ #include #include =20 -struct intf_priv; - int __must_check rtw_read8(struct adapter *adapter, u32 addr, u8 *data); int __must_check rtw_read16(struct adapter *adapter, u32 addr, u16 *data); int __must_check rtw_read32(struct adapter *adapter, u32 addr, u32 *data); --=20 2.30.2