From patchwork Fri Nov 6 02:19:55 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Glen Lee X-Patchwork-Id: 7565991 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id A27FDC05C6 for ; Fri, 6 Nov 2015 02:17:53 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C2EF2207F9 for ; Fri, 6 Nov 2015 02:17:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B1631207F1 for ; Fri, 6 Nov 2015 02:17:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1031591AbbKFCRr (ORCPT ); Thu, 5 Nov 2015 21:17:47 -0500 Received: from eusmtp01.atmel.com ([212.144.249.242]:37669 "EHLO eusmtp01.atmel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1031554AbbKFCRk (ORCPT ); Thu, 5 Nov 2015 21:17:40 -0500 Received: from glen-ubuntu.corp.atmel.com (10.161.101.13) by eusmtp01.atmel.com (10.161.101.30) with Microsoft SMTP Server id 14.3.235.1; Fri, 6 Nov 2015 03:17:32 +0100 From: Glen Lee To: CC: , , , , , , , , Subject: [PATCH 56/73] staging: wilc1000: replace numeric type to kernel error type Date: Fri, 6 Nov 2015 11:19:55 +0900 Message-ID: <1446776412-30670-7-git-send-email-glen.lee@atmel.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1446776412-30670-1-git-send-email-glen.lee@atmel.com> References: <1446776412-30670-1-git-send-email-glen.lee@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 replaces numeric type to generic type by kernel style. -5 -> -EIO -105 -> -ENOBUFS Signed-off-by: Leo Kim Signed-off-by: Glen Lee --- drivers/staging/wilc1000/wilc_wlan.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_wlan.c b/drivers/staging/wilc1000/wilc_wlan.c index ffe7baa..283c506 100644 --- a/drivers/staging/wilc1000/wilc_wlan.c +++ b/drivers/staging/wilc1000/wilc_wlan.c @@ -1194,7 +1194,7 @@ int wilc_wlan_firmware_download(const u8 *buffer, u32 buffer_size) dma_buffer = kmalloc(blksz, GFP_KERNEL); if (!dma_buffer) { - ret = -5; + ret = -EIO; PRINT_ER("Can't allocate buffer for firmware download IO error\n "); goto _fail_1; } @@ -1229,7 +1229,7 @@ int wilc_wlan_firmware_download(const u8 *buffer, u32 buffer_size) release_bus(RELEASE_ONLY); if (!ret) { - ret = -5; + ret = -EIO; PRINT_ER("Can't download firmware IO error\n "); goto _fail_; } @@ -1263,7 +1263,7 @@ int wilc_wlan_start(void) if (!ret) { wilc_debug(N_ERR, "[wilc start]: fail write reg vmm_core_cfg...\n"); release_bus(RELEASE_ONLY); - ret = -5; + ret = -EIO; return ret; } reg = 0; @@ -1298,7 +1298,7 @@ int wilc_wlan_start(void) if (!ret) { wilc_debug(N_ERR, "[wilc start]: fail write WILC_GP_REG_1 ...\n"); release_bus(RELEASE_ONLY); - ret = -5; + ret = -EIO; return ret; } @@ -1308,7 +1308,7 @@ int wilc_wlan_start(void) if (!ret) { wilc_debug(N_ERR, "[wilc start]: fail read reg 0x1000 ...\n"); release_bus(RELEASE_ONLY); - ret = -5; + ret = -EIO; return ret; } @@ -1661,7 +1661,7 @@ int wilc_wlan_init(struct net_device *dev, wilc_wlan_inp_t *inp) if ((inp->io_func.io_type & 0x1) == HIF_SDIO) { if (!hif_sdio.hif_init(inp, wilc_debug)) { - ret = -5; + ret = -EIO; goto _fail_; } memcpy((void *)&g_wlan.hif_func, &hif_sdio, @@ -1669,19 +1669,19 @@ int wilc_wlan_init(struct net_device *dev, wilc_wlan_inp_t *inp) } else { if ((inp->io_func.io_type & 0x1) == HIF_SPI) { if (!hif_spi.hif_init(inp, wilc_debug)) { - ret = -5; + ret = -EIO; goto _fail_; } memcpy((void *)&g_wlan.hif_func, &hif_spi, sizeof(wilc_hif_func_t)); } else { - ret = -5; + ret = -EIO; goto _fail_; } } if (!wilc_wlan_cfg_init(wilc_debug)) { - ret = -105; + ret = -ENOBUFS; goto _fail_; } @@ -1690,7 +1690,7 @@ int wilc_wlan_init(struct net_device *dev, wilc_wlan_inp_t *inp) PRINT_D(TX_DBG, "g_wlan.tx_buffer = %p\n", g_wlan.tx_buffer); if (!g_wlan.tx_buffer) { - ret = -105; + ret = -ENOBUFS; PRINT_ER("Can't allocate Tx Buffer"); goto _fail_; } @@ -1700,14 +1700,14 @@ int wilc_wlan_init(struct net_device *dev, wilc_wlan_inp_t *inp) g_wlan.rx_buffer = kmalloc(LINUX_RX_SIZE, GFP_KERNEL); PRINT_D(TX_DBG, "g_wlan.rx_buffer =%p\n", g_wlan.rx_buffer); if (!g_wlan.rx_buffer) { - ret = -105; + ret = -ENOBUFS; PRINT_ER("Can't allocate Rx Buffer"); goto _fail_; } #endif if (!init_chip(dev)) { - ret = -5; + ret = -EIO; goto _fail_; } #ifdef TCP_ACK_FILTER