From: Larry Finger <Larry.Finger@lwfinger.net>
To: gregkh@linuxfoundation.org
Cc: phil@philpotter.co.uk, linux-staging@lists.linux.dev,
linux-kernel@vger.kernel.org,
Larry Finger <Larry.Finger@lwfinger.net>
Subject: [PATCH 08/10] staging: r8188eu: Remove wrapper around do_div
Date: Tue, 3 Aug 2021 08:52:21 -0500 [thread overview]
Message-ID: <20210803135223.12543-9-Larry.Finger@lwfinger.net> (raw)
In-Reply-To: <20210803135223.12543-1-Larry.Finger@lwfinger.net>
Wrapper routine rtw_modular64() contains only a call to do_div() and
is used once in the code. Remove the wrapper.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
---
drivers/staging/r8188eu/hal/usb_halinit.c | 3 ++-
drivers/staging/r8188eu/include/osdep_service.h | 2 --
drivers/staging/r8188eu/os_dep/osdep_service.c | 5 -----
3 files changed, 2 insertions(+), 8 deletions(-)
diff --git a/drivers/staging/r8188eu/hal/usb_halinit.c b/drivers/staging/r8188eu/hal/usb_halinit.c
index 441080bd0b74..0d945a3bb1d7 100644
--- a/drivers/staging/r8188eu/hal/usb_halinit.c
+++ b/drivers/staging/r8188eu/hal/usb_halinit.c
@@ -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);
diff --git a/drivers/staging/r8188eu/include/osdep_service.h b/drivers/staging/r8188eu/include/osdep_service.h
index 6203e3c219ca..52862785647f 100644
--- a/drivers/staging/r8188eu/include/osdep_service.h
+++ b/drivers/staging/r8188eu/include/osdep_service.h
@@ -344,8 +344,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]))
diff --git a/drivers/staging/r8188eu/os_dep/osdep_service.c b/drivers/staging/r8188eu/os_dep/osdep_service.c
index c05b7589e9b4..f2fae1c7f147 100644
--- a/drivers/staging/r8188eu/os_dep/osdep_service.c
+++ b/drivers/staging/r8188eu/os_dep/osdep_service.c
@@ -283,11 +283,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;
--
2.32.0
next prev parent reply other threads:[~2021-08-03 13:52 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-03 13:52 [PATCH 00/10] Various cleanups of driver Larry Finger
2021-08-03 13:52 ` [PATCH 01/10] staging: r8188eu: Remove wrappers for kalloc() and kzalloc() Larry Finger
2021-08-03 13:52 ` [PATCH 02/10] staging: r8188eu: Remove wrapper around vfree Larry Finger
2021-08-03 13:52 ` [PATCH 03/10] staging: r8188eu: Remove wrappers for atomic operations Larry Finger
2021-08-03 13:52 ` [PATCH 04/10] staging: r8188eu: Remove 4 empty routines from os_sep/service.c Larry Finger
2021-08-03 13:52 ` [PATCH 05/10] staging: r8188eu: Remove all calls to _rtw_spinlock_free() Larry Finger
2021-08-03 13:52 ` [PATCH 06/10] staging: r8188eu: Remove more empty routines Larry Finger
2021-08-03 13:52 ` [PATCH 07/10] staging: r8188eu: Remove rtw_division64() Larry Finger
2021-08-03 13:52 ` Larry Finger [this message]
2021-08-03 13:52 ` [PATCH 09/10] staging: r8188eu: Remove some unused and ugly macros Larry Finger
2021-08-03 13:52 ` [PATCH 10/10] staging: r8188eu: Remove some bit manipulation macros Larry Finger
2021-08-05 10:58 ` [PATCH 00/10] Various cleanups of driver Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210803135223.12543-9-Larry.Finger@lwfinger.net \
--to=larry.finger@lwfinger.net \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=phil@philpotter.co.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).