From: Arnd Bergmann <arnd@arndb.de>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: Rachel Kim <rachel.kim@atmel.com>, Dean Lee <dean.lee@atmel.com>,
Chris Park <chris.park@atmel.com>,
devel@driverdev.osuosl.org, nicolas.ferre@atmel.com,
Johnny Kim <johnny.kim@atmel.com>,
linux-kernel@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>
Subject: [PATCH 16/16] staging: wilc1000: fix compiler warnings
Date: Fri, 29 May 2015 22:52:27 +0200 [thread overview]
Message-ID: <1432932747-3739705-17-git-send-email-arnd@arndb.de> (raw)
In-Reply-To: <1432932747-3739705-1-git-send-email-arnd@arndb.de>
This avoids the remaining warnings that one gets on a normal
build: unused variables, unused labels, and invalid printk
format strings.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/staging/wilc1000/linux_wlan.c | 8 ++++++--
drivers/staging/wilc1000/linux_wlan_spi.c | 3 ---
drivers/staging/wilc1000/wilc_spi.c | 4 ++--
drivers/staging/wilc1000/wilc_wlan.c | 6 ++----
4 files changed, 10 insertions(+), 11 deletions(-)
diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c
index 2a74441af09e..46c7e4f3471d 100644
--- a/drivers/staging/wilc1000/linux_wlan.c
+++ b/drivers/staging/wilc1000/linux_wlan.c
@@ -1025,7 +1025,6 @@ int repeat_power_cycle(perInterface_wlan_t *nic);
static int linux_wlan_start_firmware(perInterface_wlan_t *nic)
{
- static int timeout = 5;
int ret = 0;
/* start firmware */
PRINT_D(INIT_DBG, "Starting Firmware ...\n");
@@ -1040,6 +1039,7 @@ static int linux_wlan_start_firmware(perInterface_wlan_t *nic)
ret = linux_wlan_lock_timeout(&g_linux_wlan->sync_event, 5000);
if (ret) {
#ifdef COMPLEMENT_BOOT
+ static int timeout = 5;
if (timeout--) {
PRINT_D(INIT_DBG, "repeat power cycle[%d]", timeout);
@@ -1675,7 +1675,9 @@ _fail_2:
linux_wlan_unlock(&g_linux_wlan->rxq_event);
kthread_stop(g_linux_wlan->rxq_thread);
+#ifndef TCP_ENHANCEMENTS
_fail_1:
+#endif
#if (RX_BH_TYPE == RX_BH_KTHREAD)
/*De-Initialize 1st thread*/
g_linux_wlan->close = 1;
@@ -1999,8 +2001,8 @@ _fail_fw_start_:
_fail_irq_enable_:
#if (defined WILC_SDIO) && (!defined WILC_SDIO_IRQ_GPIO)
disable_sdio_interrupt();
-#endif
_fail_irq_init_:
+#endif
#if (!defined WILC_SDIO) || (defined WILC_SDIO_IRQ_GPIO)
deinit_irq(g_linux_wlan);
@@ -2522,8 +2524,10 @@ void frmw_to_linux(uint8_t *buff, uint32_t size, uint32_t pkt_offset)
int stats;
unsigned char *buff_to_send = NULL;
struct sk_buff *skb;
+#ifndef TCP_ENHANCEMENTS
char *pu8UdpBuffer;
struct iphdr *ih;
+#endif
struct net_device *wilc_netdev;
perInterface_wlan_t *nic;
diff --git a/drivers/staging/wilc1000/linux_wlan_spi.c b/drivers/staging/wilc1000/linux_wlan_spi.c
index 0c30bbb5fa65..e5d794590f00 100644
--- a/drivers/staging/wilc1000/linux_wlan_spi.c
+++ b/drivers/staging/wilc1000/linux_wlan_spi.c
@@ -102,9 +102,6 @@ int linux_spi_init(void *vp)
if (called == 0) {
called++;
- if (&wilc_bus == NULL) {
- PRINT_ER("wilc_bus address is NULL\n");
- }
ret = spi_register_driver(&wilc_bus);
}
diff --git a/drivers/staging/wilc1000/wilc_spi.c b/drivers/staging/wilc1000/wilc_spi.c
index 2f38ddabc654..d0e761080ca5 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]: Failed internal read protocol with CRC on, retyring with CRC off...\n");
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__);
+ PRINT_ER("[wilc spi]: Failed internal read protocol...\n");
return 0;
}
}
diff --git a/drivers/staging/wilc1000/wilc_wlan.c b/drivers/staging/wilc1000/wilc_wlan.c
index 92ed42ad49ac..badc8743dd1a 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 = %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 =%p\n", g_wlan.rx_buffer);
if (g_wlan.rx_buffer == WILC_NULL) {
/* ENOBUFS 105 */
ret = -105;
--
2.1.0.rc2
prev parent reply other threads:[~2015-05-29 20:55 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-29 20:52 [PATCH 00/16] wilc1000: dead code removal and other cleanup Arnd Bergmann
2015-05-29 20:52 ` [PATCH 01/16] staging: wilc1000: remove linux version checks Arnd Bergmann
2015-05-29 20:52 ` [PATCH 02/16] staging: wilc1000: remove platform " Arnd Bergmann
2015-05-29 20:52 ` [PATCH 03/16] staging: wilc1000: remove thread wrapper Arnd Bergmann
2015-05-29 20:52 ` [PATCH 04/16] staging: wilc1000: remove __DRIVER_VERSION__ macro Arnd Bergmann
2015-05-29 20:52 ` [PATCH 05/16] staging: wilc1000: remove time wrapper Arnd Bergmann
2015-05-30 6:39 ` Sudip Mukherjee
2015-05-30 23:58 ` Greg KH
2015-06-01 19:09 ` Arnd Bergmann
2015-05-29 20:52 ` [PATCH 06/16] staging: wilc1000: remove unused string functions Arnd Bergmann
2015-05-29 20:52 ` [PATCH 07/16] staging: wilc1000: simplify msgqueue code Arnd Bergmann
2015-05-29 20:52 ` [PATCH 08/16] staging: wilc1000: remove unused memory handling code Arnd Bergmann
2015-05-29 20:52 ` [PATCH 09/16] staging: wilc1000: simplify semaphore wrapper Arnd Bergmann
2015-05-29 20:52 ` [PATCH 10/16] staging: wilc1000: clean up sleep wrapper Arnd Bergmann
2015-05-29 20:52 ` [PATCH 11/16] staging: wilc1000: clean up timer feature Arnd Bergmann
2015-05-29 20:52 ` [PATCH 12/16] staging: wilc1000: remove unused OS abstraction features Arnd Bergmann
2015-05-29 20:52 ` [PATCH 13/16] staging: wilc1000: remove EXPORT_SYMTAB Arnd Bergmann
2015-05-29 20:52 ` [PATCH 14/16] staging: wilc1000: remove semaphore wrapper Arnd Bergmann
2015-05-30 6:46 ` Sudip Mukherjee
2015-05-29 20:52 ` [PATCH 15/16] staging: wilc1000: fix const cast warnings Arnd Bergmann
2015-05-29 20:52 ` Arnd Bergmann [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1432932747-3739705-17-git-send-email-arnd@arndb.de \
--to=arnd@arndb.de \
--cc=chris.park@atmel.com \
--cc=dean.lee@atmel.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=johnny.kim@atmel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=nicolas.ferre@atmel.com \
--cc=rachel.kim@atmel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®