]> git.baikalelectronics.ru Git - kernel.git/commit
rocker: fix harmless warning on 32-bit machines
authorArnd Bergmann <arnd@arndb.de>
Tue, 13 Jan 2015 14:23:52 +0000 (15:23 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 13 Jan 2015 21:56:40 +0000 (16:56 -0500)
commitf271275b862b3459546412595fdcf477f6a8e02f
tree3336e9465ffe92e56cf4e29d06a7992d85f91d55
parent863cfede6d70b3a8e5fccea3e4b84b32246091c8
rocker: fix harmless warning on 32-bit machines

The rocker driver tries to assign a pointer to a 64-bit integer
and then back to a pointer. This is safe on all architectures,
but causes a compiler warning when pointers are shorter than
64-bit:

rocker/rocker.c: In function 'rocker_desc_cookie_ptr_get':
rocker/rocker.c:809:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
  return (void *) desc_info->desc->cookie;
         ^

This adds another cast to uintptr_t to tell the compiler
that it's safe.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/rocker/rocker.c