Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[PATCH] ipw2100: Fix radiotap code gcc warning

Fix gcc warning: ipw2100.c:2460: ISO C90 forbids mixed declarations and code

Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>

authored by

Zhu Yi and committed by
John W. Linville
cae16295 15745a7d

+8 -7
+8 -7
drivers/net/wireless/ipw2100.c
··· 2445 2445 struct ipw2100_status *status = &priv->status_queue.drv[i]; 2446 2446 struct ipw2100_rx_packet *packet = &priv->rx_buffers[i]; 2447 2447 2448 - IPW_DEBUG_RX("Handler...\n"); 2449 - 2450 2448 /* Magic struct that slots into the radiotap header -- no reason 2451 2449 * to build this manually element by element, we can write it much 2452 2450 * more efficiently than we can parse it. ORDER MATTERS HERE */ ··· 2453 2455 s8 rt_dbmsignal; /* signal in dbM, kluged to signed */ 2454 2456 } *ipw_rt; 2455 2457 2456 - if (unlikely(status->frame_size > skb_tailroom(packet->skb) - sizeof(struct ipw_rt_hdr))) { 2458 + IPW_DEBUG_RX("Handler...\n"); 2459 + 2460 + if (unlikely(status->frame_size > skb_tailroom(packet->skb) - 2461 + sizeof(struct ipw_rt_hdr))) { 2457 2462 IPW_DEBUG_INFO("%s: frame_size (%u) > skb_tailroom (%u)!" 2458 2463 " Dropping.\n", 2459 2464 priv->net_dev->name, 2460 - status->frame_size, skb_tailroom(packet->skb)); 2465 + status->frame_size, 2466 + skb_tailroom(packet->skb)); 2461 2467 priv->ieee->stats.rx_errors++; 2462 2468 return; 2463 2469 } ··· 2480 2478 return; 2481 2479 } 2482 2480 2483 - pci_unmap_single(priv->pci_dev, 2484 - packet->dma_addr, 2481 + pci_unmap_single(priv->pci_dev, packet->dma_addr, 2485 2482 sizeof(struct ipw2100_rx), PCI_DMA_FROMDEVICE); 2486 2483 memmove(packet->skb->data + sizeof(struct ipw_rt_hdr), 2487 2484 packet->skb->data, status->frame_size); ··· 2489 2488 2490 2489 ipw_rt->rt_hdr.it_version = PKTHDR_RADIOTAP_VERSION; 2491 2490 ipw_rt->rt_hdr.it_pad = 0; /* always good to zero */ 2492 - ipw_rt->rt_hdr.it_len = sizeof(struct ipw_rt_hdr); /* total header+data */ 2491 + ipw_rt->rt_hdr.it_len = sizeof(struct ipw_rt_hdr); /* total hdr+data */ 2493 2492 2494 2493 ipw_rt->rt_hdr.it_present = 1 << IEEE80211_RADIOTAP_DBM_ANTSIGNAL; 2495 2494