alistair23-linux/drivers/staging/rtl8723bs/include
Nathan Chancellor 97715058b7 staging: rtl8723bs: Fix build error with Clang when inlining is disabled
When CONFIG_NO_AUTO_INLINE was present in linux-next (which added
'-fno-inline-functions' to KBUILD_CFLAGS), an allyesconfig build with
Clang failed at the modpost stage:

ERROR: "is_broadcast_mac_addr" [drivers/staging/rtl8723bs/r8723bs.ko] undefined!
ERROR: "is_zero_mac_addr" [drivers/staging/rtl8723bs/r8723bs.ko] undefined!
ERROR: "is_multicast_mac_addr" [drivers/staging/rtl8723bs/r8723bs.ko] undefined!

These functions were marked as extern inline, meaning that if inlining
doesn't happen, the function will be undefined, as it is above.

This happens to work with GCC because the '-fno-inline-functions' option
respects the __inline attribute so all instances of these functions are
inlined as expected and the definition doesn't actually matter. However,
with Clang and '-fno-inline-functions', a function has to be marked with
the __always_inline attribute to be considered for inlining, which none
of these functions are. Clang tries to find the symbol definition
elsewhere as it was told and fails, which trickles down to modpost.

To make sure that this code compiles regardless of compiler and make the
intention of the code clearer, use 'static' to ensure these functions
are always defined, regardless of inlining. Additionally, silence a
checkpatch warning by switching from '__inline' to 'inline'.

Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-01-18 10:28:44 +01:00
..
autoconf.h staging: rtl8723bs: Replace license boilerplate with SPDX identifiers 2018-05-11 11:48:24 +02:00
basic_types.h staging: rtl8723bs: Replace license boilerplate with SPDX identifiers 2018-05-11 11:48:24 +02:00
cmd_osdep.h staging: rtl8723bs: Replace license boilerplate with SPDX identifiers 2018-05-11 11:48:24 +02:00
drv_conf.h staging: rtl8723bs: Replace license boilerplate with SPDX identifiers 2018-05-11 11:48:24 +02:00
drv_types.h staging: rtl8723bs: fix spelling mistake "toogle" -> "toggle" 2018-09-25 21:03:05 +02:00
drv_types_sdio.h staging: rtl8723bs: Replace license boilerplate with SPDX identifiers 2018-05-11 11:48:24 +02:00
ethernet.h staging: rtl8723bs: Replace license boilerplate with SPDX identifiers 2018-05-11 11:48:24 +02:00
Hal8192CPhyReg.h staging: rtl8723bs: Replace license boilerplate with SPDX identifiers 2018-05-11 11:48:24 +02:00
hal_btcoex.h staging: rtl8723bs: Replace license boilerplate with SPDX identifiers 2018-05-11 11:48:24 +02:00
hal_com.h staging: rtl8723bs: Replace license boilerplate with SPDX identifiers 2018-05-11 11:48:24 +02:00
hal_com_h2c.h staging: rtl8723bs: Replace license boilerplate with SPDX identifiers 2018-05-11 11:48:24 +02:00
hal_com_phycfg.h staging: rtl8723bs: Rename PHY_GetTxPowerLimit(). 2018-06-28 22:03:16 +09:00
hal_com_reg.h staging: rtl8723bs: Replace license boilerplate with SPDX identifiers 2018-05-11 11:48:24 +02:00
hal_data.h staging: rtl8723bs: Replace license boilerplate with SPDX identifiers 2018-05-11 11:48:24 +02:00
hal_intf.h staging: rtl8723bs: Replace license boilerplate with SPDX identifiers 2018-05-11 11:48:24 +02:00
hal_pg.h staging: rtl8723bs: Replace license boilerplate with SPDX identifiers 2018-05-11 11:48:24 +02:00
hal_phy.h staging: rtl8723bs: Replace license boilerplate with SPDX identifiers 2018-05-11 11:48:24 +02:00
hal_phy_cfg.h staging: rtl8723bs: Rename 'Hal8723BPhyCfg.h' using snake case. 2018-05-25 18:47:22 +02:00
hal_phy_reg.h staging: rtl8723bs: Replace license boilerplate with SPDX identifiers 2018-05-11 11:48:24 +02:00
hal_phy_reg_8723b.h staging: rtl8723bs: Rename 'Hal8723bPhyReg.h' using snake case. 2018-05-25 18:47:22 +02:00
hal_pwr_seq.h staging: rtl8723bs: Rename 'Hal8723BPwrSeq.{c, h}' to 'hal_pwr_seq.*'. 2018-05-25 18:47:22 +02:00
hal_sdio.h staging: rtl8723bs: Replace license boilerplate with SPDX identifiers 2018-05-11 11:48:24 +02:00
HalPwrSeqCmd.h staging: rtl8723bs: Replace license boilerplate with SPDX identifiers 2018-05-11 11:48:24 +02:00
HalVerDef.h staging: rtl8723bs: Replace license boilerplate with SPDX identifiers 2018-05-11 11:48:24 +02:00
ieee80211.h staging: rtl8723bs: Fix build error with Clang when inlining is disabled 2019-01-18 10:28:44 +01:00
ioctl_cfg80211.h staging: rtl8723bs: Replace license boilerplate with SPDX identifiers 2018-05-11 11:48:24 +02:00
mlme_osdep.h staging: rtl8723bs: Replace license boilerplate with SPDX identifiers 2018-05-11 11:48:24 +02:00
osdep_intf.h staging: rtl8723bs: Replace license boilerplate with SPDX identifiers 2018-05-11 11:48:24 +02:00
osdep_service.h staging: rtl8723bs: Replace license boilerplate with SPDX identifiers 2018-05-11 11:48:24 +02:00
osdep_service_linux.h staging: rtl8723bs: remove semaphore remnants 2018-12-12 11:50:46 +01:00
recv_osdep.h staging: rtl8723bs: Replace license boilerplate with SPDX identifiers 2018-05-11 11:48:24 +02:00
rtl8192c_recv.h staging: rtl8723bs: Replace license boilerplate with SPDX identifiers 2018-05-11 11:48:24 +02:00
rtl8723b_cmd.h staging: rtl8723bs: Replace license boilerplate with SPDX identifiers 2018-05-11 11:48:24 +02:00
rtl8723b_dm.h staging: rtl8723bs: Replace license boilerplate with SPDX identifiers 2018-05-11 11:48:24 +02:00
rtl8723b_hal.h staging: rtl8723bs: Fix grammar error in comment. 2018-05-25 18:47:22 +02:00
rtl8723b_recv.h staging: rtl8723bs: Replace license boilerplate with SPDX identifiers 2018-05-11 11:48:24 +02:00
rtl8723b_rf.h staging: rtl8723bs: remove rtl8192c_rf.h 2018-07-06 17:37:35 +02:00
rtl8723b_spec.h staging: rtl8723bs: Replace license boilerplate with SPDX identifiers 2018-05-11 11:48:24 +02:00
rtl8723b_xmit.h staging: rtl8723bs: Replace license boilerplate with SPDX identifiers 2018-05-11 11:48:24 +02:00
rtw_ap.h staging: rtl8723bs: Replace license boilerplate with SPDX identifiers 2018-05-11 11:48:24 +02:00
rtw_btcoex.h staging: rtl8723bs: Replace license boilerplate with SPDX identifiers 2018-05-11 11:48:24 +02:00
rtw_byteorder.h staging: rtl8723bs: Replace license boilerplate with SPDX identifiers 2018-05-11 11:48:24 +02:00
rtw_cmd.h staging: rtl8723bs: change semaphores to completions 2018-12-12 11:50:46 +01:00
rtw_debug.h staging: rtl8723bs: Replace license boilerplate with SPDX identifiers 2018-05-11 11:48:24 +02:00
rtw_eeprom.h staging: rtl8723bs: Replace license boilerplate with SPDX identifiers 2018-05-11 11:48:24 +02:00
rtw_efuse.h staging: rtl8723bs: Replace license boilerplate with SPDX identifiers 2018-05-11 11:48:24 +02:00
rtw_event.h staging: rtl8723bs: Replace license boilerplate with SPDX identifiers 2018-05-11 11:48:24 +02:00
rtw_ht.h staging: rtl8723bs: Replace license boilerplate with SPDX identifiers 2018-05-11 11:48:24 +02:00
rtw_io.h staging: rtl8723bs: remove semaphore remnants 2018-12-12 11:50:46 +01:00
rtw_ioctl.h staging: rtl8723bs: Replace license boilerplate with SPDX identifiers 2018-05-11 11:48:24 +02:00
rtw_ioctl_set.h staging: rtl8723bs: Replace license boilerplate with SPDX identifiers 2018-05-11 11:48:24 +02:00
rtw_mlme.h staging: rtl8723bs: Replace license boilerplate with SPDX identifiers 2018-05-11 11:48:24 +02:00
rtw_mlme_ext.h staging: rtl8723bs: remove dead code, rtw_port_switch_chk() 2018-12-12 11:37:58 +01:00
rtw_mp.h staging: rtl8723bs: remove semaphore remnants 2018-12-12 11:50:46 +01:00
rtw_odm.h staging: rtl8723bs: Replace license boilerplate with SPDX identifiers 2018-05-11 11:48:24 +02:00
rtw_pwrctrl.h staging: rtl8723bs: remove semaphore remnants 2018-12-12 11:50:46 +01:00
rtw_qos.h staging: rtl8723bs: Replace license boilerplate with SPDX identifiers 2018-05-11 11:48:24 +02:00
rtw_recv.h staging: rtl8723bs: Replace license boilerplate with SPDX identifiers 2018-05-11 11:48:24 +02:00
rtw_rf.h staging: rtl8723bs: Replace license boilerplate with SPDX identifiers 2018-05-11 11:48:24 +02:00
rtw_security.h staging: rtl8723bs: Replace license boilerplate with SPDX identifiers 2018-05-11 11:48:24 +02:00
rtw_version.h staging: rtl8723bs: Replace license boilerplate with SPDX identifiers 2018-05-11 11:48:24 +02:00
rtw_wifi_regd.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
rtw_xmit.h staging: rtl8723bs: change semaphores to completions 2018-12-12 11:50:46 +01:00
sdio_hal.h staging: rtl8723bs: Replace license boilerplate with SPDX identifiers 2018-05-11 11:48:24 +02:00
sdio_ops.h staging: rtl8723bs: Replace license boilerplate with SPDX identifiers 2018-05-11 11:48:24 +02:00
sdio_ops_linux.h staging: rtl8723bs: Replace license boilerplate with SPDX identifiers 2018-05-11 11:48:24 +02:00
sdio_osintf.h staging: rtl8723bs: Replace license boilerplate with SPDX identifiers 2018-05-11 11:48:24 +02:00
sta_info.h staging: rtl8723bs: Replace license boilerplate with SPDX identifiers 2018-05-11 11:48:24 +02:00
wifi.h ieee80211: bump IEEE80211_MAX_AMPDU_BUF to support HE 2018-06-18 22:39:39 +02:00
wlan_bssdef.h staging: rtl8723bs: Replace license boilerplate with SPDX identifiers 2018-05-11 11:48:24 +02:00
xmit_osdep.h staging: rtl8723bs: remove rtw_set_tx_chksum_offload() 2018-06-28 22:06:11 +09:00