[PATCH v1 0/1] treewide: prefer __func__ over __FUNCTION__ and __PRETTY_FUNCTION__

Aristo Chen aristo.chen at canonical.com
Tue May 26 03:41:39 CEST 2026


The remaining 55 occurrences of __FUNCTION__ across 19 files plus the
lone __PRETTY_FUNCTION__ in drivers/usb/musb-new/omap2430.c are
converted to the C99-standard __func__ identifier. In C (unlike C++)
__PRETTY_FUNCTION__ is identical to __func__, so behaviour is
unchanged.

Small pre-existing style issues on the lines being touched (comma
spacing, "printf (" spacing, one mis-aligned continuation, missing
space in string-literal concatenation around __func__) are fixed in
the same pass so checkpatch comes out clean on the rename hunks.
Other instances of the same patterns elsewhere in the same files are
deliberately left alone to keep the diff focused.

Ten "Unnecessary ftrace-like logging" warnings remain on
function-entry traces of the form printf("%s\n", __func__) and
dbg("%s\n", __func__) in drivers/net/rtl8169.c (behind
DEBUG_RTL8169* preprocessor guards) and drivers/usb/host/ohci-hcd.c.
checkpatch matches that literal shape regardless of the wrapper, so
silencing them would require changing debug message text or removing
the traces entirely.

Build tested on CMPCPRO and socrates (powerpc), guruplug (arm
kirkwood), jetson-tk1 (arm, exercises drivers/net/rtl8169.c),
brcp170 (arm zynq, exercises drivers/fpga/xilinx.c and spartan*),
am3517_evm (arm, exercises drivers/usb/musb-new/omap2430.c) and
sandbox.

Aristo Chen (1):
  treewide: prefer __func__ over __FUNCTION__ and __PRETTY_FUNCTION__

 arch/arm/mach-kirkwood/cpu.c       | 10 +++++-----
 arch/mips/include/asm/system.h     |  4 ++--
 arch/powerpc/cpu/mpc85xx/liodn.c   |  2 +-
 board/Marvell/guruplug/guruplug.c  |  2 +-
 board/socrates/nand.c              |  2 +-
 boot/fdt_support.c                 | 14 +++++++-------
 drivers/ddr/fsl/main.c             |  2 +-
 drivers/ddr/fsl/mpc85xx_ddr_gen1.c |  2 +-
 drivers/ddr/fsl/mpc85xx_ddr_gen2.c |  2 +-
 drivers/ddr/fsl/mpc85xx_ddr_gen3.c |  2 +-
 drivers/fpga/spartan2.c            | 12 ++++++------
 drivers/fpga/spartan3.c            | 12 ++++++------
 drivers/fpga/xilinx.c              | 12 ++++++------
 drivers/net/mcfmii.c               |  2 +-
 drivers/net/rtl8169.c              | 18 +++++++++---------
 drivers/rtc/m41t62.c               |  4 ++--
 drivers/usb/host/ohci-hcd.c        |  2 +-
 drivers/usb/musb-new/omap2430.c    |  2 +-
 examples/standalone/sched.c        |  2 +-
 include/usbdevice.h                |  6 +++---
 20 files changed, 57 insertions(+), 57 deletions(-)

-- 
2.43.0



More information about the U-Boot mailing list