]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
staging: rtl8188eu: cleanup ODM_CmnInfoPtrArrayHook()
authorMichael Straube <straube.linux@gmail.com>
Thu, 31 Jan 2019 08:55:30 +0000 (09:55 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 4 Feb 2019 11:36:14 +0000 (12:36 +0100)
Convert single case switch to if statement to cleanup and
simplify code in ODM_CmnInfoPtrArrayHook().

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8188eu/hal/odm.c

index 1165ee278536a6cecd9b20dd20d8951d2f194d00..ba3c3e5a8216839b360efcf807e35c766693f7d1 100644 (file)
@@ -209,17 +209,8 @@ void ODM_DMWatchdog(struct odm_dm_struct *pDM_Odm)
 
 void ODM_CmnInfoPtrArrayHook(struct odm_dm_struct *pDM_Odm, enum odm_common_info_def CmnInfo, u16 Index, void *pValue)
 {
-       /*  Hook call by reference pointer. */
-       switch  (CmnInfo) {
-       /*  Dynamic call by reference pointer. */
-       case    ODM_CMNINFO_STA_STATUS:
+       if (CmnInfo == ODM_CMNINFO_STA_STATUS)
                pDM_Odm->pODM_StaInfo[Index] = (struct sta_info *)pValue;
-               break;
-       /* To remove the compiler warning, must add an empty default statement to handle the other values. */
-       default:
-               /* do nothing */
-               break;
-       }
 }
 
 void odm_CommonInfoSelfInit(struct odm_dm_struct *pDM_Odm)