]> git.baikalelectronics.ru Git - kernel.git/commit
net: ethernet: ti: cpsw: Fix cpsw_add_ch_strings() printk format
authorFlorian Fainelli <f.fainelli@gmail.com>
Mon, 21 May 2018 18:45:53 +0000 (11:45 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 21 May 2018 20:17:10 +0000 (16:17 -0400)
commite771f5b1486e33b18ceafedfce111d0385e24ac0
treeebd1bf51262a3492f47d05098e54cc605a1c6fac
parentd32c567efb8d6882cf227d192a9a3b85a9f0927d
net: ethernet: ti: cpsw: Fix cpsw_add_ch_strings() printk format

When building on a 64-bit host we will get the following warning:

drivers/net/ethernet/ti/cpsw.c: In function 'cpsw_add_ch_strings':
drivers/net/ethernet/ti/cpsw.c:1284:19: warning: format '%d' expects
argument of type 'int', but argument 5 has type 'long unsigned int'
[-Wformat=]
     "%s DMA chan %d: %s", rx_dir ? "Rx" : "Tx",
                  ~^
                  %ld

Fix this by using an %ld format and casting to long.

Fixes: 54a89033c801 ("net: ethernet: ti: cpsw: add multi queue support")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/ti/cpsw.c