From patchwork Tue Sep 15 02:53:37 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Cho X-Patchwork-Id: 7179721 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 9D29F9F314 for ; Tue, 15 Sep 2015 02:54:08 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A9F122060C for ; Tue, 15 Sep 2015 02:54:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A4C032060A for ; Tue, 15 Sep 2015 02:54:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752709AbbIOCyE (ORCPT ); Mon, 14 Sep 2015 22:54:04 -0400 Received: from eusmtp01.atmel.com ([212.144.249.242]:56647 "EHLO eusmtp01.atmel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751625AbbIOCyC (ORCPT ); Mon, 14 Sep 2015 22:54:02 -0400 Received: from tony-itx.corp.atmel.com (10.161.101.13) by eusmtp01.atmel.com (10.161.101.30) with Microsoft SMTP Server id 14.3.235.1; Tue, 15 Sep 2015 04:53:59 +0200 From: Tony Cho To: CC: , , , , , , , , , , , Subject: [PATCH 3/7] staging: wilc1000: remove definition WILC_ERRORCHECK Date: Tue, 15 Sep 2015 11:53:37 +0900 Message-ID: <1442285621-29457-4-git-send-email-tony.cho@atmel.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1442285621-29457-1-git-send-email-tony.cho@atmel.com> References: <1442285621-29457-1-git-send-email-tony.cho@atmel.com> MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Leo Kim This patch removes the definition WILC_ERRORCHECK which is not used anymore and replaces PRINT_ER with printk. There are build warnings from some functions because WILC_CATCH definition is not used. So, this patch also removes WILC_CATCH from the functions. Signed-off-by: Leo Kim Signed-off-by: Tony Cho --- drivers/staging/wilc1000/host_interface.c | 3 ++- drivers/staging/wilc1000/wilc_errorsupport.h | 7 ------- drivers/staging/wilc1000/wilc_msgqueue.c | 5 ++++- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 24 ++++++++--------------- 4 files changed, 14 insertions(+), 25 deletions(-) diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index 29491f6..273d547 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -7250,7 +7250,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) + printk(KERN_ERR "%s: %d\n", __func__, s32Error); WILC_CATCH(s32Error) { diff --git a/drivers/staging/wilc1000/wilc_errorsupport.h b/drivers/staging/wilc1000/wilc_errorsupport.h index 42495d9..769cef0 100644 --- a/drivers/staging/wilc1000/wilc_errorsupport.h +++ b/drivers/staging/wilc1000/wilc_errorsupport.h @@ -38,13 +38,6 @@ -#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__; \ diff --git a/drivers/staging/wilc1000/wilc_msgqueue.c b/drivers/staging/wilc1000/wilc_msgqueue.c index f3d0d34..2f77e71 100644 --- a/drivers/staging/wilc1000/wilc_msgqueue.c +++ b/drivers/staging/wilc1000/wilc_msgqueue.c @@ -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) { + printk(KERN_ERR "%s: %d\n", __func__, s32RetStatus); + return s32RetStatus; + } if (pHandle->bExiting) { WILC_ERRORREPORT(s32RetStatus, WILC_FAIL); diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c index a182bdb..7083c77 100644 --- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c @@ -3308,11 +3308,9 @@ static int stop_ap(struct wiphy *wiphy, struct net_device *dev) s32Error = host_int_del_beacon(priv->hWILCWFIDrv); - WILC_ERRORCHECK(s32Error); + if (s32Error) + printk(KERN_ERR "%s: %d\n", __func__, s32Error); - WILC_CATCH(s32Error) - { - } return s32Error; } @@ -3378,12 +3376,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) + printk(KERN_ERR "%s: %d\n", __func__, s32Error); } - WILC_CATCH(s32Error) - { - } return s32Error; } @@ -3423,10 +3419,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) + printk(KERN_ERR "%s: %d\n", __func__, s32Error); } return s32Error; } @@ -3494,10 +3488,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) + printk(KERN_ERR "%s: %d\n", __func__, s32Error); } return s32Error; }