All of lore.kernel.org
 help / color / mirror / Atom feed
* re: wlcore/wl12xx: change GEM Tx-spare blocks per-vif
@ 2012-04-16 10:55 Dan Carpenter
  2012-04-16 19:03 ` Arik Nemtsov
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2012-04-16 10:55 UTC (permalink / raw)
  To: arik; +Cc: linux-wireless

Hello Arik Nemtsov,

This is a semi-automatic email about new static checker warnings.

The patch 3edab305dfd4: "wlcore/wl12xx: change GEM Tx-spare blocks 
per-vif" from Dec 7, 2011, leads to the following Smatch complaint:

drivers/net/wireless/ti/wlcore/tx.c:231 wl1271_tx_allocate()
	 warn: variable dereferenced before check 'wlvif' (see line 208)

drivers/net/wireless/ti/wlcore/tx.c
   207		else if (wlvif->is_gem)
                         ^^^^^^^^^^^^^
New dereference.

   208			spare_blocks = wl->gem_tx_spare;
   209	
   210		total_blocks = wlcore_hw_calc_tx_blocks(wl, total_len, spare_blocks);
   211	
   212		if (total_blocks <= wl->tx_blocks_available) {
   213			desc = (struct wl1271_tx_hw_descr *)skb_push(
   214				skb, total_len - skb->len);
   215	
   216			wlcore_hw_set_tx_desc_blocks(wl, desc, total_blocks,
   217						     spare_blocks);
   218	
   219			desc->id = id;
   220	
   221			wl->tx_blocks_available -= total_blocks;
   222			wl->tx_allocated_blocks += total_blocks;
   223	
   224			/* If the FW was empty before, arm the Tx watchdog */
   225			if (wl->tx_allocated_blocks == total_blocks)
   226				wl12xx_rearm_tx_watchdog_locked(wl);
   227	
   228			ac = wl1271_tx_get_queue(skb_get_queue_mapping(skb));
   229			wl->tx_allocated_pkts[ac]++;
   230	
   231			if (!is_dummy && wlvif &&
                                         ^^^^^
Old check.

   232			    wlvif->bss_type == BSS_TYPE_AP_BSS &&
   233			    test_bit(hlid, wlvif->ap.sta_hlid_map))

regards,
dan carpenter


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: wlcore/wl12xx: change GEM Tx-spare blocks per-vif
  2012-04-16 10:55 wlcore/wl12xx: change GEM Tx-spare blocks per-vif Dan Carpenter
@ 2012-04-16 19:03 ` Arik Nemtsov
  0 siblings, 0 replies; 2+ messages in thread
From: Arik Nemtsov @ 2012-04-16 19:03 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: linux-wireless

On Mon, Apr 16, 2012 at 13:55, Dan Carpenter <dan.carpenter@oracle.com> wrote:
> Hello Arik Nemtsov,
>
> This is a semi-automatic email about new static checker warnings.
>
> The patch 3edab305dfd4: "wlcore/wl12xx: change GEM Tx-spare blocks
> per-vif" from Dec 7, 2011, leads to the following Smatch complaint:
>
> drivers/net/wireless/ti/wlcore/tx.c:231 wl1271_tx_allocate()
>         warn: variable dereferenced before check 'wlvif' (see line 208)

Thanks Dan. We'll fix it shortly.

Arik

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-04-16 19:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-16 10:55 wlcore/wl12xx: change GEM Tx-spare blocks per-vif Dan Carpenter
2012-04-16 19:03 ` Arik Nemtsov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.