Skip to content

Commit

Permalink
staging: wilc1000: fix compiler warnings
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
arndb authored and gregkh committed Jun 2, 2015
1 parent 057d1e9 commit 7a8fd84
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 11 deletions.
8 changes: 6 additions & 2 deletions drivers/staging/wilc1000/linux_wlan.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand All @@ -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);
Expand Down Expand Up @@ -1675,7 +1675,9 @@ int wlan_initialize_threads(perInterface_wlan_t *nic)
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;
Expand Down Expand Up @@ -1999,8 +2001,8 @@ int wilc1000_wlan_init(struct net_device *dev, perInterface_wlan_t *p_nic)
_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);

Expand Down Expand Up @@ -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;

Expand Down
3 changes: 0 additions & 3 deletions drivers/staging/wilc1000/linux_wlan_spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
4 changes: 2 additions & 2 deletions drivers/staging/wilc1000/wilc_spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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, &reg)) {
/* 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;
}
}
Expand Down
6 changes: 2 additions & 4 deletions drivers/staging/wilc1000/wilc_wlan.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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 */
Expand All @@ -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;
Expand Down

0 comments on commit 7a8fd84

Please sign in to comment.