From patchwork Sat May 30 20:44:18 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanislav Kholmanskikh X-Patchwork-Id: 6514451 X-Patchwork-Delegate: kvalo@adurom.com 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 32C13C0020 for ; Sat, 30 May 2015 20:45:00 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DF618204AD for ; Sat, 30 May 2015 20:44:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C39FF20421 for ; Sat, 30 May 2015 20:44:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752159AbbE3Uoq (ORCPT ); Sat, 30 May 2015 16:44:46 -0400 Received: from mail-lb0-f171.google.com ([209.85.217.171]:35336 "EHLO mail-lb0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750856AbbE3Uoo (ORCPT ); Sat, 30 May 2015 16:44:44 -0400 Received: by lbbuc2 with SMTP id uc2so66030910lbb.2; Sat, 30 May 2015 13:44:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=jqpo+PSsR/hBpTCZLPQXxtUbU/TstZrUF/fsisKQKOs=; b=SHZu7Mrlb2kiBxxIoPMSUhQN1fLByn8lmwCwRFrtmtLYkgJ3wmL9xjUnQuZhfeW4uf rUIBZ1Edk/EA5D59AGw0t7bUj6oWdqEBVHI8uEUKF8Cfns9u6wtxbBK3fApd8FTMgTYx qwZ9HR3n0fgVAA267HfhGJYkxHhWrj0iYCrPXePnHBhTce4oq3SYuUU1PoCqesVm0cVM nRnetJ6kapuEzI4kEbaaNiUlzHCTDDrbIevhLs4p4h14VOQ9nUMyhMV8dVNf6vdyb6x2 Y8yVB0S5nsASYqoVGJRW10GNhfW6TD9pb+v62qyA4mFYO/nObgLJ8oedaSQ5VjyTw8gD kqCA== X-Received: by 10.152.6.196 with SMTP id d4mr3230576laa.40.1433018682548; Sat, 30 May 2015 13:44:42 -0700 (PDT) Received: from localhost.localdomain ([93.92.200.170]) by mx.google.com with ESMTPSA id a7sm1072722lbc.36.2015.05.30.13.44.41 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 30 May 2015 13:44:41 -0700 (PDT) From: Stanislav Kholmanskikh To: johnny.kim@atmel.com, rachel.kim@atmel.com, dean.lee@atmel.com, chris.park@atmel.com Cc: gregkh@linuxfoundation.org, devel@driverdev.osuosl.org, linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, Stanislav Kholmanskikh Subject: [PATCH 1/2] staging: wilc1000: Fix some compile warnings Date: Sat, 30 May 2015 23:44:18 +0300 Message-Id: <1433018659-25958-1-git-send-email-kholmanskikh.s.s@gmail.com> X-Mailer: git-send-email 1.9.1 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.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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 This patch reduces (a little bit) the amount of compile time warnings. The change of WILC_WFI_init_mon_interface() prototype seems to be ok, because alloc_netdev() also expects 'const char *name'. Signed-off-by: Stanislav Kholmanskikh --- drivers/staging/wilc1000/linux_mon.c | 2 +- drivers/staging/wilc1000/wilc_spi.c | 6 +++--- drivers/staging/wilc1000/wilc_wfi_cfgoperations.h | 2 +- drivers/staging/wilc1000/wilc_wlan.c | 6 ++---- 4 files changed, 7 insertions(+), 9 deletions(-) diff --git a/drivers/staging/wilc1000/linux_mon.c b/drivers/staging/wilc1000/linux_mon.c index a19be45..f0a20a9 100644 --- a/drivers/staging/wilc1000/linux_mon.c +++ b/drivers/staging/wilc1000/linux_mon.c @@ -522,7 +522,7 @@ static void WILC_WFI_mon_setup(struct net_device *dev) * @date 12 JUL 2012 * @version 1.0 */ -struct net_device *WILC_WFI_init_mon_interface(char *name, struct net_device *real_dev) +struct net_device *WILC_WFI_init_mon_interface(const char *name, struct net_device *real_dev) { diff --git a/drivers/staging/wilc1000/wilc_spi.c b/drivers/staging/wilc1000/wilc_spi.c index 2f38dda..46f28ca 100644 --- a/drivers/staging/wilc1000/wilc_spi.c +++ b/drivers/staging/wilc1000/wilc_spi.c @@ -1194,10 +1194,10 @@ static int spi_init(wilc_wlan_inp_t *inp, wilc_debug_func func) /* Read failed. Try with CRC off. This might happen when module * is removed but chip isn't reset*/ g_spi.crc_off = 1; - PRINT_ER("[wilc spi]: Failed internal read protocol with CRC on, retyring with CRC off...\n", __LINE__); + PRINT_ER("[wilc spi %d]: Failed internal read protocol with CRC on, retyring with CRC off...\n", __LINE__); if (!spi_internal_read(WILC_SPI_PROTOCOL_OFFSET, ®)) { - /* Reaad failed with both CRC on and off, something went bad */ - PRINT_ER("[wilc spi]: Failed internal read protocol...\n", __LINE__); + /* Read failed with both CRC on and off, something went bad */ + PRINT_ER("[wilc spi %d]: Failed internal read protocol...\n", __LINE__); return 0; } } diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.h b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.h index 9eb8f37..b63c746 100644 --- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.h +++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.h @@ -123,7 +123,7 @@ int WILC_WFI_DeInitHostInt(struct net_device *net); int WILC_WFI_InitHostInt(struct net_device *net); void WILC_WFI_monitor_rx(uint8_t *buff, uint32_t size); int WILC_WFI_deinit_mon_interface(void); -struct net_device *WILC_WFI_init_mon_interface(char *name, struct net_device *real_dev); +struct net_device *WILC_WFI_init_mon_interface(const char *name, struct net_device *real_dev); #ifdef TCP_ENHANCEMENTS #define TCP_ACK_FILTER_LINK_SPEED_THRESH 54 diff --git a/drivers/staging/wilc1000/wilc_wlan.c b/drivers/staging/wilc1000/wilc_wlan.c index 92ed42a..bdee5e6 100644 --- a/drivers/staging/wilc1000/wilc_wlan.c +++ b/drivers/staging/wilc1000/wilc_wlan.c @@ -894,8 +894,6 @@ INLINE void chip_wakeup(void) #endif void chip_sleep_manually(WILC_Uint32 u32SleepTime) { - uint32_t val32; - if (genuChipPSstate != CHIP_WAKEDUP) { /* chip is already sleeping. Do nothing */ return; @@ -2302,7 +2300,7 @@ int wilc_wlan_init(wilc_wlan_inp_t *inp, wilc_wlan_oup_t *oup) #else g_wlan.tx_buffer = (uint8_t *)g_wlan.os_func.os_malloc(g_wlan.tx_buffer_size); #endif - PRINT_D(TX_DBG, "g_wlan.tx_buffer = 0x%x\n", g_wlan.tx_buffer); + PRINT_D(TX_DBG, "g_wlan.tx_buffer = 0x%p\n", g_wlan.tx_buffer); if (g_wlan.tx_buffer == WILC_NULL) { /* ENOBUFS 105 */ @@ -2319,7 +2317,7 @@ int wilc_wlan_init(wilc_wlan_inp_t *inp, wilc_wlan_oup_t *oup) #else g_wlan.rx_buffer = (uint8_t *)g_wlan.os_func.os_malloc(g_wlan.rx_buffer_size); #endif - PRINT_D(TX_DBG, "g_wlan.rx_buffer =0x%x\n", g_wlan.rx_buffer); + PRINT_D(TX_DBG, "g_wlan.rx_buffer =0x%p\n", g_wlan.rx_buffer); if (g_wlan.rx_buffer == WILC_NULL) { /* ENOBUFS 105 */ ret = -105;