linux/arch/powerpc/platforms/52xx
Randy Dunlap 59510820ff powerpc/mpc52xx: Fix some pr_debug() issues
Fix some pr_debug() issues in mpc52xx_pci.c:

- use __func__ to print function names
- use "%pr" to print struct resource entries
- use "%pa" to print a resource_size_t (phys_addr_t)

The latter two fix several build warnings:

  ../arch/powerpc/platforms/52xx/mpc52xx_pci.c: In function 'mpc52xx_pci_setup':
  ../include/linux/kern_levels.h:5:18: warning: format '%x' expects argument of type 'unsigned int', but argument 2 has type 'resource_size_t' {aka 'long long unsigned int'} [-Wformat=]
  ../arch/powerpc/platforms/52xx/mpc52xx_pci.c:277:40: note: format string is defined here
    277 |   pr_debug("mem_resource[1] = {.start=%x, .end=%x, .flags=%lx}\n",
        |                                       ~^
        |                                        |
        |                                        unsigned int
        |                                       %llx
  ../include/linux/kern_levels.h:5:18: warning: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'resource_size_t' {aka 'long long unsigned int'} [-Wformat=]
  ../arch/powerpc/platforms/52xx/mpc52xx_pci.c:277:49: note: format string is defined here
    277 |   pr_debug("mem_resource[1] = {.start=%x, .end=%x, .flags=%lx}\n",
        |                                                ~^
        |                                                 |
        |                                                 unsigned int
        |                                                %llx

  ../arch/powerpc/platforms/52xx/mpc52xx_pci.c:299:36: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
    299 |    (unsigned long long)res->flags, (void*)hose->io_base_phys);
        |                                    ^
  ../arch/powerpc/platforms/52xx/mpc52xx_pci.c:295:2: note: in expansion of macro 'pr_debug'
    295 |  pr_debug(".io_resource={.start=%llx,.end=%llx,.flags=%llx} "
        |  ^~~~~~~~

The change to print mem_resource[0] is for consistency within this
source file and to use the kernel API -- there were no warnings here.

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
[chleroy: Fixed checkpatch complaints]
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20210429005323.8195-1-rdunlap@infradead.org
2022-05-04 19:37:43 +10:00
..
efika.c powerpc/52xx/efika: Move PHB discovery 2021-02-09 00:02:05 +11:00
Kconfig powerpc: Rename PPC_NATIVE to PPC_HASH_MMU_NATIVE 2021-12-02 22:57:22 +11:00
lite5200_pm.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
lite5200_sleep.S powerpc/52xx: Fix an invalid ASM expression ('addi' used instead of 'add') 2021-04-23 01:38:03 +10:00
lite5200.c powerpc/52xx/lite5200: Move PHB discovery 2021-02-09 00:02:05 +11:00
Makefile powerpc/Makefiles: Convert ifeq to ifdef where possible 2018-08-08 00:32:36 +10:00
media5200.c powerpc: Bulk conversion to generic_handle_domain_irq() 2021-08-12 11:39:41 +01:00
mpc52xx_common.c powerpc: Make ppc_md.{halt, restart} __noreturn 2016-07-14 21:12:06 +10:00
mpc52xx_gpt.c powerpc: Bulk conversion to generic_handle_domain_irq() 2021-08-12 11:39:41 +01:00
mpc52xx_lpbfifo.c powerpc/time: Avoid using get_tbl() 2021-02-11 23:35:13 +11:00
mpc52xx_pci.c powerpc/mpc52xx: Fix some pr_debug() issues 2022-05-04 19:37:43 +10:00
mpc52xx_pic.c treewide: Remove uninitialized_var() usage 2020-07-16 12:35:15 -07:00
mpc52xx_pm.c powerpc/mpc5200: Remove VLA usage 2018-07-03 12:00:54 +10:00
mpc52xx_sleep.S License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mpc5200_simple.c powerpc/52xx/mpc5200_simple: Move PHB discovery 2021-02-09 00:02:06 +11:00