staging: wilc1000: remove the macro WILC_ERRORCHECK
authorLeo Kim <leo.kim@atmel.com>
Wed, 16 Sep 2015 09:36:00 +0000 (18:36 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 17 Sep 2015 04:38:17 +0000 (21:38 -0700)
This patch removes the macro WILC_ERRORCHECK which is not used
anymore by replacing it with the plain statements.

This patch also removes the WILC_CATCH macros from some of functions not
to make the build warnings.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wilc1000/host_interface.c
drivers/staging/wilc1000/wilc_errorsupport.h
drivers/staging/wilc1000/wilc_msgqueue.c
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c

index 827758d71df041394ad9a80450cab117bacba56a..8ed1aaf3e71ac08eb423d351606dc0e310f27b9c 100644 (file)
@@ -7247,7 +7247,8 @@ s32 host_int_del_beacon(tstrWILC_WFIDrv *hWFIDrv)
        PRINT_D(HOSTINF_DBG, "Setting deleting beacon message queue params\n");
 
        s32Error = wilc_mq_send(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg));
-       WILC_ERRORCHECK(s32Error);
+       if (s32Error)
+               PRINT_ER("wilc_mq_send fail\n");
 
        WILC_CATCH(s32Error)
        {
index 42495d9e19d2dad454697438087534489de3e4cd..769cef0806a9c9b26f62ea6912841e9c1e8fda05 100644 (file)
 
 
 
-#define WILC_ERRORCHECK(__status__) do { \
-               if (__status__ < WILC_SUCCESS) { \
-                       PRINT_ER("PRINT_ER(%d)\n", __status__); \
-                       goto ERRORHANDLER; \
-               } \
-} while (0)
-
 #define WILC_ERRORREPORT(__status__, __err__) do { \
                PRINT_ER("PRINT_ER(%d)\n", __err__); \
                __status__ = __err__; \
index ac237365e3e9e789173f04db13494b3ae3dff714..53b6f07a60c2846af73135cfbcb0bfe3014864ad 100644 (file)
@@ -145,7 +145,10 @@ int wilc_mq_recv(WILC_MsgQueueHandle *pHandle,
                spin_unlock_irqrestore(&pHandle->strCriticalSection, flags);
        } else {
                /* other non-timeout scenarios */
-               WILC_ERRORCHECK(s32RetStatus);
+               if (s32RetStatus) {
+                       PRINT_ER("Non-timeout\n");
+                       return s32RetStatus;
+               }
 
                if (pHandle->bExiting) {
                        WILC_ERRORREPORT(s32RetStatus, WILC_FAIL);
index 32fd54312659e2b978828f235b01a9f7e7a5bd81..72fc1051af84723ccc99413e0cf3603a147e43c4 100644 (file)
@@ -3233,11 +3233,9 @@ static int stop_ap(struct wiphy *wiphy, struct net_device *dev)
 
        s32Error = host_int_del_beacon(priv->hWILCWFIDrv);
 
-       WILC_ERRORCHECK(s32Error);
+       if (s32Error)
+               PRINT_ER("Host delete beacon fail\n");
 
-       WILC_CATCH(s32Error)
-       {
-       }
        return s32Error;
 }
 
@@ -3303,12 +3301,10 @@ static int add_station(struct wiphy *wiphy, struct net_device *dev,
                PRINT_D(HOSTAPD_DBG, "Flag Set = %d\n", strStaParams.u16FlagsSet);
 
                s32Error = host_int_add_station(priv->hWILCWFIDrv, &strStaParams);
-               WILC_ERRORCHECK(s32Error);
+               if (s32Error)
+                       PRINT_ER("Host add station fail\n");
        }
 
-       WILC_CATCH(s32Error)
-       {
-       }
        return s32Error;
 }
 
@@ -3348,10 +3344,8 @@ static int del_station(struct wiphy *wiphy, struct net_device *dev,
 
                s32Error = host_int_del_station(priv->hWILCWFIDrv, mac);
 
-               WILC_ERRORCHECK(s32Error);
-       }
-       WILC_CATCH(s32Error)
-       {
+               if (s32Error)
+                       PRINT_ER("Host delete station fail\n");
        }
        return s32Error;
 }
@@ -3419,10 +3413,8 @@ static int change_station(struct wiphy *wiphy, struct net_device *dev,
                PRINT_D(HOSTAPD_DBG, "Flag Set = %d\n", strStaParams.u16FlagsSet);
 
                s32Error = host_int_edit_station(priv->hWILCWFIDrv, &strStaParams);
-               WILC_ERRORCHECK(s32Error);
-       }
-       WILC_CATCH(s32Error)
-       {
+               if (s32Error)
+                       PRINT_ER("Host edit station fail\n");
        }
        return s32Error;
 }