android_kernel_xiaomi_sm8350/drivers/net/wireless/hostap
Pavel Roskin b15eff2632 [PATCH] hostap update
Warning fix for 64-bit platforms

Hello!

The patch fixes following warning seen on 64-bit platforms (in my case -
x86_64, gcc-4.0):

In file included from /usr/local/src/hostap/driver/modules/hostap_cs.c:203:
/usr/local/src/hostap/driver/modules/hostap_hw.c: In function ?prism2_transmit_cb?:
/usr/local/src/hostap/driver/modules/hostap_hw.c:1674: warning: cast from pointer to integer of different size
/usr/local/src/hostap/driver/modules/hostap_hw.c: In function ?prism2_transmit?:
/usr/local/src/hostap/driver/modules/hostap_hw.c:1758: warning: cast to pointer from integer of different size

prism2_transmit_cb uses a (void *) argument to get an integer.   A
simple fix would be to use double cast from pointer to long and then to
int (and vice versa when int is passed as a pointer).  But I prefer a
slightly longer patch.

I believe that whenever an argument can hold both a pointer and an
integer, it should be declared long.  long can hold both pointers and
integers (except win64, but we are not coding for Windows), it can be
cast to both of them and it's never assumed to be a valid pointer, which
could be useful for some automatic code checkers.

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: Jouni Malinen <jkmaline@cc.hut.fi>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-07-30 18:17:23 -04:00
..
hostap_80211_rx.c [PATCH] hostap update 2005-07-30 18:17:23 -04:00
hostap_80211_tx.c Add HostAP wireless driver. 2005-05-12 22:54:16 -04:00
hostap_80211.h Add HostAP wireless driver. 2005-05-12 22:54:16 -04:00
hostap_ap.c Add HostAP wireless driver. 2005-05-12 22:54:16 -04:00
hostap_ap.h Add HostAP wireless driver. 2005-05-12 22:54:16 -04:00
hostap_common.h [PATCH] hostap update 2005-07-30 18:17:22 -04:00
hostap_config.h [PATCH] hostap update 2005-07-30 18:17:22 -04:00
hostap_crypt_ccmp.c [PATCH] hostap update 2005-07-30 18:17:22 -04:00
hostap_crypt_tkip.c [PATCH] hostap update 2005-07-30 18:17:22 -04:00
hostap_crypt_wep.c [PATCH] hostap update 2005-07-30 18:17:22 -04:00
hostap_crypt.c Add HostAP wireless driver. 2005-05-12 22:54:16 -04:00
hostap_crypt.h Add HostAP wireless driver. 2005-05-12 22:54:16 -04:00
hostap_cs.c [PATCH] hostap update 2005-07-30 18:17:22 -04:00
hostap_download.c Add HostAP wireless driver. 2005-05-12 22:54:16 -04:00
hostap_hw.c [PATCH] hostap update 2005-07-30 18:17:23 -04:00
hostap_info.c [PATCH] hostap update 2005-07-30 18:17:23 -04:00
hostap_ioctl.c [PATCH] hostap update 2005-07-30 18:17:23 -04:00
hostap_pci.c [PATCH] hostap update 2005-07-30 18:17:22 -04:00
hostap_plx.c [PATCH] hostap update 2005-07-30 18:17:22 -04:00
hostap_proc.c [PATCH] hostap update 2005-07-30 18:17:23 -04:00
hostap_wlan.h [PATCH] hostap update 2005-07-30 18:17:23 -04:00
hostap.c [PATCH] hostap update 2005-07-30 18:17:22 -04:00
hostap.h Add HostAP wireless driver. 2005-05-12 22:54:16 -04:00
Kconfig Add HostAP wireless driver. 2005-05-12 22:54:16 -04:00
Makefile Add HostAP wireless driver. 2005-05-12 22:54:16 -04:00