Move the temporary data buffer used when tapping into the SMT Tx queue from the outer function level into the conditional block it's actually used in and its containing skb is also declared, making the structure of code better.
Signed-off-by: Maciej W. Rozycki <ma...@linux-mips.org> --- Hi, This was also present, though not further complained about in kbuild bot output: drivers/net/fddi/defza.c:787:45: warning: unused variable 'skb_data_ptr' [-Wunused-variable] because it ran on a tree revision as at commit 61414f5ec983 ("FDDI: defza: Add support for DEC FDDIcontroller 700 TURBOchannel adapter") and therefore without commit 9f9a742db40f ("FDDI: defza: Support capturing outgoing SMT traffic"), indicating that the buffer should have been declared in the containing block rather than at the function level, especially as the skb it comes from is also declared within that block. Maciej --- drivers/net/fddi/defza.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) linux-defza-skb-data-ptr-fix.diff Index: linux-20181104-4maxp64/drivers/net/fddi/defza.c =================================================================== --- linux-20181104-4maxp64.orig/drivers/net/fddi/defza.c +++ linux-20181104-4maxp64/drivers/net/fddi/defza.c @@ -784,7 +784,7 @@ static void fza_rx(struct net_device *de static void fza_tx_smt(struct net_device *dev) { struct fza_private *fp = netdev_priv(dev); - struct fza_buffer_tx __iomem *smt_tx_ptr, *skb_data_ptr; + struct fza_buffer_tx __iomem *smt_tx_ptr; int i, len; u32 own; @@ -799,6 +799,7 @@ static void fza_tx_smt(struct net_device if (!netif_queue_stopped(dev)) { if (dev_nit_active(dev)) { + struct fza_buffer_tx *skb_data_ptr; struct sk_buff *skb; /* Length must be a multiple of 4 as only word