get rid of useless header file
cover get rid of useless header file
The stuffs in basic_types.h are either not used, or already defined in the kernel. Get rid of it.
Nam Cao (2):
staging: r8188eu: replace N_BYTE_ALIGMENT with ALIGN
staging: r8188eu: remove basic_types.h
drivers/staging/r8188eu/core/rtw_recv.c | 2 +- drivers/staging/r8188eu/core/rtw_xmit.c | 6 +++--- drivers/staging/r8188eu/hal/rtl8188eu_recv.c | 2 +- drivers/staging/r8188eu/include/basic_types.h | 19 ------------------- .../staging/r8188eu/include/osdep_service.h | 1 - drivers/staging/r8188eu/os_dep/xmit_linux.c | 2 +- 6 files changed, 6 insertions(+), 26 deletions(-) delete mode 100644 drivers/staging/r8188eu/include/basic_types.h
Signature · 1 line
2.25.1
PATCH 1/2 staging: r8188eu: replace N_BYTE_ALIGMENT with ALIGN
Replace the macro N_BYTE_ALIGMENT (defined in this driver) with ALIGN because they do the same thing.
--- drivers/staging/r8188eu/core/rtw_recv.c | 2 +- drivers/staging/r8188eu/core/rtw_xmit.c | 6 +++--- drivers/staging/r8188eu/hal/rtl8188eu_recv.c | 2 +- drivers/staging/r8188eu/os_dep/xmit_linux.c | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-)
drivers/staging/r8188eu/core/rtw_recv.c +1 -1
@@ -62,7 +62,7 @@ int _rtw_init_recv_priv(struct recv_priv *precvpriv, struct adapter *padapter) goto exit; } - precvpriv->precv_frame_buf = (u8 *)N_BYTE_ALIGMENT ((size_t )(precvpriv->pallocated_frame_buf),RXFRAME_ALIGN_SZ ); + precvpriv->precv_frame_buf = (u8 *)ALIGN ((size_t )(precvpriv->pallocated_frame_buf),RXFRAME_ALIGN_SZ ); precvframe = (struct recv_frame *)precvpriv->precv_frame_buf;
drivers/staging/r8188eu/core/rtw_xmit.c +3 -3
@@ -74,7 +74,7 @@ s32 _rtw_init_xmit_priv(struct xmit_priv *pxmitpriv, struct adapter *padapter) res = _FAIL; goto exit; } - pxmitpriv->pxmit_frame_buf = (u8 *)N_BYTE_ALIGMENT ((size_t )(pxmitpriv->pallocated_frame_buf),4 ); + pxmitpriv->pxmit_frame_buf = (u8 *)ALIGN ((size_t )(pxmitpriv->pallocated_frame_buf),4 );/* pxmitpriv->pxmit_frame_buf = pxmitpriv->pallocated_frame_buf + 4 - */ /* ((size_t) (pxmitpriv->pallocated_frame_buf) &3); */
@@ -111,7 +111,7 @@ s32 _rtw_init_xmit_priv(struct xmit_priv *pxmitpriv, struct adapter *padapter) goto exit; } - pxmitpriv->pxmitbuf = (u8 *)N_BYTE_ALIGMENT ((size_t )(pxmitpriv->pallocated_xmitbuf),4 ); + pxmitpriv->pxmitbuf = (u8 *)ALIGN ((size_t )(pxmitpriv->pallocated_xmitbuf),4 );/* pxmitpriv->pxmitbuf = pxmitpriv->pallocated_xmitbuf + 4 - */ /* ((size_t) (pxmitpriv->pallocated_xmitbuf) &3); */
@@ -151,7 +151,7 @@ s32 _rtw_init_xmit_priv(struct xmit_priv *pxmitpriv, struct adapter *padapter) goto exit; } - pxmitpriv->pxmit_extbuf = (u8 *)N_BYTE_ALIGMENT ((size_t )(pxmitpriv->pallocated_xmit_extbuf),4 ); + pxmitpriv->pxmit_extbuf = (u8 *)ALIGN ((size_t )(pxmitpriv->pallocated_xmit_extbuf),4 ); pxmitbuf = (struct xmit_buf *)pxmitpriv->pxmit_extbuf;
drivers/staging/r8188eu/hal/rtl8188eu_recv.c +1 -1
@@ -32,7 +32,7 @@ int rtl8188eu_init_recv_priv(struct adapter *padapter) goto exit; } - precvpriv->precv_buf = (u8 *)N_BYTE_ALIGMENT ((size_t )(precvpriv->pallocated_recv_buf),4 ); + precvpriv->precv_buf = (u8 *)ALIGN ((size_t )(precvpriv->pallocated_recv_buf),4 ); precvbuf = (struct recv_buf *)precvpriv->precv_buf;
drivers/staging/r8188eu/os_dep/xmit_linux.c +1 -1
@@ -71,7 +71,7 @@ int rtw_os_xmit_resource_alloc(struct adapter *padapter, struct xmit_buf *pxmitbif (!pxmitbuf->pallocated_buf)return _FAIL; - pxmitbuf->pbuf = (u8 *)N_BYTE_ALIGMENT ((size_t )(pxmitbuf->pallocated_buf),XMITBUF_ALIGN_SZ ); + pxmitbuf->pbuf = (u8 *)ALIGN ((size_t )(pxmitbuf->pallocated_buf),XMITBUF_ALIGN_SZ ); pxmitbuf->dma_transfer_addr =0 ; pxmitbuf->pxmit_urb =usb_alloc_urb (0 ,GFP_KERNEL );
Signature · 1 line
2.25.1
PATCH 2/2 staging: r8188eu: remove basic_types.h
In reply to Nam CaoRemove file basic_types.h because the content of this file is not used anywhere.
--- drivers/staging/r8188eu/include/basic_types.h | 19 ------------------- .../staging/r8188eu/include/osdep_service.h | 1 - 2 files changed, 20 deletions(-) delete mode 100644 drivers/staging/r8188eu/include/basic_types.h
drivers/staging/r8188eu/include/basic_types.h deleted +0 -19
@@ -1,19 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */ -/* Copyright(c) 2007 - 2011 Realtek Corporation. */ - -#ifndef __BASIC_TYPES_H__ -#define __BASIC_TYPES_H__ - -#include <linux/types.h> -#define NDIS_OID uint - -typedef void (*proc_t )(void *); - -/* port from fw */ -/* TODO: Macros Below are Sync from SD7-Driver. It is necessary -* to check correctness */ - -#define N_BYTE_ALIGMENT (__value, __aligment) ((__aligment == 1) ? \ - (__value) : (((__value + __aligment - 1) / __aligment) * __aligment)) - -#endif /* __BASIC_TYPES_H__ */
drivers/staging/r8188eu/include/osdep_service.h +0 -1
@@ -5,7 +5,6 @@#define __OSDEP_SERVICE_H_#include <linux/sched/signal.h> -#include "basic_types.h" #define _FAIL 0#define _SUCCESS 1
Signature · 1 line
2.25.1
Quoted 7 lines · Nam Cao
The stuffs in
basic_types.hare either not used, or already defined in the kernel. Get rid of it.Nam Cao (2):
staging: r8188eu: replaceN_BYTE_ALIGMENTwith ALIGN
staging: r8188eu: removebasic_types.h
Quoted 9 lines
drivers/staging/r8188eu/core/rtw_recv.c | 2 +- drivers/staging/r8188eu/core/rtw_xmit.c | 6 +++--- drivers/staging/r8188eu/hal/rtl8188eu_recv.c | 2 +- drivers/staging/r8188eu/include/basic_types.h | 19 ------------------- .../staging/r8188eu/include/osdep_service.h | 1 - drivers/staging/r8188eu/os_dep/xmit_linux.c | 2 +- 6 files changed, 6 insertions(+), 26 deletions(-)delete mode 100644
drivers/staging/r8188eu/include/basic_types.h
For future patch sets, please include the "staging: r8188eu:" part of the subject of the cover letter. It makes it easier to sort out the rest of the patches; however,it is not necessary to resubmit this one.
The two patchesw are fine.
Thanks,
Larry