[U-Boot] [U-Boot, 3/5] driver: usb: Fix pointer conversion warnings for hikey

Tom Rini trini at konsulko.com
Fri Nov 13 02:28:47 CET 2015


On Sun, Oct 25, 2015 at 01:18:41PM +0530, Prabhakar Kushwaha wrote:

> Fix below compilation warings happening for hikey_defconfig
> 
> drivers/usb/eth/smsc95xx.c:698:56: warning: cast from pointer to integer
> of different size [-Wpointer-to-int-cast]
>   debug("** %s(), len %d, buf %#x\n", __func__, length, (int)msg);
>                                                         ^
> include/common.h:109:26: note: in definition of macro ‘debug_cond’
>     printf(pr_fmt(fmt), ##args); \
>                           ^
> drivers/usb/eth/smsc95xx.c:698:2: note: in expansion of macro ‘debug’
>   debug("** %s(), len %d, buf %#x\n", __func__, length, (int)msg);
>   ^
> drivers/usb/eth/smsc95xx.c:718:2: warning: format ‘%u’ expects argument of
> type ‘unsigned int’, but argument 2 has type ‘long unsigned int’ [-Wformat=]
>   debug("Tx: len = %u, actual = %u, err = %d\n",
>   ^
> drivers/usb/eth/smsc95xx.c: In function ‘smsc95xx_recv’:
> drivers/usb/eth/smsc95xx.c:802:19: warning: cast from pointer to integer
> of different size [-Wpointer-to-int-cast]
>    cur_buf_align = (int)buf_ptr - (int)recv_buf;
>                    ^
> drivers/usb/eth/smsc95xx.c:802:34: warning: cast from pointer to integer
> of different size [-Wpointer-to-int-cast]
>    cur_buf_align = (int)buf_ptr - (int)recv_buf;
> 
> Signed-off-by: Prabhakar Kushwaha <prabhakar at freescale.com>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20151112/170d91a9/attachment.sig>


More information about the U-Boot mailing list