From 67db20f0bbdd2d649f2126a2a75cf1e3bffa1377 Mon Sep 17 00:00:00 2001 From: navin patidar Date: Thu, 10 Jul 2014 09:12:27 +0530 Subject: [PATCH] staging: rtl8188eu: Remove unused functions rtw_cbuf_[full, empty, push, pop]() Signed-off-by: navin patidar Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8188eu/include/osdep_service.h | 6 --- drivers/staging/rtl8188eu/os_dep/osdep_service.c | 65 ----------------------- 2 files changed, 71 deletions(-) diff --git a/drivers/staging/rtl8188eu/include/osdep_service.h b/drivers/staging/rtl8188eu/include/osdep_service.h index 2a20fca..3a620f8 100644 --- a/drivers/staging/rtl8188eu/include/osdep_service.h +++ b/drivers/staging/rtl8188eu/include/osdep_service.h @@ -194,10 +194,4 @@ struct rtw_cbuf { u32 size; void *bufs[0]; }; - -bool rtw_cbuf_full(struct rtw_cbuf *cbuf); -bool rtw_cbuf_empty(struct rtw_cbuf *cbuf); -bool rtw_cbuf_push(struct rtw_cbuf *cbuf, void *buf); -void *rtw_cbuf_pop(struct rtw_cbuf *cbuf); - #endif diff --git a/drivers/staging/rtl8188eu/os_dep/osdep_service.c b/drivers/staging/rtl8188eu/os_dep/osdep_service.c index f54cf52..8af4a8d 100644 --- a/drivers/staging/rtl8188eu/os_dep/osdep_service.c +++ b/drivers/staging/rtl8188eu/os_dep/osdep_service.c @@ -163,68 +163,3 @@ keep_ori: /* free ori */ kfree(ori); } - - -/** - * rtw_cbuf_full - test if cbuf is full - * @cbuf: pointer of struct rtw_cbuf - * - * Returns: true if cbuf is full - */ -inline bool rtw_cbuf_full(struct rtw_cbuf *cbuf) -{ - return (cbuf->write == cbuf->read-1) ? true : false; -} - -/** - * rtw_cbuf_empty - test if cbuf is empty - * @cbuf: pointer of struct rtw_cbuf - * - * Returns: true if cbuf is empty - */ -inline bool rtw_cbuf_empty(struct rtw_cbuf *cbuf) -{ - return (cbuf->write == cbuf->read) ? true : false; -} - -/** - * rtw_cbuf_push - push a pointer into cbuf - * @cbuf: pointer of struct rtw_cbuf - * @buf: pointer to push in - * - * Lock free operation, be careful of the use scheme - * Returns: true push success - */ -bool rtw_cbuf_push(struct rtw_cbuf *cbuf, void *buf) -{ - if (rtw_cbuf_full(cbuf)) - return _FAIL; - - if (0) - DBG_88E("%s on %u\n", __func__, cbuf->write); - cbuf->bufs[cbuf->write] = buf; - cbuf->write = (cbuf->write+1)%cbuf->size; - - return _SUCCESS; -} - -/** - * rtw_cbuf_pop - pop a pointer from cbuf - * @cbuf: pointer of struct rtw_cbuf - * - * Lock free operation, be careful of the use scheme - * Returns: pointer popped out - */ -void *rtw_cbuf_pop(struct rtw_cbuf *cbuf) -{ - void *buf; - if (rtw_cbuf_empty(cbuf)) - return NULL; - - if (0) - DBG_88E("%s on %u\n", __func__, cbuf->read); - buf = cbuf->bufs[cbuf->read]; - cbuf->read = (cbuf->read+1)%cbuf->size; - - return buf; -} -- 2.7.4