Commit e2530e0b authored by Larry Finger's avatar Larry Finger Committed by Greg Kroah-Hartman
Browse files

staging: r8188eu: Remove wrapper around do_div



Wrapper routine rtw_modular64() contains only a call to do_div() and
is used once in the code. Remove the wrapper.

Signed-off-by: default avatarLarry Finger <Larry.Finger@lwfinger.net>
Link: https://lore.kernel.org/r/20210803135223.12543-9-Larry.Finger@lwfinger.net


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b90a6bf3
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1453,7 +1453,8 @@ static void SetHwReg8188EU(struct adapter *Adapter, u8 variable, u8 *val)
			struct mlme_ext_priv	*pmlmeext = &Adapter->mlmeextpriv;
			struct mlme_ext_info	*pmlmeinfo = &(pmlmeext->mlmext_info);

			tsf = pmlmeext->TSFValue - rtw_modular64(pmlmeext->TSFValue, (pmlmeinfo->bcn_interval*1024)) - 1024; /* us */
			tsf = pmlmeext->TSFValue - do_div(pmlmeext->TSFValue,
							  pmlmeinfo->bcn_interval * 1024) - 1024; /* us */

			if (((pmlmeinfo->state&0x03) == WIFI_FW_ADHOC_STATE) || ((pmlmeinfo->state&0x03) == WIFI_FW_AP_STATE))
				StopTxBeacon(Adapter);
+0 −2
Original line number Diff line number Diff line
@@ -353,8 +353,6 @@ void rtw_free_netdev(struct net_device *netdev);

#define rtw_signal_process(pid, sig) kill_pid(find_vpid((pid)),(sig), 1)

u64 rtw_modular64(u64 x, u64 y);

/* Macros for handling unaligned memory accesses */

#define RTW_GET_BE16(a) ((u16) (((a)[0] << 8) | (a)[1]))
+0 −5
Original line number Diff line number Diff line
@@ -311,11 +311,6 @@ int rtw_change_ifname(struct adapter *padapter, const char *ifname)
	return -1;
}

u64 rtw_modular64(u64 x, u64 y)
{
	return do_div(x, y);
}

void rtw_buf_free(u8 **buf, u32 *buf_len)
{
	*buf_len = 0;