From patchwork Mon Oct 31 17:55:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Deepak R Varma X-Patchwork-Id: 13378 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp2456582wru; Mon, 31 Oct 2022 10:57:07 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4d5b6tQAHrhi9Uxfd23Mikk8TOi1fpaBDXlahcKtda+DXmzjx1HBBQTzrXNhkwgby/Mt2F X-Received: by 2002:a05:6402:884:b0:461:1ed:579f with SMTP id e4-20020a056402088400b0046101ed579fmr14825523edy.413.1667239027302; Mon, 31 Oct 2022 10:57:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667239027; cv=none; d=google.com; s=arc-20160816; b=Ug0E9cg+y5D3zxd1OJdDiWVBzIdGO0coxITfE/4IGkKjddMn/N0/WQ36rHGnS2X+Q3 dPsvIHeeAVfj2lVoi2ZUXvond5oFwiw0hPMF6ijN+jlUfAHDcfqUwQJquRRrhA5Kx9gU NH5DB6EL/zqeUWzY7GJMBj24rmfMkHS9FN1wQ9TCMqIdmNswmK44KshyNky2CCD1+/ix lUoGgJz/KJGtvVLLByt5+6+BVAMiGw0si0nRkM78qXHwIKoE6WP1/g8kwq3i6VliiuIQ 05ARekwAWjZ1pIa9dCYSc8MapMGRSH7bO7iyWoAYs5q/+LUJ5N5g5+WZyuE096FPLbeu 4FOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:to:from:date:dkim-signature; bh=IOQGAds/Jt+29h0WQY8MHsCA/VFk5OnDTe34YiIDcfA=; b=m5qcdDZ8a9DlGHHl2sjHM5Okk5SrOQUcVXFNtFgzNKSYh7lXdiWUd1vMUhlR+apXJZ zCMQJGKr+NkJh/bRUr02Bc772oPxtHA7V1SndKb7YS8sDcNtxOj0vz8JE38Ls7zHRiIu ER9MFLf/f8N+j2LcCdyVaprjZERDnGdop4OYemfIy2C064ipLyC0HtaAPwAyGfMg3HiG y4KbLdcdaeqXbCLOja2wpwlpBhTLoOmG69XIHC1nT7L4QeVZlDPRm8ziMq0nhEeKXJGP fYn5OWVYocbw3CqS7z36nichu0PLnOjx8leCfwJeKSy0h3T7Eq9u+ZfZaUuSktPoiyM6 UL2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mailo.com header.s=mailo header.b=KZKH+6ro; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mailo.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n22-20020a056402061600b00458ebd62c70si7653325edv.32.2022.10.31.10.56.42; Mon, 31 Oct 2022 10:57:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail header.i=@mailo.com header.s=mailo header.b=KZKH+6ro; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mailo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231950AbiJaRzu (ORCPT + 99 others); Mon, 31 Oct 2022 13:55:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35302 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231924AbiJaRzs (ORCPT ); Mon, 31 Oct 2022 13:55:48 -0400 Received: from msg-2.mailo.com (msg-2.mailo.com [213.182.54.12]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B590F64FC for ; Mon, 31 Oct 2022 10:55:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mailo.com; s=mailo; t=1667238938; bh=rB87oAJR+6lb1gKdfEfCEm/RmF0Is3m3yYVI7ot8vx0=; h=X-EA-Auth:Date:From:To:Subject:Message-ID:References:MIME-Version: Content-Type:In-Reply-To; b=KZKH+6roVodEooS1YF1kl+SWTCwkdoMVQ5aHl5KGAiuB7rTSCWhUdIsHC23VOzX1p 7+pvH5CqgHMNrxCmmf+kpTWYcNSfuWfhnJ9Su7zAd9lGsXaoWctHkBXAxA2I0vQKLa niRR8a/yb0Y5bc3X9bA/Trmjp1azTOsg+8hXxcXE= Received: by b-1.in.mailobj.net [192.168.90.11] with ESMTP via [213.182.55.206] Mon, 31 Oct 2022 18:55:38 +0100 (CET) X-EA-Auth: PgDpDwzFshbn/ZqZmKx0JNAGDk/e4QHXzFtZGcbc6j3l1nQBmXrEpRJUryRiVusuTaoIzVQP1pHX4nxvjFt9KpGnpdU9qE2E Date: Mon, 31 Oct 2022 23:25:39 +0530 From: Deepak R Varma To: outreachy@lists.linux.dev, gregkh@linuxfoundation.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH v2 1/2] staging: rtl8192u: remove unnecessary function implementation Message-ID: <6f5a4313fc21365bf733c25385aef79554ffb253.1667237959.git.drv@mailo.com> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748226830393629299?= X-GMAIL-MSGID: =?utf-8?q?1748226830393629299?= This driver is a single standalone driver and does not have any loading dependencies on another associated drivers. The build results in one single .ko object. The current implementation of the function ieee80211_tkip_null simply returns back to the caller without any useful instruction executions. It does not lead to auto-loading of any other associated modules as the initial design implementation appears to be. Hence the call to ieee80211_tkip_null() and its implementation is unnecessary and should be removed. Signed-off-by: Deepak R Varma --- Changes in v2: 1. Patch log revised to explain the impact of proposed changes. Suggested by gregkh@linuxfoundation.org drivers/staging/rtl8192u/ieee80211/ieee80211.h | 3 --- drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_tkip.c | 6 ------ drivers/staging/rtl8192u/ieee80211/ieee80211_module.c | 3 --- 3 files changed, 12 deletions(-) -- 2.30.2 diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211.h b/drivers/staging/rtl8192u/ieee80211/ieee80211.h index 9cd4b1896745..00c07455cbb3 100644 --- a/drivers/staging/rtl8192u/ieee80211/ieee80211.h +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211.h @@ -232,8 +232,6 @@ struct cb_desc { #define ieee80211_ccmp_null ieee80211_ccmp_null_rsl -#define ieee80211_tkip_null ieee80211_tkip_null_rsl - #define free_ieee80211 free_ieee80211_rsl #define alloc_ieee80211 alloc_ieee80211_rsl @@ -2256,7 +2254,6 @@ void ieee80211_ps_tx_ack(struct ieee80211_device *ieee, short success); void softmac_mgmt_xmit(struct sk_buff *skb, struct ieee80211_device *ieee); /* ieee80211_crypt_ccmp&tkip&wep.c */ -void ieee80211_tkip_null(void); int ieee80211_crypto_init(void); void ieee80211_crypto_deinit(void); diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_tkip.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_tkip.c index 7b120b8cb982..9bfd24ad46b6 100644 --- a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_tkip.c +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_tkip.c @@ -716,9 +716,3 @@ void ieee80211_crypto_tkip_exit(void) { ieee80211_unregister_crypto_ops(&ieee80211_crypt_tkip); } - -void ieee80211_tkip_null(void) -{ -// printk("============>%s()\n", __func__); - return; -} diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_module.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_module.c index b94fe9b449b6..3f93939bc4ee 100644 --- a/drivers/staging/rtl8192u/ieee80211/ieee80211_module.c +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_module.c @@ -159,9 +159,6 @@ struct net_device *alloc_ieee80211(int sizeof_priv) ieee->last_packet_time[i] = 0; } -/* These function were added to load crypte module autoly */ - ieee80211_tkip_null(); - return dev; failed: From patchwork Mon Oct 31 17:56:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Deepak R Varma X-Patchwork-Id: 13379 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp2456761wru; Mon, 31 Oct 2022 10:57:33 -0700 (PDT) X-Google-Smtp-Source: AMsMyM73xsF41wDIlE0kQOBk/XINa6G6b4Hu+iP9ilPua3gi7Kux5raUpCOZiE4v+KMpE8A9xx5d X-Received: by 2002:a17:906:db0a:b0:781:f24:a782 with SMTP id xj10-20020a170906db0a00b007810f24a782mr14318971ejb.399.1667239053463; Mon, 31 Oct 2022 10:57:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667239053; cv=none; d=google.com; s=arc-20160816; b=nj38JMNWbBgKKVoZMjmTbhM3OFWW/aQPiPdZ8X6X//va775NYPgjttvv5pFy01NOSa 9Jrg8FtNvKRbmFmmm9ftxTK07mL0aNIJAJf3+ZBXEHOyh/JV/BDlS0ShMeBQJRidvkmg Wh26JssBUsqaXl8+qu3/2E1usp+jwep6tiMnYxn6xK+ngq+3/bzO56LtQN7t3/IMVOMF /uCHCiihNsSbddgO4DoOHfiWLifubbmHn2HLV8I9l316IzDS7x5IpKWE2mgHOe2LvAZC pbUvY+fO8imRa9c2IbIzOtvsdp1NdZs43FSgbo76a6zQXyzhDryh+Jutw1EsLlQ7ed78 Zhmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:to:from:date:dkim-signature; bh=dKNYSD4F77Orr95mfYukdesziXMELpv4drLUA6fMKTQ=; b=Y1uE4yQKwbh27MppuIlKCTlBdOgb+cYqVWfd1a5Y/fWffzDZ5c9tk4PYmqRh8LB4ce yyr2q3wH3ag/V/55nwWRMQ2qJKvFudAb63i8c1J3EhyyGvzjzQnqw9EDh43t0WHkWvDX 2xLgqzLcJyHMWBO1x0Ovk1ee0+sYfG/sgpGfUf2fHeaF6SKOQXngh8fIPA0yMlo8q8cB Iw9SfziEcKjRvCb9zp0fLHFh6F50Z9BTeZb4IYHmkktg10lHPFuDBYRUfeVeJj4MFoc4 IAilwJ8dsw7AxbB62oBWrbTFAV0CEIM8qx5a+Uvw0BR1OOvb3PXdowrQw0fZPQs48/3E BCmg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mailo.com header.s=mailo header.b=gtbneUnh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mailo.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dn11-20020a17090794cb00b0078d4c9d77adsi9383656ejc.94.2022.10.31.10.57.09; Mon, 31 Oct 2022 10:57:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail header.i=@mailo.com header.s=mailo header.b=gtbneUnh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mailo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232077AbiJaR4R (ORCPT + 99 others); Mon, 31 Oct 2022 13:56:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35598 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232062AbiJaR4Q (ORCPT ); Mon, 31 Oct 2022 13:56:16 -0400 Received: from msg-4.mailo.com (msg-4.mailo.com [213.182.54.15]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 297FD12AE6 for ; Mon, 31 Oct 2022 10:56:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mailo.com; s=mailo; t=1667238968; bh=aOtt4C+rUZiN07CbINVnZCOezF5iwOq3whPuF7n+d/k=; h=X-EA-Auth:Date:From:To:Subject:Message-ID:References:MIME-Version: Content-Type:In-Reply-To; b=gtbneUnhfA+lN3vZB0SRzsDMD9rVk4JkqJTZzCgm9zZayMfq+YYFe/JaTpWKXHRbo krfQpWupvMPDHGdOfy2ZqoYeFfbKmHMT0nXWGF5xPiHkL+OkLKAlNC1aykMwFRx8X7 NvD0Z1JaC03m5MeIr0TeOjqWO7YM7N52TjzJixU8= Received: by b-6.in.mailobj.net [192.168.90.16] with ESMTP via [213.182.55.206] Mon, 31 Oct 2022 18:56:07 +0100 (CET) X-EA-Auth: j/FgF5M8s+oz1krS6oB+hT1Y1Zz4ICDzarTe/XqJODSEsIIhQP+pN7ujH5XcAfZOWu/8rMUdAgrjl1nJ9GVCyrzcY+Sm6tTJ Date: Mon, 31 Oct 2022 23:26:09 +0530 From: Deepak R Varma To: outreachy@lists.linux.dev, gregkh@linuxfoundation.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH v2 2/2] staging: rtl8192u: remove redundant macro definition Message-ID: <3908a0694102793f3130ba1202f1a3580aa9e187.1667237959.git.drv@mailo.com> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748226857888261944?= X-GMAIL-MSGID: =?utf-8?q?1748226857888261944?= Several ieee80211_* symbol names are extended with _rsl tag using macros. This is done to avoid a conflict when a similar symbol is already in use in another part of kernel and may lead to conflicts. However, most of these base symbol names are not found to being used anywhere in the code and hence are not useful today. These symbols are not used outside of the module and hence can be safely removed. The code continues to use the original symbol names. Suggested-by: Greg Kroah-Hartman Signed-off-by: Deepak R Varma --- Changes in v2: 1. Review other similar macro defines and clean those up as well. Suggested by gregkh@linuxfoundation.org 2. Revise patch log to explain impact of the patch Suggested by julia.lawall@inria.fr .../staging/rtl8192u/ieee80211/ieee80211.h | 64 ------------------- 1 file changed, 64 deletions(-) -- 2.30.2 diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211.h b/drivers/staging/rtl8192u/ieee80211/ieee80211.h index 00c07455cbb3..a92f847f2394 100644 --- a/drivers/staging/rtl8192u/ieee80211/ieee80211.h +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211.h @@ -223,72 +223,8 @@ struct cb_desc { #define MAX_IE_LEN 0xff // added for kernel conflict -#define ieee80211_crypt_deinit_entries ieee80211_crypt_deinit_entries_rsl -#define ieee80211_crypt_deinit_handler ieee80211_crypt_deinit_handler_rsl -#define ieee80211_crypt_delayed_deinit ieee80211_crypt_delayed_deinit_rsl -#define ieee80211_register_crypto_ops ieee80211_register_crypto_ops_rsl -#define ieee80211_unregister_crypto_ops ieee80211_unregister_crypto_ops_rsl -#define ieee80211_get_crypto_ops ieee80211_get_crypto_ops_rsl - -#define ieee80211_ccmp_null ieee80211_ccmp_null_rsl - -#define free_ieee80211 free_ieee80211_rsl -#define alloc_ieee80211 alloc_ieee80211_rsl - -#define ieee80211_rx ieee80211_rx_rsl -#define ieee80211_rx_mgt ieee80211_rx_mgt_rsl - -#define ieee80211_get_beacon ieee80211_get_beacon_rsl -#define ieee80211_wake_queue ieee80211_wake_queue_rsl -#define ieee80211_stop_queue ieee80211_stop_queue_rsl -#define ieee80211_reset_queue ieee80211_reset_queue_rsl -#define ieee80211_softmac_stop_protocol ieee80211_softmac_stop_protocol_rsl -#define ieee80211_softmac_start_protocol ieee80211_softmac_start_protocol_rsl -#define ieee80211_is_shortslot ieee80211_is_shortslot_rsl -#define ieee80211_is_54g ieee80211_is_54g_rsl -#define ieee80211_wpa_supplicant_ioctl ieee80211_wpa_supplicant_ioctl_rsl -#define ieee80211_ps_tx_ack ieee80211_ps_tx_ack_rsl -#define ieee80211_softmac_xmit ieee80211_softmac_xmit_rsl -#define ieee80211_stop_send_beacons ieee80211_stop_send_beacons_rsl #define notify_wx_assoc_event notify_wx_assoc_event_rsl #define SendDisassociation SendDisassociation_rsl -#define ieee80211_disassociate ieee80211_disassociate_rsl -#define ieee80211_start_send_beacons ieee80211_start_send_beacons_rsl -#define ieee80211_stop_scan ieee80211_stop_scan_rsl -#define ieee80211_send_probe_requests ieee80211_send_probe_requests_rsl -#define ieee80211_softmac_scan_syncro ieee80211_softmac_scan_syncro_rsl -#define ieee80211_start_scan_syncro ieee80211_start_scan_syncro_rsl - -#define ieee80211_wx_get_essid ieee80211_wx_get_essid_rsl -#define ieee80211_wx_set_essid ieee80211_wx_set_essid_rsl -#define ieee80211_wx_set_rate ieee80211_wx_set_rate_rsl -#define ieee80211_wx_get_rate ieee80211_wx_get_rate_rsl -#define ieee80211_wx_set_wap ieee80211_wx_set_wap_rsl -#define ieee80211_wx_get_wap ieee80211_wx_get_wap_rsl -#define ieee80211_wx_set_mode ieee80211_wx_set_mode_rsl -#define ieee80211_wx_get_mode ieee80211_wx_get_mode_rsl -#define ieee80211_wx_set_scan ieee80211_wx_set_scan_rsl -#define ieee80211_wx_get_freq ieee80211_wx_get_freq_rsl -#define ieee80211_wx_set_freq ieee80211_wx_set_freq_rsl -#define ieee80211_wx_set_rawtx ieee80211_wx_set_rawtx_rsl -#define ieee80211_wx_get_name ieee80211_wx_get_name_rsl -#define ieee80211_wx_set_power ieee80211_wx_set_power_rsl -#define ieee80211_wx_get_power ieee80211_wx_get_power_rsl -#define ieee80211_wlan_frequencies ieee80211_wlan_frequencies_rsl -#define ieee80211_wx_set_rts ieee80211_wx_set_rts_rsl -#define ieee80211_wx_get_rts ieee80211_wx_get_rts_rsl - -#define ieee80211_txb_free ieee80211_txb_free_rsl - -#define ieee80211_wx_set_gen_ie ieee80211_wx_set_gen_ie_rsl -#define ieee80211_wx_get_scan ieee80211_wx_get_scan_rsl -#define ieee80211_wx_set_encode ieee80211_wx_set_encode_rsl -#define ieee80211_wx_get_encode ieee80211_wx_get_encode_rsl -#define ieee80211_wx_set_mlme ieee80211_wx_set_mlme_rsl -#define ieee80211_wx_set_auth ieee80211_wx_set_auth_rsl -#define ieee80211_wx_set_encode_ext ieee80211_wx_set_encode_ext_rsl -#define ieee80211_wx_get_encode_ext ieee80211_wx_get_encode_ext_rsl - struct ieee_param { u32 cmd;