Re: [PATCH 5/8] staging: rtl8188eu: Remove function rtw_modular64()

2020-04-14 Thread Dan Carpenter
On Tue, Apr 14, 2020 at 03:22:59PM +0300, Ivan Safonov wrote: > On 4/14/20 2:56 PM, Dan Carpenter wrote: > > On Sun, Apr 12, 2020 at 04:34:08PM +0300, Ivan Safonov wrote: > > > > Remove function rtw_modular64 as all it does is call do_div. > > > > > > This is wrong. Macro do_div(x, y) change

Re: [PATCH 5/8] staging: rtl8188eu: Remove function rtw_modular64()

2020-04-14 Thread Ivan Safonov
On 4/14/20 2:56 PM, Dan Carpenter wrote: On Sun, Apr 12, 2020 at 04:34:08PM +0300, Ivan Safonov wrote: Remove function rtw_modular64 as all it does is call do_div. This is wrong. Macro do_div(x, y) change first argument x, but rtw_modular64(x, y) preserve it. + tsf =

Re: [PATCH 5/8] staging: rtl8188eu: Remove function rtw_modular64()

2020-04-14 Thread Dan Carpenter
On Sun, Apr 12, 2020 at 04:34:08PM +0300, Ivan Safonov wrote: > > Remove function rtw_modular64 as all it does is call do_div. > > This is wrong. Macro do_div(x, y) change first argument x, but > rtw_modular64(x, y) preserve it. > > > + tsf = pmlmeext->TSFValue -

Re: [PATCH 5/8] staging: rtl8188eu: Remove function rtw_modular64()

2020-04-12 Thread Ivan Safonov
Remove function rtw_modular64 as all it does is call do_div. This is wrong. Macro do_div(x, y) change first argument x, but rtw_modular64(x, y) preserve it. + tsf = pmlmeext->TSFValue - do_div(pmlmeext->TSFValue, (pmlmeinfo->bcn_interval*1024)) - 1024; /* us */

[PATCH 5/8] staging: rtl8188eu: Remove function rtw_modular64()

2019-07-12 Thread Nishka Dasgupta
Remove function rtw_modular64 as all it does is call do_div. Replace call to rtw_modular64 with call to do_div. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta --- drivers/staging/rtl8188eu/hal/usb_halinit.c | 2 +- drivers/staging/rtl8188eu/include/osdep_service.h | 2 --