drivers: net: xgene: fix kbuild warnings
authorIyappan Subramanian <isubramanian@apm.com>
Thu, 30 Apr 2015 23:09:17 +0000 (16:09 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 1 May 2015 02:30:07 +0000 (22:30 -0400)
Fixed the following kbuild warnings:
1. unused variable 'of_id'
2. buffer overflow 'ring_cfg' 5 <= 5

Signed-off-by: Iyappan Subramanian <isubramanian@apm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/apm/xgene/xgene_enet_main.c
drivers/net/ethernet/apm/xgene/xgene_enet_main.h

index 735d7c6e5686eacdd2dad4d5119505490749af14..1bb317532f75f5c1166b0b32041db6d7a6206cc8 100644 (file)
@@ -1173,7 +1173,9 @@ static int xgene_enet_probe(struct platform_device *pdev)
        struct xgene_enet_pdata *pdata;
        struct device *dev = &pdev->dev;
        struct xgene_mac_ops *mac_ops;
+#ifdef CONFIG_OF
        const struct of_device_id *of_id;
+#endif
        int ret;
 
        ndev = alloc_etherdev(sizeof(struct xgene_enet_pdata));
index 19a042728f287665b849767f061343d4e2c78758..1c85fc87703abc48c14b835b8536fba733fc5923 100644 (file)
@@ -83,7 +83,7 @@ struct xgene_enet_desc_ring {
        u16 irq;
        char irq_name[IRQ_ID_SIZE];
        u32 size;
-       u32 state[NUM_RING_CONFIG];
+       u32 state[X2_NUM_RING_CONFIG];
        void __iomem *cmd_base;
        void __iomem *cmd;
        dma_addr_t dma;