OSDN Git Service

net: allwinner: Fix print format
authorJakub Kicinski <kuba@kernel.org>
Sat, 8 Jan 2022 03:44:38 +0000 (19:44 -0800)
committerJakub Kicinski <kuba@kernel.org>
Mon, 10 Jan 2022 00:52:12 +0000 (16:52 -0800)
commit009e4ee381a0b6176969fe3026fc5eafe05705d0
tree9d6cbb22221a05704044c9fadc127b65f5c79346
parent07b17f0f7485bcbc7902cf6f56a89f5b716344bd
net: allwinner: Fix print format

Kees reports quoted commit introduced the following warning on arm64:

drivers/net/ethernet/allwinner/sun4i-emac.c:922:60: error: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'resource_size_t' {aka 'long long unsigned int'} [-Werror=format=]
  922 |         netdev_info(ndev, "get io resource from device: 0x%x, size = %u\n",
      |                                                           ~^
      |                                                            |                                      |                                                            unsigned int
      |                                                           %llx
  923 |                     regs->start, resource_size(regs));
      |                     ~~~~~~~~~~~
      |                         |
      |                         resource_size_t {aka long long unsigned int}

.. and another one like that for resource_size().

Switch to %pa and a cast.

Reported-by: Kees Cook <keescook@chromium.org>
Fixes: 47869e82c8b8 ("sun4i-emac.c: add dma support")
Link: https://lore.kernel.org/r/20220108034438.2227343-1-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/allwinner/sun4i-emac.c