Re: [PATCH] bgmac: driver for GBit MAC core on BCMA bus
From: Rafał Miłecki <zajec5@gmail.com>
Date: 2012-12-27 00:45:28
From: Rafał Miłecki <zajec5@gmail.com>
Date: 2012-12-27 00:45:28
Thanks for your comments, I'll improve the driver/patch. 2012/12/27 Francois Romieu [off-list ref]:
quoted
+ struct device *dma_dev = bgmac->core->dma_dev; + struct bgmac_dma_desc *dma_desc; + struct bgmac_slot_info *slot; + struct sk_buff *skb, *new_skb; + struct bgmac_rx_header *rx; + u32 end_slot; + u16 len, flags; + int handled = 0;The scope of several variables can be reduced as well.
I'm not 100% if I understand... Do you mean I should declare variables inside "while" loop when possible? I couldn't find suggestions about anywhere in Documentation, so please give me an extra work of explanation :) -- Rafał