* [PATCH v2 0/2] staging: rtl8192u: unused code cleanup
@ 2022-10-31 17:55 Deepak R Varma
2022-10-31 17:55 ` [PATCH v2 1/2] staging: rtl8192u: remove unnecessary function implementation Deepak R Varma
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Deepak R Varma @ 2022-10-31 17:55 UTC (permalink / raw)
To: outreachy, gregkh, linux-staging, linux-kernel
Remove unnecessary or unused code.
Changes in v2:
Patch1:
1. Revise patch log to explain impact of the patch
Suggested by gregkh@linuxfoundation.org
Patch2:
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
Deepak R Varma (2):
staging: rtl8192u: remove unnecessary function implementation
staging: rtl8192u: remove redundant macro definition
.../staging/rtl8192u/ieee80211/ieee80211.h | 67 -------------------
.../rtl8192u/ieee80211/ieee80211_crypt_tkip.c | 6 --
.../rtl8192u/ieee80211/ieee80211_module.c | 3 -
3 files changed, 76 deletions(-)
--
2.30.2
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v2 1/2] staging: rtl8192u: remove unnecessary function implementation
2022-10-31 17:55 [PATCH v2 0/2] staging: rtl8192u: unused code cleanup Deepak R Varma
@ 2022-10-31 17:55 ` Deepak R Varma
2022-10-31 17:56 ` [PATCH v2 2/2] staging: rtl8192u: remove redundant macro definition Deepak R Varma
2022-11-02 7:27 ` [PATCH v2 0/2] staging: rtl8192u: unused code cleanup Greg KH
2 siblings, 0 replies; 5+ messages in thread
From: Deepak R Varma @ 2022-10-31 17:55 UTC (permalink / raw)
To: outreachy, gregkh, linux-staging, linux-kernel
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 <drv@mailo.com>
---
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(-)
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:
--
2.30.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH v2 2/2] staging: rtl8192u: remove redundant macro definition
2022-10-31 17:55 [PATCH v2 0/2] staging: rtl8192u: unused code cleanup Deepak R Varma
2022-10-31 17:55 ` [PATCH v2 1/2] staging: rtl8192u: remove unnecessary function implementation Deepak R Varma
@ 2022-10-31 17:56 ` Deepak R Varma
2022-11-02 7:27 ` [PATCH v2 0/2] staging: rtl8192u: unused code cleanup Greg KH
2 siblings, 0 replies; 5+ messages in thread
From: Deepak R Varma @ 2022-10-31 17:56 UTC (permalink / raw)
To: outreachy, gregkh, linux-staging, linux-kernel
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 <gregkh@linuxfoundation.org>
Signed-off-by: Deepak R Varma <drv@mailo.com>
---
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(-)
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;
--
2.30.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v2 0/2] staging: rtl8192u: unused code cleanup
2022-10-31 17:55 [PATCH v2 0/2] staging: rtl8192u: unused code cleanup Deepak R Varma
2022-10-31 17:55 ` [PATCH v2 1/2] staging: rtl8192u: remove unnecessary function implementation Deepak R Varma
2022-10-31 17:56 ` [PATCH v2 2/2] staging: rtl8192u: remove redundant macro definition Deepak R Varma
@ 2022-11-02 7:27 ` Greg KH
2022-11-02 10:54 ` Deepak R Varma
2 siblings, 1 reply; 5+ messages in thread
From: Greg KH @ 2022-11-02 7:27 UTC (permalink / raw)
To: Deepak R Varma; +Cc: outreachy, linux-staging, linux-kernel
On Mon, Oct 31, 2022 at 11:25:14PM +0530, Deepak R Varma wrote:
> Remove unnecessary or unused code.
>
> Changes in v2:
> Patch1:
> 1. Revise patch log to explain impact of the patch
> Suggested by gregkh@linuxfoundation.org
> Patch2:
> 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
>
> Deepak R Varma (2):
> staging: rtl8192u: remove unnecessary function implementation
> staging: rtl8192u: remove redundant macro definition
>
> .../staging/rtl8192u/ieee80211/ieee80211.h | 67 -------------------
> .../rtl8192u/ieee80211/ieee80211_crypt_tkip.c | 6 --
> .../rtl8192u/ieee80211/ieee80211_module.c | 3 -
> 3 files changed, 76 deletions(-)
This series causes a build breakage:
MODPOST Module.symvers
../ERROR: modpost: net/mac80211/mac80211: 'ieee80211_wake_queue' exported twice. Previous export was in drivers/staging/rtl8192u/r8192u_usb.ko
ERROR: modpost: net/mac80211/mac80211: 'ieee80211_stop_queue' exported twice. Previous export was in drivers/staging/rtl8192u/r8192u_usb.ko
make[1]: *** [scripts/Makefile.modpost:126: Module.symvers] Error 1
make: *** [Makefile:1944: modpost] Error 2
Always test build your changes.
greg k-h
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2 0/2] staging: rtl8192u: unused code cleanup
2022-11-02 7:27 ` [PATCH v2 0/2] staging: rtl8192u: unused code cleanup Greg KH
@ 2022-11-02 10:54 ` Deepak R Varma
0 siblings, 0 replies; 5+ messages in thread
From: Deepak R Varma @ 2022-11-02 10:54 UTC (permalink / raw)
To: Greg KH; +Cc: outreachy, linux-staging, linux-kernel
On Wed, Nov 02, 2022 at 08:27:40AM +0100, Greg KH wrote:
> On Mon, Oct 31, 2022 at 11:25:14PM +0530, Deepak R Varma wrote:
> > Remove unnecessary or unused code.
> >
> > Changes in v2:
> > Patch1:
> > 1. Revise patch log to explain impact of the patch
> > Suggested by gregkh@linuxfoundation.org
> > Patch2:
> > 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
> >
> > Deepak R Varma (2):
> > staging: rtl8192u: remove unnecessary function implementation
> > staging: rtl8192u: remove redundant macro definition
> >
> > .../staging/rtl8192u/ieee80211/ieee80211.h | 67 -------------------
> > .../rtl8192u/ieee80211/ieee80211_crypt_tkip.c | 6 --
> > .../rtl8192u/ieee80211/ieee80211_module.c | 3 -
> > 3 files changed, 76 deletions(-)
>
> This series causes a build breakage:
>
> MODPOST Module.symvers
> ../ERROR: modpost: net/mac80211/mac80211: 'ieee80211_wake_queue' exported twice. Previous export was in drivers/staging/rtl8192u/r8192u_usb.ko
> ERROR: modpost: net/mac80211/mac80211: 'ieee80211_stop_queue' exported twice. Previous export was in drivers/staging/rtl8192u/r8192u_usb.ko
> make[1]: *** [scripts/Makefile.modpost:126: Module.symvers] Error 1
> make: *** [Makefile:1944: modpost] Error 2
>
> Always test build your changes.
My apologies. I did a limited driver specific build but did not run a full make.
I understand that the EXPORT_SYMBOL is across the kernel and I should have run a
full build.
I have made the corrections and now running a full build. I will send a revision
shortly.
Sorry for the trouble.
./drv
>
> greg k-h
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-11-02 10:55 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-31 17:55 [PATCH v2 0/2] staging: rtl8192u: unused code cleanup Deepak R Varma
2022-10-31 17:55 ` [PATCH v2 1/2] staging: rtl8192u: remove unnecessary function implementation Deepak R Varma
2022-10-31 17:56 ` [PATCH v2 2/2] staging: rtl8192u: remove redundant macro definition Deepak R Varma
2022-11-02 7:27 ` [PATCH v2 0/2] staging: rtl8192u: unused code cleanup Greg KH
2022-11-02 10:54 ` Deepak R Varma
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).