From 8f94c636ca87adf5f68830284527965c670723e0 Mon Sep 17 00:00:00 2001 From: Michael Straube Date: Sat, 21 Aug 2021 17:51:51 +0200 Subject: [PATCH] remove cmd_osdep.h header file All functions declared in the cmd_osdep.h header file are only used in a single c source file. Make the functions static and remove the header file and its includes. Link: https://lore.kernel.org/r/20210821155151.25822-1-straube.linux@gmail.com --- core/rtw_cmd.c | 12 ++++++------ include/cmd_osdep.h | 26 -------------------------- include/drv_types.h | 1 - 3 files changed, 6 insertions(+), 33 deletions(-) delete mode 100644 include/cmd_osdep.h diff --git a/core/rtw_cmd.c b/core/rtw_cmd.c index 4f49020..7d452dd 100644 --- a/core/rtw_cmd.c +++ b/core/rtw_cmd.c @@ -26,7 +26,7 @@ Caller and the rtw_cmd_thread can protect cmd_q by spin_lock. No irqsave is necessary. */ -sint _rtw_init_cmd_priv(struct cmd_priv *pcmdpriv) +static sint _rtw_init_cmd_priv(struct cmd_priv *pcmdpriv) { sint res = _SUCCESS; @@ -126,7 +126,7 @@ static void c2h_wk_callback(_workitem *work) } #endif /* CONFIG_C2H_WK */ -sint _rtw_init_evt_priv(struct evt_priv *pevtpriv) +static sint _rtw_init_evt_priv(struct evt_priv *pevtpriv) { sint res = _SUCCESS; @@ -191,7 +191,7 @@ exit: return res; } -void _rtw_free_evt_priv(struct evt_priv *pevtpriv) +static void _rtw_free_evt_priv(struct evt_priv *pevtpriv) { @@ -220,7 +220,7 @@ void _rtw_free_evt_priv(struct evt_priv *pevtpriv) } -void _rtw_free_cmd_priv(struct cmd_priv *pcmdpriv) +static void _rtw_free_cmd_priv(struct cmd_priv *pcmdpriv) { if (pcmdpriv) { @@ -251,7 +251,7 @@ ISR/Call-Back functions can't call this sub-function. extern u8 dump_cmd_id; #endif -sint _rtw_enqueue_cmd(_queue *queue, struct cmd_obj *obj, bool to_head) +static sint _rtw_enqueue_cmd(_queue *queue, struct cmd_obj *obj, bool to_head) { _irqL irqL; @@ -312,7 +312,7 @@ exit: return _SUCCESS; } -struct cmd_obj *_rtw_dequeue_cmd(_queue *queue) +static struct cmd_obj *_rtw_dequeue_cmd(_queue *queue) { _irqL irqL; struct cmd_obj *obj; diff --git a/include/cmd_osdep.h b/include/cmd_osdep.h deleted file mode 100644 index e4ba2b6..0000000 --- a/include/cmd_osdep.h +++ /dev/null @@ -1,26 +0,0 @@ -/****************************************************************************** - * - * Copyright(c) 2007 - 2017 Realtek Corporation. - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - * - *****************************************************************************/ -#ifndef __CMD_OSDEP_H_ -#define __CMD_OSDEP_H_ - - -extern sint _rtw_init_cmd_priv(struct cmd_priv *pcmdpriv); -extern sint _rtw_init_evt_priv(struct evt_priv *pevtpriv); -extern void _rtw_free_evt_priv(struct evt_priv *pevtpriv); -extern void _rtw_free_cmd_priv(struct cmd_priv *pcmdpriv); -extern sint _rtw_enqueue_cmd(_queue *queue, struct cmd_obj *obj, bool to_head); -extern struct cmd_obj *_rtw_dequeue_cmd(_queue *queue); - -#endif diff --git a/include/drv_types.h b/include/drv_types.h index dbb4208..3d39416 100644 --- a/include/drv_types.h +++ b/include/drv_types.h @@ -62,7 +62,6 @@ typedef struct _ADAPTER _adapter, ADAPTER, *PADAPTER; #endif #include -#include #include #include #include