From nobody Sun Sep 14 07:36:28 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 38D5DC54E94 for ; Tue, 24 Jan 2023 21:01:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234572AbjAXVBf (ORCPT ); Tue, 24 Jan 2023 16:01:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33580 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229747AbjAXVBd (ORCPT ); Tue, 24 Jan 2023 16:01:33 -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 C6C5041B6B for ; Tue, 24 Jan 2023 13:01:31 -0800 (PST) Received: from dslb-188-096-139-204.188.096.pools.vodafone-ip.de ([188.96.139.204] 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 1pKQQ1-0001xR-1C; Tue, 24 Jan 2023 22:01:25 +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 1/4] staging: r8188eu: usb_read_port_complete needs no regs parameter Date: Tue, 24 Jan 2023 22:01:05 +0100 Message-Id: <20230124210108.62170-2-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230124210108.62170-1-martin@kaiser.cx> References: <20230124210108.62170-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 regs parameter from usb_read_port_complete, it is not used. Without the regs parameter, there's no need for the define that makes usb_read_port_complete usable as urb callback function. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 --- drivers/staging/r8188eu/hal/usb_ops_linux.c | 2 +- drivers/staging/r8188eu/include/usb_ops_linux.h | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/staging/r8188eu/hal/usb_ops_linux.c b/drivers/staging/= r8188eu/hal/usb_ops_linux.c index e122c8ca929c..0f789d5250db 100644 --- a/drivers/staging/r8188eu/hal/usb_ops_linux.c +++ b/drivers/staging/r8188eu/hal/usb_ops_linux.c @@ -344,7 +344,7 @@ void rtl8188eu_recv_tasklet(unsigned long priv) } } =20 -static void usb_read_port_complete(struct urb *purb, struct pt_regs *regs) +static void usb_read_port_complete(struct urb *purb) { struct recv_buf *precvbuf =3D (struct recv_buf *)purb->context; struct adapter *adapt =3D (struct adapter *)precvbuf->adapter; diff --git a/drivers/staging/r8188eu/include/usb_ops_linux.h b/drivers/stag= ing/r8188eu/include/usb_ops_linux.h index e406a1fccda7..0a8fefbd4c2e 100644 --- a/drivers/staging/r8188eu/include/usb_ops_linux.h +++ b/drivers/staging/r8188eu/include/usb_ops_linux.h @@ -19,8 +19,6 @@ usb_bulkout_zero_complete(purb) #define usb_write_mem_complete(purb, regs) \ usb_write_mem_complete(purb) -#define usb_read_port_complete(purb, regs) \ - usb_read_port_complete(purb) #define usb_read_interrupt_complete(purb, regs) \ usb_read_interrupt_complete(purb) =20 --=20 2.30.2 From nobody Sun Sep 14 07:36:28 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 AFA60C54E94 for ; Tue, 24 Jan 2023 21:01:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231827AbjAXVBq (ORCPT ); Tue, 24 Jan 2023 16:01:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33582 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234549AbjAXVBe (ORCPT ); Tue, 24 Jan 2023 16:01:34 -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 D0EBA46D4A for ; Tue, 24 Jan 2023 13:01:31 -0800 (PST) Received: from dslb-188-096-139-204.188.096.pools.vodafone-ip.de ([188.96.139.204] 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 1pKQQ1-0001xR-Sc; Tue, 24 Jan 2023 22:01:25 +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 2/4] staging: r8188eu: remove defines that strip regs parameter Date: Tue, 24 Jan 2023 22:01:06 +0100 Message-Id: <20230124210108.62170-3-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230124210108.62170-1-martin@kaiser.cx> References: <20230124210108.62170-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" usb_ops_linux.h has a number of defines that strip the regs parameter from function that should be used as urb callbacks. Remove the defines for functions that don't exist in the r8188eu driver. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 --- drivers/staging/r8188eu/include/usb_ops_linux.h | 9 --------- 1 file changed, 9 deletions(-) diff --git a/drivers/staging/r8188eu/include/usb_ops_linux.h b/drivers/stag= ing/r8188eu/include/usb_ops_linux.h index 0a8fefbd4c2e..c7a0dc482761 100644 --- a/drivers/staging/r8188eu/include/usb_ops_linux.h +++ b/drivers/staging/r8188eu/include/usb_ops_linux.h @@ -13,13 +13,4 @@ =20 #define RTW_USB_BULKOUT_TIME 5000/* ms */ =20 -#define _usbctrl_vendorreq_async_callback(urb, regs) \ - _usbctrl_vendorreq_async_callback(urb) -#define usb_bulkout_zero_complete(purb, regs) \ - usb_bulkout_zero_complete(purb) -#define usb_write_mem_complete(purb, regs) \ - usb_write_mem_complete(purb) -#define usb_read_interrupt_complete(purb, regs) \ - usb_read_interrupt_complete(purb) - #endif --=20 2.30.2 From nobody Sun Sep 14 07:36:28 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 8D151C54E94 for ; Tue, 24 Jan 2023 21:01:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234615AbjAXVBu (ORCPT ); Tue, 24 Jan 2023 16:01:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33586 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234543AbjAXVBe (ORCPT ); Tue, 24 Jan 2023 16:01:34 -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 D0DF745BF0 for ; Tue, 24 Jan 2023 13:01:31 -0800 (PST) Received: from dslb-188-096-139-204.188.096.pools.vodafone-ip.de ([188.96.139.204] 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 1pKQQ2-0001xR-NC; Tue, 24 Jan 2023 22:01:26 +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 3/4] staging: r8188eu: remove unused defines Date: Tue, 24 Jan 2023 22:01:07 +0100 Message-Id: <20230124210108.62170-4-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230124210108.62170-1-martin@kaiser.cx> References: <20230124210108.62170-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 unused defines from usb_ops_linux.h. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 --- drivers/staging/r8188eu/include/usb_ops_linux.h | 5 ----- 1 file changed, 5 deletions(-) diff --git a/drivers/staging/r8188eu/include/usb_ops_linux.h b/drivers/stag= ing/r8188eu/include/usb_ops_linux.h index c7a0dc482761..b149df7957dd 100644 --- a/drivers/staging/r8188eu/include/usb_ops_linux.h +++ b/drivers/staging/r8188eu/include/usb_ops_linux.h @@ -6,11 +6,6 @@ =20 #define VENDOR_CMD_MAX_DATA_LEN 254 =20 -#define RTW_USB_CONTROL_MSG_TIMEOUT_TEST 10/* ms */ #define RTW_USB_CONTROL_MSG_TIMEOUT 500/* ms */ =20 -#define MAX_USBCTRL_VENDORREQ_TIMES 10 - -#define RTW_USB_BULKOUT_TIME 5000/* ms */ - #endif --=20 2.30.2 From nobody Sun Sep 14 07:36:28 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 5FD57C54E94 for ; Tue, 24 Jan 2023 21:01:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234594AbjAXVBm (ORCPT ); Tue, 24 Jan 2023 16:01:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33588 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233643AbjAXVBd (ORCPT ); Tue, 24 Jan 2023 16:01:33 -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 DD5A141B43 for ; Tue, 24 Jan 2023 13:01:32 -0800 (PST) Received: from dslb-188-096-139-204.188.096.pools.vodafone-ip.de ([188.96.139.204] 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 1pKQQ3-0001xR-Hz; Tue, 24 Jan 2023 22:01:27 +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 4/4] staging: r8188eu: remove usb_ops_linux.h Date: Tue, 24 Jan 2023 22:01:08 +0100 Message-Id: <20230124210108.62170-5-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230124210108.62170-1-martin@kaiser.cx> References: <20230124210108.62170-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's only two defines left in usb_ops_linux.h. Move those defines to usb_ops_linux.c, where they are used. Remove the now empty file usb_ops_linux.h. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 --- drivers/staging/r8188eu/hal/usb_ops_linux.c | 4 ++++ drivers/staging/r8188eu/include/usb_ops.h | 2 -- drivers/staging/r8188eu/include/usb_ops_linux.h | 11 ----------- drivers/staging/r8188eu/os_dep/usb_ops_linux.c | 1 - 4 files changed, 4 insertions(+), 14 deletions(-) delete mode 100644 drivers/staging/r8188eu/include/usb_ops_linux.h diff --git a/drivers/staging/r8188eu/hal/usb_ops_linux.c b/drivers/staging/= r8188eu/hal/usb_ops_linux.c index 0f789d5250db..9c940ab8fd41 100644 --- a/drivers/staging/r8188eu/hal/usb_ops_linux.c +++ b/drivers/staging/r8188eu/hal/usb_ops_linux.c @@ -7,6 +7,10 @@ #include "../include/usb_ops.h" #include "../include/rtl8188e_hal.h" =20 +#define VENDOR_CMD_MAX_DATA_LEN 254 + +#define RTW_USB_CONTROL_MSG_TIMEOUT 500/* ms */ + static int usb_read(struct adapter *adapt, u16 value, void *data, u8 size) { struct dvobj_priv *dvobjpriv =3D adapter_to_dvobj(adapt); diff --git a/drivers/staging/r8188eu/include/usb_ops.h b/drivers/staging/r8= 188eu/include/usb_ops.h index ddc46cb44358..5bd8ce37aebf 100644 --- a/drivers/staging/r8188eu/include/usb_ops.h +++ b/drivers/staging/r8188eu/include/usb_ops.h @@ -17,8 +17,6 @@ #define MAX_VENDOR_REQ_CMD_SIZE 254 /* 8188cu SIE Support */ #define MAX_USB_IO_CTL_SIZE (MAX_VENDOR_REQ_CMD_SIZE + ALIGNMENT_UNIT) =20 -#include "usb_ops_linux.h" - /* * Increase and check if the continual_urb_error of this @param dvobjprivei * is larger than MAX_CONTINUAL_URB_ERR diff --git a/drivers/staging/r8188eu/include/usb_ops_linux.h b/drivers/stag= ing/r8188eu/include/usb_ops_linux.h deleted file mode 100644 index b149df7957dd..000000000000 --- a/drivers/staging/r8188eu/include/usb_ops_linux.h +++ /dev/null @@ -1,11 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */ -/* Copyright(c) 2007 - 2011 Realtek Corporation. */ - -#ifndef __USB_OPS_LINUX_H__ -#define __USB_OPS_LINUX_H__ - -#define VENDOR_CMD_MAX_DATA_LEN 254 - -#define RTW_USB_CONTROL_MSG_TIMEOUT 500/* ms */ - -#endif diff --git a/drivers/staging/r8188eu/os_dep/usb_ops_linux.c b/drivers/stagi= ng/r8188eu/os_dep/usb_ops_linux.c index 583533631133..c9ee1173a1d6 100644 --- a/drivers/staging/r8188eu/os_dep/usb_ops_linux.c +++ b/drivers/staging/r8188eu/os_dep/usb_ops_linux.c @@ -4,7 +4,6 @@ #define _USB_OPS_LINUX_C_ =20 #include "../include/drv_types.h" -#include "../include/usb_ops_linux.h" #include "../include/rtl8188e_recv.h" =20 static unsigned int ffaddr2pipehdl(struct dvobj_priv *pdvobj, u32 addr) --=20 2.30.2