summaryrefslogtreecommitdiffstats
path: root/drivers/staging/r8188eu/include/osdep_service.h
diff options
context:
space:
mode:
authorFabio M. De Francesco <fmdefrancesco@gmail.com>2021-08-28 13:36:56 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-09-13 08:49:49 +0200
commitd3ede18eeb4645c49c2de6eaad2439626407dd86 (patch)
tree349155a3d2fabb9e51f101fd14959f3f71465ef9 /drivers/staging/r8188eu/include/osdep_service.h
parentf75a4eec49efcae5cb624462bcb5051c762a871d (diff)
downloadlinux-d3ede18eeb4645c49c2de6eaad2439626407dd86.tar.bz2
staging: r8188eu: Remove _enter/_exit_critical_mutex()
Remove _enter_critical_mutex() and _exit_critical_mutex(). They are unnecessary wrappers, respectively to mutex_lock_interruptible() and to mutex_unlock(). They also have an odd interface that takes an unused argument named pirqL of type unsigned long. The original code enters the critical section if the mutex API is interrupted while waiting to acquire the lock; therefore it could lead to a race condition. Use mutex_lock() because it is uninterruptible and so avoid that above-mentioned potential race condition. Tested-by: Pavel Skripkin <paskripkin@gmail.com> Reviewed-by: Pavel Skripkin <paskripkin@gmail.com> Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com> Link: https://lore.kernel.org/r/20210828113656.6963-1-fmdefrancesco@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/r8188eu/include/osdep_service.h')
-rw-r--r--drivers/staging/r8188eu/include/osdep_service.h13
1 files changed, 0 insertions, 13 deletions
diff --git a/drivers/staging/r8188eu/include/osdep_service.h b/drivers/staging/r8188eu/include/osdep_service.h
index 05bac61c3a19..b832849bc308 100644
--- a/drivers/staging/r8188eu/include/osdep_service.h
+++ b/drivers/staging/r8188eu/include/osdep_service.h
@@ -56,19 +56,6 @@ static inline struct list_head *get_list_head(struct __queue *queue)
return (&(queue->queue));
}
-static inline int _enter_critical_mutex(struct mutex *pmutex, unsigned long *pirqL)
-{
- int ret;
-
- ret = mutex_lock_interruptible(pmutex);
- return ret;
-}
-
-static inline void _exit_critical_mutex(struct mutex *pmutex, unsigned long *pirqL)
-{
- mutex_unlock(pmutex);
-}
-
static inline void rtw_list_delete(struct list_head *plist)
{
list_del_init(plist);