Commit 85dbc7e3 authored by Michael Straube's avatar Michael Straube Committed by Greg Kroah-Hartman
Browse files

staging: r8188eu: remove ODM_CompareMemory()



ODM_CompareMemory() is just a wrapper around memcmp().
Remove ODM_CompareMemory() and call memcmp() directly.

Signed-off-by: default avatarMichael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20211229205108.26373-12-straube.linux@gmail.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent fec9f472
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -171,13 +171,13 @@ odm_TXPowerTrackingCallback_ThermalMeter_8188E(

		for (i = 0; i < CCK_TABLE_SIZE; i++) {
			if (dm_odm->RFCalibrateInfo.bCCKinCH14) {
				if (ODM_CompareMemory(dm_odm, (void *)&TempCCk, (void *)&CCKSwingTable_Ch14[i][2], 4) == 0) {
				if (memcmp((void *)&TempCCk, (void *)&CCKSwingTable_Ch14[i][2], 4)) {
					CCK_index_old = (u8)i;
					dm_odm->BbSwingIdxCckBase = (u8)i;
					break;
				}
			} else {
				if (ODM_CompareMemory(dm_odm, (void *)&TempCCk, (void *)&CCKSwingTable_Ch1_Ch13[i][2], 4) == 0) {
				if (memcmp((void *)&TempCCk, (void *)&CCKSwingTable_Ch1_Ch13[i][2], 4)) {
					CCK_index_old = (u8)i;
					dm_odm->BbSwingIdxCckBase = (u8)i;
					break;
+0 −5
Original line number Diff line number Diff line
@@ -4,8 +4,3 @@
#include "../include/odm_precomp.h"
/*  ODM IO Relative API. */
/*  ODM Memory relative API. */
s32 ODM_CompareMemory(struct odm_dm_struct *pDM_Odm, void *pBuf1, void *pBuf2, u32 length)
{
	return !memcmp(pBuf1, pBuf2, length);
}
+0 −4
Original line number Diff line number Diff line
@@ -12,8 +12,4 @@ typedef void (*RT_WORKITEM_CALL_BACK)(void *pContext);

/*  =========== EXtern Function Prototype */

/*  Memory Relative Function. */
s32 ODM_CompareMemory(struct odm_dm_struct *pDM_Odm, void *pBuf1, void *pBuf2,
		      u32 length);

#endif	/*  __ODM_INTERFACE_H__ */