b53: Fix build warning.
authorDavid S. Miller <davem@davemloft.net>
Mon, 11 Jul 2016 21:30:52 +0000 (14:30 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 11 Jul 2016 21:30:52 +0000 (14:30 -0700)
   drivers/net/dsa/b53/b53_srab.c: In function 'b53_srab_probe':
>> drivers/net/dsa/b53/b53_srab.c:388:20: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
      pdata->chip_id = (u32)of_id->data;
                       ^

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/b53/b53_srab.c

index 2b304ea..3e2d4a5 100644 (file)
@@ -393,7 +393,7 @@ static int b53_srab_probe(struct platform_device *pdev)
                if (!pdata)
                        return -ENOMEM;
 
-               pdata->chip_id = (u32)of_id->data;
+               pdata->chip_id = (u32)(unsigned long)of_id->data;
        }
 
        priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL);