From nobody Sat Apr 11 21:01:40 2026 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 58ACDC00140 for ; Fri, 5 Aug 2022 16:28:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237902AbiHEQ2M (ORCPT ); Fri, 5 Aug 2022 12:28:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57586 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230095AbiHEQ2G (ORCPT ); Fri, 5 Aug 2022 12:28:06 -0400 Received: from mx01.ayax.eu (mx01.ayax.eu [188.137.98.110]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 80AE61137 for ; Fri, 5 Aug 2022 09:28:04 -0700 (PDT) Received: from [192.168.192.146] (port=52112 helo=nx64de-df6d00) by mx01.ayax.eu with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oK0Ao-0007pU-My; Fri, 05 Aug 2022 18:27:46 +0200 Date: Fri, 5 Aug 2022 18:27:41 +0200 From: Grzegorz Szymaszek To: Larry Finger , Greg KH , Phillip Potter Cc: Philipp Hortmann , Grzegorz Szymaszek , linux-kernel@vger.kernel.org, linux-staging@lists.linux.dev Subject: [PATCH v2 1/4] staging: r8188eu: set firmware path in a macro Message-ID: <60dc57fc73e8e6e8e3aaae68784f4be932547bf5.1659715931.git.gszymaszek@short.pl> Mail-Followup-To: Grzegorz Szymaszek , Larry Finger , Greg KH , Phillip Potter , Philipp Hortmann , linux-kernel@vger.kernel.org, linux-staging@lists.linux.dev References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The r8188eu driver requires a firmware file, the path of which was hardcoded as constant strings in two places: (1) in core/rtw_fw.c, in function load_firmware(), (2) in os_dep/os_intfs.c, in the MODULE_FIRMWARE() call. Declare the path using a macro, FW_RTL8188EU, and replace the above constant strings with the macro. That's the way it is done in many other drivers. The new macro is defined in include/drv_types.h, because that file is already included by both of the above files (or at least their headers) and because it already contains other driver constants, like its name and version. Link: https://lore.kernel.org/lkml/YuoQ37PIKzWO1zIY@kroah.com/ Suggested-by: Greg Kroah-Hartman Signed-off-by: Grzegorz Szymaszek Tested-by: Philipp Hortmann # Edimax N150 --- V1->V2: Added Philipp Hortmann's Tested-by drivers/staging/r8188eu/core/rtw_fw.c | 2 +- drivers/staging/r8188eu/include/drv_types.h | 1 + drivers/staging/r8188eu/os_dep/os_intfs.c | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/staging/r8188eu/core/rtw_fw.c b/drivers/staging/r8188e= u/core/rtw_fw.c index 0451e5177644..0fe6d4944694 100644 --- a/drivers/staging/r8188eu/core/rtw_fw.c +++ b/drivers/staging/r8188eu/core/rtw_fw.c @@ -209,7 +209,7 @@ static int load_firmware(struct rt_firmware *rtfw, stru= ct device *device) { int ret =3D _SUCCESS; const struct firmware *fw; - const char *fw_name =3D "rtlwifi/rtl8188eufw.bin"; + const char *fw_name =3D FW_RTL8188EU; int err =3D request_firmware(&fw, fw_name, device); =20 if (err) { diff --git a/drivers/staging/r8188eu/include/drv_types.h b/drivers/staging/= r8188eu/include/drv_types.h index bba88a0ede61..f51b83515953 100644 --- a/drivers/staging/r8188eu/include/drv_types.h +++ b/drivers/staging/r8188eu/include/drv_types.h @@ -37,6 +37,7 @@ #include "rtw_fw.h" =20 #define DRIVERVERSION "v4.1.4_6773.20130222" +#define FW_RTL8188EU "rtlwifi/rtl8188eufw.bin" =20 struct registry_priv { u8 chip_version; diff --git a/drivers/staging/r8188eu/os_dep/os_intfs.c b/drivers/staging/r8= 188eu/os_dep/os_intfs.c index 5bd3022e4b40..5985054da935 100644 --- a/drivers/staging/r8188eu/os_dep/os_intfs.c +++ b/drivers/staging/r8188eu/os_dep/os_intfs.c @@ -18,7 +18,7 @@ MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("Realtek Wireless Lan Driver"); MODULE_AUTHOR("Realtek Semiconductor Corp."); MODULE_VERSION(DRIVERVERSION); -MODULE_FIRMWARE("rtlwifi/rtl8188eufw.bin"); +MODULE_FIRMWARE(FW_RTL8188EU); =20 #define CONFIG_BR_EXT_BRNAME "br0" #define RTW_NOTCH_FILTER 0 /* 0:Disable, 1:Enable, */ --=20 2.35.1 From nobody Sat Apr 11 21:01:40 2026 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 B1D38C00140 for ; Fri, 5 Aug 2022 16:28:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241129AbiHEQ2R (ORCPT ); Fri, 5 Aug 2022 12:28:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57676 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241058AbiHEQ2M (ORCPT ); Fri, 5 Aug 2022 12:28:12 -0400 Received: from mx01.ayax.eu (mx01.ayax.eu [188.137.98.110]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E0A69CE2D for ; Fri, 5 Aug 2022 09:28:11 -0700 (PDT) Received: from [192.168.192.146] (port=49798 helo=nx64de-df6d00) by mx01.ayax.eu with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oK0B0-0007pk-My; Fri, 05 Aug 2022 18:27:58 +0200 Date: Fri, 5 Aug 2022 18:27:53 +0200 From: Grzegorz Szymaszek To: Larry Finger , Greg KH , Phillip Potter Cc: Philipp Hortmann , Grzegorz Szymaszek , linux-kernel@vger.kernel.org, linux-staging@lists.linux.dev Subject: [PATCH v2 2/4] staging: r8188eu: use KBUILD_MODNAME instead of a string constant Message-ID: <0325540ba8be0a3dc4083d22e484a8a31fb2a892.1659715931.git.gszymaszek@short.pl> Mail-Followup-To: Grzegorz Szymaszek , Larry Finger , Greg KH , Phillip Potter , Philipp Hortmann , linux-kernel@vger.kernel.org, linux-staging@lists.linux.dev References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The field .usbdrv.name of the struct rtw_usb_drv hardcoded the module (driver) name as a constant string. Replace the string with the KBUILD_MODNAME macro. Link: https://lore.kernel.org/lkml/Yuy7QSh%2FclQ5Ki09@kroah.com/ Suggested-by: Greg Kroah-Hartman Signed-off-by: Grzegorz Szymaszek Tested-by: Philipp Hortmann # Edimax N150 --- V1 -> V2: Split v1-0002 into v2-0002 and v2-0003. Replace the constant string with KBUILD_MODNAME instead of DRV_NAME drivers/staging/r8188eu/os_dep/usb_intf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/r8188eu/os_dep/usb_intf.c b/drivers/staging/r8= 188eu/os_dep/usb_intf.c index 68869c5daeff..b845f5ec5489 100644 --- a/drivers/staging/r8188eu/os_dep/usb_intf.c +++ b/drivers/staging/r8188eu/os_dep/usb_intf.c @@ -54,7 +54,7 @@ struct rtw_usb_drv { }; =20 static struct rtw_usb_drv rtl8188e_usb_drv =3D { - .usbdrv.name =3D "r8188eu", + .usbdrv.name =3D KBUILD_MODNAME, .usbdrv.probe =3D rtw_drv_init, .usbdrv.disconnect =3D rtw_dev_remove, .usbdrv.id_table =3D rtw_usb_id_tbl, --=20 2.35.1 From nobody Sat Apr 11 21:01:40 2026 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 15345C00140 for ; Fri, 5 Aug 2022 16:28:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241231AbiHEQ21 (ORCPT ); Fri, 5 Aug 2022 12:28:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57990 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241218AbiHEQ2W (ORCPT ); Fri, 5 Aug 2022 12:28:22 -0400 Received: from mx01.ayax.eu (mx01.ayax.eu [188.137.98.110]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 613F8EE3A for ; Fri, 5 Aug 2022 09:28:19 -0700 (PDT) Received: from [192.168.192.146] (port=51430 helo=nx64de-df6d00) by mx01.ayax.eu with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oK0BC-0007q1-E6; Fri, 05 Aug 2022 18:28:08 +0200 Date: Fri, 5 Aug 2022 18:28:05 +0200 From: Grzegorz Szymaszek To: Larry Finger , Greg KH , Phillip Potter Cc: Philipp Hortmann , Grzegorz Szymaszek , linux-kernel@vger.kernel.org, linux-staging@lists.linux.dev Subject: [PATCH v2 3/4] staging: r8188eu: drop the DRV_NAME macro Message-ID: Mail-Followup-To: Grzegorz Szymaszek , Larry Finger , Greg KH , Phillip Potter , Philipp Hortmann , linux-kernel@vger.kernel.org, linux-staging@lists.linux.dev References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The DRV_NAME macro is not used anywhere; KBUILD_MODNAME should be used instead. Remove the macro declaration. Link: https://lore.kernel.org/lkml/Yuy7Lc%2FTJMinuupA@kroah.com/ Suggested-by: Greg Kroah-Hartman Signed-off-by: Grzegorz Szymaszek Tested-by: Philipp Hortmann # Edimax N150 --- V1 -> V2: Split v1-0003 into v2-0003 and v2-0004. Remove the DRV_NAME macro, since KBUILD_MODNAME should be used instead drivers/staging/r8188eu/include/drv_types.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/staging/r8188eu/include/drv_types.h b/drivers/staging/= r8188eu/include/drv_types.h index f51b83515953..f659eac70b32 100644 --- a/drivers/staging/r8188eu/include/drv_types.h +++ b/drivers/staging/r8188eu/include/drv_types.h @@ -10,8 +10,6 @@ #ifndef __DRV_TYPES_H__ #define __DRV_TYPES_H__ =20 -#define DRV_NAME "r8188eu" - #include "osdep_service.h" #include "wlan_bssdef.h" #include "rtw_ht.h" --=20 2.35.1 From nobody Sat Apr 11 21:01:40 2026 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 6F123C00140 for ; Fri, 5 Aug 2022 16:28:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241050AbiHEQ2i (ORCPT ); Fri, 5 Aug 2022 12:28:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58276 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241224AbiHEQ2b (ORCPT ); Fri, 5 Aug 2022 12:28:31 -0400 Received: from mx01.ayax.eu (mx01.ayax.eu [188.137.98.110]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 665BED100 for ; Fri, 5 Aug 2022 09:28:29 -0700 (PDT) Received: from [192.168.192.146] (port=59782 helo=nx64de-df6d00) by mx01.ayax.eu with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oK0BK-0007qK-0i; Fri, 05 Aug 2022 18:28:17 +0200 Date: Fri, 5 Aug 2022 18:28:12 +0200 From: Grzegorz Szymaszek To: Larry Finger , Greg KH , Phillip Potter Cc: Philipp Hortmann , Grzegorz Szymaszek , linux-kernel@vger.kernel.org, linux-staging@lists.linux.dev Subject: [PATCH v2 4/4] staging: r8188eu: drop the DRIVERVERSION macro Message-ID: <39e6b702918b7bcc59dec381022c1d1b97c2046e.1659715931.git.gszymaszek@short.pl> Mail-Followup-To: Grzegorz Szymaszek , Larry Finger , Greg KH , Phillip Potter , Philipp Hortmann , linux-kernel@vger.kernel.org, linux-staging@lists.linux.dev References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Since the driver is currently in the kernel, the module version macro is not necessary. Link: https://lore.kernel.org/lkml/Yuy7Lc%2FTJMinuupA@kroah.com/ Suggested-by: Greg Kroah-Hartman Signed-off-by: Grzegorz Szymaszek Tested-by: Philipp Hortmann # Edimax N150 --- V1 -> V2: Split v1-0003 into v2-0003 and v2-0004. Remove the DRIVERVERSION macro instead of changing its name drivers/staging/r8188eu/include/drv_types.h | 1 - drivers/staging/r8188eu/os_dep/os_intfs.c | 1 - 2 files changed, 2 deletions(-) diff --git a/drivers/staging/r8188eu/include/drv_types.h b/drivers/staging/= r8188eu/include/drv_types.h index f659eac70b32..05888acc6bb1 100644 --- a/drivers/staging/r8188eu/include/drv_types.h +++ b/drivers/staging/r8188eu/include/drv_types.h @@ -34,7 +34,6 @@ #include "rtl8188e_hal.h" #include "rtw_fw.h" =20 -#define DRIVERVERSION "v4.1.4_6773.20130222" #define FW_RTL8188EU "rtlwifi/rtl8188eufw.bin" =20 struct registry_priv { diff --git a/drivers/staging/r8188eu/os_dep/os_intfs.c b/drivers/staging/r8= 188eu/os_dep/os_intfs.c index 5985054da935..e90af754ef93 100644 --- a/drivers/staging/r8188eu/os_dep/os_intfs.c +++ b/drivers/staging/r8188eu/os_dep/os_intfs.c @@ -17,7 +17,6 @@ MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("Realtek Wireless Lan Driver"); MODULE_AUTHOR("Realtek Semiconductor Corp."); -MODULE_VERSION(DRIVERVERSION); MODULE_FIRMWARE(FW_RTL8188EU); =20 #define CONFIG_BR_EXT_BRNAME "br0" --=20 2.35.1