Search Linux Wireless

Re: [PATCH][TRIVIAL] if_spi: Fix compilation warning - unused variable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2011-06-14 at 11:23 +0530, Nikanth Karthikesan wrote:
> if_spi: Fix compilation warning - unused variable 'spi'
> 
> drivers/net/wireless/libertas/if_spi.c: In function âif_spi_init_cardâ:
> drivers/net/wireless/libertas/if_spi.c:1035: warning: unused variable âspiâ
> 
> The variable is used only in a macro which uses the args only for DEBUG builds.
> Remove the 'spi' variable completely.
> 
> Signed-off-by: Nikanth Karthikesan <nikanth@xxxxxxxxxx>

Acked-by: Dan Williams <dcbw@xxxxxxxxxx>

> 
> ---
> 
> Index: linux-2.6/drivers/net/wireless/libertas/if_spi.c
> ===================================================================
> --- linux-2.6.orig/drivers/net/wireless/libertas/if_spi.c	2011-06-10 14:16:17.990985032 +0530
> +++ linux-2.6/drivers/net/wireless/libertas/if_spi.c	2011-06-14 09:33:16.151025614 +0530
> @@ -1032,7 +1032,6 @@
>  static int if_spi_init_card(struct if_spi_card *card)
>  {
>  	struct lbs_private *priv = card->priv;
> -	struct spi_device *spi = card->spi;
>  	int err, i;
>  	u32 scratch;
>  	const struct firmware *helper = NULL;
> @@ -1080,8 +1079,9 @@
>  				"attached to SPI bus_num %d, chip_select %d. "
>  				"spi->max_speed_hz=%d\n",
>  				card->card_id, card->card_rev,
> -				spi->master->bus_num, spi->chip_select,
> -				spi->max_speed_hz);
> +				card->spi->master->bus_num,
> +				card->spi->chip_select,
> +				card->spi->max_speed_hz);
>  		err = if_spi_prog_helper_firmware(card, helper);
>  		if (err)
>  			goto out;
> 
> 
> 
> _______________________________________________
> libertas-dev mailing list
> libertas-dev@xxxxxxxxxxxxxxxxxxx
> http://lists.infradead.org/mailman/listinfo/libertas-dev


--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux