diff options
92 files changed, 309 insertions, 306 deletions
diff --git a/sys/boot/common/bcache.c b/sys/boot/common/bcache.c index e99a677..d4f4d7a 100644 --- a/sys/boot/common/bcache.c +++ b/sys/boot/common/bcache.c @@ -40,7 +40,7 @@ #ifdef BCACHE_DEBUG #define BCACHE_TIMEOUT 10 -# define DEBUG(fmt, args...) printf("%s: " fmt "\n" , __FUNCTION__ , ## args) +# define DEBUG(fmt, args...) printf("%s: " fmt "\n" , __func__ , ## args) #else #define BCACHE_TIMEOUT 2 # define DEBUG(fmt, args...) diff --git a/sys/boot/common/interp_forth.c b/sys/boot/common/interp_forth.c index b4604d9..41530b0 100644 --- a/sys/boot/common/interp_forth.c +++ b/sys/boot/common/interp_forth.c @@ -37,7 +37,7 @@ extern char bootprog_rev[]; /* #define BFORTH_DEBUG */ #ifdef BFORTH_DEBUG -# define DEBUG(fmt, args...) printf("%s: " fmt "\n" , __FUNCTION__ , ## args) +# define DEBUG(fmt, args...) printf("%s: " fmt "\n" , __func__ , ## args) #else # define DEBUG(fmt, args...) #endif diff --git a/sys/boot/i386/libi386/bioscd.c b/sys/boot/i386/libi386/bioscd.c index 5a9605e..edc05d6 100644 --- a/sys/boot/i386/libi386/bioscd.c +++ b/sys/boot/i386/libi386/bioscd.c @@ -58,7 +58,7 @@ #define CDMAJOR 15 #ifdef DISK_DEBUG -# define DEBUG(fmt, args...) printf("%s: " fmt "\n" , __FUNCTION__ , ## args) +# define DEBUG(fmt, args...) printf("%s: " fmt "\n" , __func__ , ## args) #else # define DEBUG(fmt, args...) #endif diff --git a/sys/boot/i386/libi386/biosdisk.c b/sys/boot/i386/libi386/biosdisk.c index 0ad95e1..c52b0f0 100644 --- a/sys/boot/i386/libi386/biosdisk.c +++ b/sys/boot/i386/libi386/biosdisk.c @@ -60,7 +60,7 @@ #define DAMAJOR 4 #ifdef DISK_DEBUG -# define DEBUG(fmt, args...) printf("%s: " fmt "\n" , __FUNCTION__ , ## args) +# define DEBUG(fmt, args...) printf("%s: " fmt "\n" , __func__ , ## args) #else # define DEBUG(fmt, args...) #endif diff --git a/sys/boot/pc98/libpc98/biosdisk.c b/sys/boot/pc98/libpc98/biosdisk.c index e6675a4..7c4c66b 100644 --- a/sys/boot/pc98/libpc98/biosdisk.c +++ b/sys/boot/pc98/libpc98/biosdisk.c @@ -60,7 +60,7 @@ #define DAMAJOR 4 #ifdef DISK_DEBUG -# define DEBUG(fmt, args...) printf("%s: " fmt "\n" , __FUNCTION__ , ## args) +# define DEBUG(fmt, args...) printf("%s: " fmt "\n" , __func__ , ## args) #else # define DEBUG(fmt, args...) #endif diff --git a/sys/coda/coda_psdev.c b/sys/coda/coda_psdev.c index 7014c89..c2653ec 100644 --- a/sys/coda/coda_psdev.c +++ b/sys/coda/coda_psdev.c @@ -89,7 +89,7 @@ int coda_pcatch = PCATCH; #else #endif -#define ENTRY if(coda_psdev_print_entry) myprintf(("Entered %s\n",__FUNCTION__)) +#define ENTRY if(coda_psdev_print_entry) myprintf(("Entered %s\n",__func__)) void vcodaattach(int n); diff --git a/sys/coda/coda_vfsops.c b/sys/coda/coda_vfsops.c index dd171df..275b036 100644 --- a/sys/coda/coda_vfsops.c +++ b/sys/coda/coda_vfsops.c @@ -67,7 +67,7 @@ MALLOC_DEFINE(M_CODA, "CODA storage", "Various Coda Structures"); int codadebug = 0; int coda_vfsop_print_entry = 0; -#define ENTRY if(coda_vfsop_print_entry) myprintf(("Entered %s\n",__FUNCTION__)) +#define ENTRY if(coda_vfsop_print_entry) myprintf(("Entered %s\n",__func__)) struct vnode *coda_ctlvp; struct coda_mntinfo coda_mnttbl[NVCODA]; /* indexed by minor device number */ diff --git a/sys/coda/coda_vnops.c b/sys/coda/coda_vnops.c index 9dea336..a9da56b 100644 --- a/sys/coda/coda_vnops.c +++ b/sys/coda/coda_vnops.c @@ -103,7 +103,7 @@ static int coda_lockdebug = 0; * coda_init is called at boot time. */ -#define ENTRY if(coda_vnop_print_entry) myprintf(("Entered %s\n",__FUNCTION__)) +#define ENTRY if(coda_vnop_print_entry) myprintf(("Entered %s\n",__func__)) /* Definition of the vnode operation vector */ diff --git a/sys/compat/linux/linux_ioctl.c b/sys/compat/linux/linux_ioctl.c index 31cdd6a..b81c459 100644 --- a/sys/compat/linux/linux_ioctl.c +++ b/sys/compat/linux/linux_ioctl.c @@ -1932,7 +1932,7 @@ linux_ioctl_socket(struct thread *td, struct linux_ioctl_args *args) int error, type; KASSERT(LINUX_IFNAMSIZ == IFNAMSIZ, - (__FUNCTION__ "(): LINUX_IFNAMSIZ != IFNAMSIZ")); + ("%s(): LINUX_IFNAMSIZ != IFNAMSIZ", __func__)); ifp = NULL; error = 0; @@ -1970,7 +1970,7 @@ linux_ioctl_socket(struct thread *td, struct linux_ioctl_args *args) case LINUX_SIOCSPGRP: /* these ioctls don't take an interface name */ #ifdef DEBUG - printf(__FUNCTION__ "(): ioctl %d\n", + printf("%s(): ioctl %d\n", __func__, args->cmd & 0xffff); #endif break; @@ -1994,7 +1994,7 @@ linux_ioctl_socket(struct thread *td, struct linux_ioctl_args *args) if (error != 0) return (error); #ifdef DEBUG - printf(__FUNCTION__ "(): ioctl %d on %.*s\n", + printf("%s(): ioctl %d on %.*s\n", __func__, args->cmd & 0xffff, LINUX_IFNAMSIZ, lifname); #endif ifp = ifname_linux_to_bsd(lifname, ifname); @@ -2010,7 +2010,7 @@ linux_ioctl_socket(struct thread *td, struct linux_ioctl_args *args) if (error != 0) return (error); #ifdef DEBUG - printf(__FUNCTION__ "(): %s translated to %s\n", + printf("%s(): %s translated to %s\n", __func__, lifname, ifname); #endif break; @@ -2139,7 +2139,7 @@ linux_ioctl_socket(struct thread *td, struct linux_ioctl_args *args) copyout(lifname, (char *)args->arg, LINUX_IFNAMSIZ); #ifdef DEBUG - printf(__FUNCTION__ "(): returning %d\n", error); + printf("%s(): returning %d\n", __func__, error); #endif return (error); } diff --git a/sys/dev/aac/aacvar.h b/sys/dev/aac/aacvar.h index ce15112..758e241 100644 --- a/sys/dev/aac/aacvar.h +++ b/sys/dev/aac/aacvar.h @@ -385,11 +385,11 @@ extern void aac_dump_complete(struct aac_softc *sc); #ifdef AAC_DEBUG # define debug(level, fmt, args...) \ do { \ - if (level <=AAC_DEBUG) printf("%s: " fmt "\n", __FUNCTION__ , ##args); \ + if (level <=AAC_DEBUG) printf("%s: " fmt "\n", __func__ , ##args); \ } while (0) # define debug_called(level) \ do { \ - if (level <= AAC_DEBUG) printf(__FUNCTION__ ": called\n"); \ + if (level <= AAC_DEBUG) printf(__func__ ": called\n"); \ } while (0) extern void aac_print_queues(struct aac_softc *sc); @@ -399,7 +399,7 @@ extern void aac_print_fib(struct aac_softc *sc, struct aac_fib *fib, extern void aac_print_aif(struct aac_softc *sc, struct aac_aif_command *aif); -# define AAC_PRINT_FIB(sc, fib) aac_print_fib(sc, fib, __FUNCTION__) +# define AAC_PRINT_FIB(sc, fib) aac_print_fib(sc, fib, __func__) #else # define debug(level, fmt, args...) diff --git a/sys/dev/agp/agp_intel.c b/sys/dev/agp/agp_intel.c index 532fa07..bb5338a 100644 --- a/sys/dev/agp/agp_intel.c +++ b/sys/dev/agp/agp_intel.c @@ -216,7 +216,7 @@ agp_intel_detach(device_t dev) case 0x1a218086: /* i840 */ case 0x25308086: /* i850 */ case 0x25318086: /* i860 */ - printf("%s: set MCHCFG to %x\n", __FUNCTION__, (unsigned) + printf("%s: set MCHCFG to %x\n", __func__, (unsigned) (pci_read_config(dev, AGP_INTEL_MCHCFG, 2) & ~(1 << 9))); pci_write_config(dev, AGP_INTEL_MCHCFG, @@ -224,7 +224,7 @@ agp_intel_detach(device_t dev) & ~(1 << 9)), 2); case 0x25008086: /* i820 */ - printf("%s: set RDCR to %x\n", __FUNCTION__, (unsigned) + printf("%s: set RDCR to %x\n", __func__, (unsigned) (pci_read_config(dev, AGP_INTEL_I820_RDCR, 1) & ~(1 << 1))); pci_write_config(dev, AGP_INTEL_I820_RDCR, @@ -232,7 +232,7 @@ agp_intel_detach(device_t dev) & ~(1 << 1)), 1); case 0x1a308086: /* i845 */ - printf("%s: set MCHCFG to %x\n", __FUNCTION__, (unsigned) + printf("%s: set MCHCFG to %x\n", __func__, (unsigned) (pci_read_config(dev, AGP_INTEL_I845_MCHCFG, 1) & ~(1 << 1))); pci_write_config(dev, AGP_INTEL_MCHCFG, @@ -240,7 +240,7 @@ agp_intel_detach(device_t dev) & ~(1 << 1)), 1); default: /* Intel Generic (maybe) */ - printf("%s: set NBXCFG to %x\n", __FUNCTION__, + printf("%s: set NBXCFG to %x\n", __func__, (pci_read_config(dev, AGP_INTEL_NBXCFG, 4) & ~(1 << 9))); pci_write_config(dev, AGP_INTEL_NBXCFG, diff --git a/sys/dev/amr/amrvar.h b/sys/dev/amr/amrvar.h index 159a4e8..330ed4e 100644 --- a/sys/dev/amr/amrvar.h +++ b/sys/dev/amr/amrvar.h @@ -32,13 +32,13 @@ #endif #ifdef AMR_DEBUG -# define debug(level, fmt, args...) do {if (level <= AMR_DEBUG) printf("%s: " fmt "\n", __FUNCTION__ , ##args);} while(0) -# define debug_called(level) do {if (level <= AMR_DEBUG) printf("%s: called\n", __FUNCTION__);} while(0) +# define debug(level, fmt, args...) do {if (level <= AMR_DEBUG) printf("%s: " fmt "\n", __func__ , ##args);} while(0) +# define debug_called(level) do {if (level <= AMR_DEBUG) printf("%s: called\n", __func__);} while(0) #else # define debug(level, fmt, args...) # define debug_called(level) #endif -#define xdebug(fmt, args...) printf("%s: " fmt "\n", __FUNCTION__ , ##args) +#define xdebug(fmt, args...) printf("%s: " fmt "\n", __func__ , ##args) /* * Per-logical-drive datastructure diff --git a/sys/dev/ciss/cissvar.h b/sys/dev/ciss/cissvar.h index 725118a..6cdb469 100644 --- a/sys/dev/ciss/cissvar.h +++ b/sys/dev/ciss/cissvar.h @@ -255,11 +255,11 @@ struct ciss_softc #ifdef CISS_DEBUG # define debug(level, fmt, args...) \ do { \ - if (level <= CISS_DEBUG) printf("%s: " fmt "\n", __FUNCTION__ , ##args); \ + if (level <= CISS_DEBUG) printf("%s: " fmt "\n", __func__ , ##args); \ } while(0) # define debug_called(level) \ do { \ - if (level <= CISS_DEBUG) printf(__FUNCTION__ ": called\n"); \ + if (level <= CISS_DEBUG) printf("%s: called\n", __func__); \ } while(0) # define debug_struct(s) printf(" SIZE %s: %d\n", #s, sizeof(struct s)) # define debug_union(s) printf(" SIZE %s: %d\n", #s, sizeof(union s)) diff --git a/sys/dev/fb/s3_pci.c b/sys/dev/fb/s3_pci.c index 20c8b0a..c7a1be8 100644 --- a/sys/dev/fb/s3_pci.c +++ b/sys/dev/fb/s3_pci.c @@ -471,7 +471,7 @@ s3pci_attach(device_t dev) int rid, i; if (s3pci_dev) { - printf("%s: driver already attached!\n", __FUNCTION__); + printf("%s: driver already attached!\n", __func__); goto error; } @@ -480,7 +480,7 @@ s3pci_attach(device_t dev) rid = 0; if (!(sc->port_res = bus_alloc_resource(dev, SYS_RES_IOPORT, &rid, 0ul, ~0ul, 0, RF_ACTIVE | RF_SHAREABLE))) { - printf("%s: port resource allocation failed!\n", __FUNCTION__); + printf("%s: port resource allocation failed!\n", __func__); goto error; } sc->st = rman_get_bustag(sc->port_res); @@ -490,7 +490,7 @@ s3pci_attach(device_t dev) if (!(sc->enh_res = bus_alloc_resource(dev, SYS_RES_IOPORT, &rid, 0ul, ~0ul, 0, RF_ACTIVE | RF_SHAREABLE))) { printf("%s: enhanced port resource allocation failed!\n", - __FUNCTION__); + __func__); goto error; } sc->enh_st = rman_get_bustag(sc->enh_res); @@ -500,7 +500,7 @@ s3pci_attach(device_t dev) if (!(sc->mem_res = bus_alloc_resource(dev, SYS_RES_MEMORY, &rid, 0, ~0, 1, RF_ACTIVE))) { - printf("%s: mem resource allocation failed!\n", __FUNCTION__); + printf("%s: mem resource allocation failed!\n", __func__); goto error; } @@ -522,7 +522,7 @@ s3pci_attach(device_t dev) */ if ((adp == NULL) || !(adp->va_flags & V_ADP_VESA)) { printf("%s: VGA adapter not found or VESA module not loaded!\n", - __FUNCTION__); + __func__); goto error; } diff --git a/sys/dev/ichsmb/ichsmb.c b/sys/dev/ichsmb/ichsmb.c index c17f09a..c310546 100644 --- a/sys/dev/ichsmb/ichsmb.c +++ b/sys/dev/ichsmb/ichsmb.c @@ -71,7 +71,7 @@ #define ICHSMB_DEBUG 0 #if ICHSMB_DEBUG != 0 && defined(__GNUC__) #define DBG(fmt, args...) \ - do { log(LOG_DEBUG, "%s: " fmt, __FUNCTION__ , ## args); } while (0) + do { log(LOG_DEBUG, "%s: " fmt, __func__ , ## args); } while (0) #else #define DBG(fmt, args...) do { } while (0) #endif @@ -164,7 +164,7 @@ ichsmb_quick(device_t dev, u_char slave, int how) DBG("slave=0x%02x how=%d\n", slave, how); KASSERT(sc->ich_cmd == -1, - ("%s: ich_cmd=%d\n", __FUNCTION__ , sc->ich_cmd)); + ("%s: ich_cmd=%d\n", __func__ , sc->ich_cmd)); switch (how) { case SMB_QREAD: case SMB_QWRITE: @@ -193,7 +193,7 @@ ichsmb_sendb(device_t dev, u_char slave, char byte) DBG("slave=0x%02x byte=0x%02x\n", slave, (u_char)byte); KASSERT(sc->ich_cmd == -1, - ("%s: ich_cmd=%d\n", __FUNCTION__ , sc->ich_cmd)); + ("%s: ich_cmd=%d\n", __func__ , sc->ich_cmd)); mtx_lock(&sc->mutex); sc->ich_cmd = ICH_HST_CNT_SMB_CMD_BYTE; bus_space_write_1(sc->io_bst, sc->io_bsh, ICH_XMIT_SLVA, @@ -215,7 +215,7 @@ ichsmb_recvb(device_t dev, u_char slave, char *byte) DBG("slave=0x%02x\n", slave); KASSERT(sc->ich_cmd == -1, - ("%s: ich_cmd=%d\n", __FUNCTION__ , sc->ich_cmd)); + ("%s: ich_cmd=%d\n", __func__ , sc->ich_cmd)); mtx_lock(&sc->mutex); sc->ich_cmd = ICH_HST_CNT_SMB_CMD_BYTE; bus_space_write_1(sc->io_bst, sc->io_bsh, ICH_XMIT_SLVA, @@ -238,7 +238,7 @@ ichsmb_writeb(device_t dev, u_char slave, char cmd, char byte) DBG("slave=0x%02x cmd=0x%02x byte=0x%02x\n", slave, (u_char)cmd, (u_char)byte); KASSERT(sc->ich_cmd == -1, - ("%s: ich_cmd=%d\n", __FUNCTION__ , sc->ich_cmd)); + ("%s: ich_cmd=%d\n", __func__ , sc->ich_cmd)); mtx_lock(&sc->mutex); sc->ich_cmd = ICH_HST_CNT_SMB_CMD_BYTE_DATA; bus_space_write_1(sc->io_bst, sc->io_bsh, ICH_XMIT_SLVA, @@ -262,7 +262,7 @@ ichsmb_writew(device_t dev, u_char slave, char cmd, short word) DBG("slave=0x%02x cmd=0x%02x word=0x%04x\n", slave, (u_char)cmd, (u_int16_t)word); KASSERT(sc->ich_cmd == -1, - ("%s: ich_cmd=%d\n", __FUNCTION__ , sc->ich_cmd)); + ("%s: ich_cmd=%d\n", __func__ , sc->ich_cmd)); mtx_lock(&sc->mutex); sc->ich_cmd = ICH_HST_CNT_SMB_CMD_WORD_DATA; bus_space_write_1(sc->io_bst, sc->io_bsh, ICH_XMIT_SLVA, @@ -286,7 +286,7 @@ ichsmb_readb(device_t dev, u_char slave, char cmd, char *byte) DBG("slave=0x%02x cmd=0x%02x\n", slave, (u_char)cmd); KASSERT(sc->ich_cmd == -1, - ("%s: ich_cmd=%d\n", __FUNCTION__ , sc->ich_cmd)); + ("%s: ich_cmd=%d\n", __func__ , sc->ich_cmd)); mtx_lock(&sc->mutex); sc->ich_cmd = ICH_HST_CNT_SMB_CMD_BYTE_DATA; bus_space_write_1(sc->io_bst, sc->io_bsh, ICH_XMIT_SLVA, @@ -309,7 +309,7 @@ ichsmb_readw(device_t dev, u_char slave, char cmd, short *word) DBG("slave=0x%02x cmd=0x%02x\n", slave, (u_char)cmd); KASSERT(sc->ich_cmd == -1, - ("%s: ich_cmd=%d\n", __FUNCTION__ , sc->ich_cmd)); + ("%s: ich_cmd=%d\n", __func__ , sc->ich_cmd)); mtx_lock(&sc->mutex); sc->ich_cmd = ICH_HST_CNT_SMB_CMD_WORD_DATA; bus_space_write_1(sc->io_bst, sc->io_bsh, ICH_XMIT_SLVA, @@ -337,7 +337,7 @@ ichsmb_pcall(device_t dev, u_char slave, char cmd, short sdata, short *rdata) DBG("slave=0x%02x cmd=0x%02x sdata=0x%04x\n", slave, (u_char)cmd, (u_int16_t)sdata); KASSERT(sc->ich_cmd == -1, - ("%s: ich_cmd=%d\n", __FUNCTION__ , sc->ich_cmd)); + ("%s: ich_cmd=%d\n", __func__ , sc->ich_cmd)); mtx_lock(&sc->mutex); sc->ich_cmd = ICH_HST_CNT_SMB_CMD_PROC_CALL; bus_space_write_1(sc->io_bst, sc->io_bsh, ICH_XMIT_SLVA, @@ -381,7 +381,7 @@ ichsmb_bwrite(device_t dev, u_char slave, char cmd, u_char count, char *buf) #undef DISP #endif KASSERT(sc->ich_cmd == -1, - ("%s: ich_cmd=%d\n", __FUNCTION__ , sc->ich_cmd)); + ("%s: ich_cmd=%d\n", __func__ , sc->ich_cmd)); if (count < 1 || count > 32) return (EINVAL); bcopy(buf, sc->block_data, count); @@ -412,7 +412,7 @@ ichsmb_bread(device_t dev, u_char slave, char cmd, u_char count, char *buf) DBG("slave=0x%02x cmd=0x%02x count=%d\n", slave, (u_char)cmd, count); KASSERT(sc->ich_cmd == -1, - ("%s: ich_cmd=%d\n", __FUNCTION__ , sc->ich_cmd)); + ("%s: ich_cmd=%d\n", __func__ , sc->ich_cmd)); if (count < 1 || count > 32) return (EINVAL); bzero(sc->block_data, sizeof(sc->block_data)); @@ -625,7 +625,7 @@ ichsmb_wait(sc_p sc) int error, smb_error; KASSERT(sc->ich_cmd != -1, - ("%s: ich_cmd=%d\n", __FUNCTION__ , sc->ich_cmd)); + ("%s: ich_cmd=%d\n", __func__ , sc->ich_cmd)); mtx_assert(&sc->mutex, MA_OWNED); sleep: error = msleep(sc, &sc->mutex, PZERO | PCATCH, "ichsmb", hz / 4); diff --git a/sys/dev/iicbus/if_ic.c b/sys/dev/iicbus/if_ic.c index fa8ffdf..2db1841 100644 --- a/sys/dev/iicbus/if_ic.c +++ b/sys/dev/iicbus/if_ic.c @@ -351,7 +351,7 @@ icintr (device_t dev, int event, char *ptr) break; default: - panic("%s: unknown event (%d)!", __FUNCTION__, event); + panic("%s: unknown event (%d)!", __func__, event); } splx(s); diff --git a/sys/dev/iicbus/iic.c b/sys/dev/iicbus/iic.c index 42c3ee0..a8d731e 100644 --- a/sys/dev/iicbus/iic.c +++ b/sys/dev/iicbus/iic.c @@ -162,7 +162,7 @@ iicclose(dev_t dev, int flags, int fmt, struct thread *td) sc->sc_count--; if (sc->sc_count < 0) - panic("%s: iic_count < 0!", __FUNCTION__); + panic("%s: iic_count < 0!", __func__); return (0); } @@ -219,7 +219,7 @@ iicread(dev_t dev, struct uio * uio, int ioflag) return (error); if (bufsize > uio->uio_resid) - panic("%s: too much data read!", __FUNCTION__); + panic("%s: too much data read!", __func__); iicbus_release_bus(device_get_parent(iicdev), iicdev); diff --git a/sys/dev/iicbus/iicbus.c b/sys/dev/iicbus/iicbus.c index 4d4a671..1a20543 100644 --- a/sys/dev/iicbus/iicbus.c +++ b/sys/dev/iicbus/iicbus.c @@ -198,7 +198,7 @@ iicbus_attach(device_t dev) break; default: - panic("%s: unknown class!", __FUNCTION__); + panic("%s: unknown class!", __func__); } if (iicdev->iicd_alive) { @@ -249,7 +249,7 @@ iicbus_print_child(device_t bus, device_t dev) break; default: - panic("%s: unknown class!", __FUNCTION__); + panic("%s: unknown class!", __func__); } return (retval); diff --git a/sys/dev/iicbus/iicsmb.c b/sys/dev/iicbus/iicsmb.c index 680c8b6..a38845bdb 100644 --- a/sys/dev/iicbus/iicsmb.c +++ b/sys/dev/iicbus/iicsmb.c @@ -179,7 +179,7 @@ iicsmb_intr(device_t dev, int event, char *buf) switch (sc->state) { case SMB_DONE: /* XXX too much data, discard */ - printf("%s: too much data from 0x%x\n", __FUNCTION__, + printf("%s: too much data from 0x%x\n", __func__, sc->devaddr & 0xff); goto end; @@ -212,14 +212,14 @@ end: break; default: - printf("%s unknown error 0x%x!\n", __FUNCTION__, + printf("%s unknown error 0x%x!\n", __func__, (int)*buf); break; } break; default: - panic("%s: unknown event (%d)!", __FUNCTION__, event); + panic("%s: unknown event (%d)!", __func__, event); } return; diff --git a/sys/dev/mlx/mlx.c b/sys/dev/mlx/mlx.c index c5c2392..2083282 100644 --- a/sys/dev/mlx/mlx.c +++ b/sys/dev/mlx/mlx.c @@ -1168,7 +1168,7 @@ mlx_periodic_enquiry(struct mlx_command *mc) break; } default: - device_printf(sc->mlx_dev, "%s: unknown command 0x%x", __FUNCTION__, mc->mc_mailbox[0]); + device_printf(sc->mlx_dev, "%s: unknown command 0x%x", __func__, mc->mc_mailbox[0]); break; } diff --git a/sys/dev/mlx/mlxvar.h b/sys/dev/mlx/mlxvar.h index 58c7a4b..84dad18 100644 --- a/sys/dev/mlx/mlxvar.h +++ b/sys/dev/mlx/mlxvar.h @@ -33,8 +33,8 @@ * 2 - extremely noisy, emit trace items in loops, etc. */ #ifdef MLX_DEBUG -#define debug(level, fmt, args...) do { if (level <= MLX_DEBUG) printf("%s: " fmt "\n", __FUNCTION__ , ##args); } while(0) -#define debug_called(level) do { if (level <= MLX_DEBUG) printf(__FUNCTION__ ": called\n"); } while(0) +#define debug(level, fmt, args...) do { if (level <= MLX_DEBUG) printf("%s: " fmt "\n", __func__ , ##args); } while(0) +#define debug_called(level) do { if (level <= MLX_DEBUG) printf(__func__ ": called\n"); } while(0) #else #define debug(level, fmt, args...) #define debug_called(level) diff --git a/sys/dev/mly/mlyvar.h b/sys/dev/mly/mlyvar.h index a83a947..7dfdbcf 100644 --- a/sys/dev/mly/mlyvar.h +++ b/sys/dev/mly/mlyvar.h @@ -84,8 +84,8 @@ * 2 - extremely noisy, emit trace items in loops, etc. */ #ifdef MLY_DEBUG -# define debug(level, fmt, args...) do { if (level <= MLY_DEBUG) printf("%s: " fmt "\n", __FUNCTION__ , ##args); } while(0) -# define debug_called(level) do { if (level <= MLY_DEBUG) printf(__FUNCTION__ ": called\n"); } while(0) +# define debug(level, fmt, args...) do { if (level <= MLY_DEBUG) printf("%s: " fmt "\n", __func__ , ##args); } while(0) +# define debug_called(level) do { if (level <= MLY_DEBUG) printf("%s: called\n", __func__); } while(0) # define debug_struct(s) printf(" SIZE %s: %d\n", #s, sizeof(struct s)) # define debug_union(s) printf(" SIZE %s: %d\n", #s, sizeof(union s)) # define debug_field(s, f) printf(" OFFSET %s.%s: %d\n", #s, #f, ((int)&(((struct s *)0)->f))) diff --git a/sys/dev/pcf/pcf.c b/sys/dev/pcf/pcf.c index b30b2c6..e4f8a69 100644 --- a/sys/dev/pcf/pcf.c +++ b/sys/dev/pcf/pcf.c @@ -468,7 +468,7 @@ pcfintr(void *arg) break; default: - panic("%s: unknown slave mode (%d)!", __FUNCTION__, + panic("%s: unknown slave mode (%d)!", __func__, pcf->pcf_slave_mode); } diff --git a/sys/dev/ppbus/ppb_1284.c b/sys/dev/ppbus/ppb_1284.c index 0915828..3fdd11b 100644 --- a/sys/dev/ppbus/ppb_1284.c +++ b/sys/dev/ppbus/ppb_1284.c @@ -173,7 +173,7 @@ ppb_request_mode(int mode, int options) request_mode = EPP_1284_NORMAL; break; default: - panic("%s: unsupported mode %d\n", __FUNCTION__, mode); + panic("%s: unsupported mode %d\n", __func__, mode); } } @@ -607,7 +607,7 @@ ppb_1284_read_id(device_t bus, int mode, char *buffer, error = spp_1284_read(bus, PPB_BYTE, buffer, max, read); break; default: - panic("%s: unsupported mode %d\n", __FUNCTION__, mode); + panic("%s: unsupported mode %d\n", __func__, mode); } ppb_1284_terminate(bus); @@ -790,7 +790,7 @@ ppb_1284_negociate(device_t bus, int mode, int options) break; default: - panic("%s: unknown mode (%d)!", __FUNCTION__, mode); + panic("%s: unknown mode (%d)!", __func__, mode); } ppb_set_mode(bus, mode); diff --git a/sys/dev/ppbus/ppb_msq.c b/sys/dev/ppbus/ppb_msq.c index 6cd99a0..9c83451 100644 --- a/sys/dev/ppbus/ppb_msq.c +++ b/sys/dev/ppbus/ppb_msq.c @@ -66,7 +66,7 @@ mode2xfer(device_t bus, struct ppb_device *ppbdev, int opcode) break; default: - panic("%s: unknown opcode (%d)", __FUNCTION__, opcode); + panic("%s: unknown opcode (%d)", __func__, opcode); } /* retrieve the device operating mode */ @@ -89,7 +89,7 @@ mode2xfer(device_t bus, struct ppb_device *ppbdev, int opcode) index = EPP19_MSQ; break; default: - panic("%s: unknown EPP protocol (0x%x)!", __FUNCTION__, + panic("%s: unknown EPP protocol (0x%x)!", __func__, epp); } break; @@ -97,7 +97,7 @@ mode2xfer(device_t bus, struct ppb_device *ppbdev, int opcode) index = ECP_MSQ; break; default: - panic("%s: unknown mode (%d)", __FUNCTION__, ppbdev->mode); + panic("%s: unknown mode (%d)", __func__, ppbdev->mode); } return (&table[index]); @@ -204,11 +204,11 @@ ppb_MS_init_msq(struct ppb_microseq *msq, int nbparam, ...) /* check the instruction position */ if (arg >= PPB_MS_MAXARGS) panic("%s: parameter out of range (0x%x)!", - __FUNCTION__, param); + __func__, param); #if 0 printf("%s: param = %d, ins = %d, arg = %d, type = %d\n", - __FUNCTION__, param, ins, arg, type); + __func__, param, ins, arg, type); #endif /* properly cast the parameter */ @@ -230,7 +230,7 @@ ppb_MS_init_msq(struct ppb_microseq *msq, int nbparam, ...) break; default: - panic("%s: unknown parameter (0x%x)!", __FUNCTION__, + panic("%s: unknown parameter (0x%x)!", __func__, param); } } @@ -288,7 +288,7 @@ ppb_MS_microseq(device_t bus, device_t dev, struct ppb_microseq *msq, int *ret) INCR_PC; goto next; } else - panic("%s: IEEE1284 read not supported", __FUNCTION__); + panic("%s: IEEE1284 read not supported", __func__); } /* XXX should use ppb_MS_init_msq() */ diff --git a/sys/dev/ppbus/vpoio.c b/sys/dev/ppbus/vpoio.c index 7ce6f08..059bd2e 100644 --- a/sys/dev/ppbus/vpoio.c +++ b/sys/dev/ppbus/vpoio.c @@ -297,7 +297,7 @@ vpoio_connect(struct vpoio_data *vpo, int how) if ((error = ppb_request_bus(ppbus, vpo->vpo_dev, how))) { #ifdef VP0_DEBUG - printf("%s: can't request bus!\n", __FUNCTION__); + printf("%s: can't request bus!\n", __func__); #endif return error; } @@ -652,7 +652,7 @@ vpoio_reset_bus(struct vpoio_data *vpo) if (vpoio_connect(vpo, PPB_WAIT|PPB_INTR) || !vpoio_in_disk_mode(vpo)) { #ifdef VP0_DEBUG - printf("%s: not in disk mode!\n", __FUNCTION__); + printf("%s: not in disk mode!\n", __func__); #endif /* release ppbus */ vpoio_disconnect(vpo); diff --git a/sys/dev/ppc/ppc.c b/sys/dev/ppc/ppc.c index c36b982..9a535c4 100644 --- a/sys/dev/ppc/ppc.c +++ b/sys/dev/ppc/ppc.c @@ -198,7 +198,7 @@ ppc_detect_fifo(struct ppc_data *ppc) /* XXX 16 and 32 bits implementations not supported */ if (ppc->ppc_pword != PPC_PWORD_8) { - LOG_PPC(__FUNCTION__, ppc, "PWord not supported"); + LOG_PPC(__func__, ppc, "PWord not supported"); goto error; } @@ -217,7 +217,7 @@ ppc_detect_fifo(struct ppc_data *ppc) } if (i >= 1024) { - LOG_PPC(__FUNCTION__, ppc, "can't flush FIFO"); + LOG_PPC(__func__, ppc, "can't flush FIFO"); goto error; } @@ -240,7 +240,7 @@ ppc_detect_fifo(struct ppc_data *ppc) } if (i >= 1024) { - LOG_PPC(__FUNCTION__, ppc, "can't fill FIFO"); + LOG_PPC(__func__, ppc, "can't fill FIFO"); goto error; } @@ -253,7 +253,7 @@ ppc_detect_fifo(struct ppc_data *ppc) */ for (i=ppc->ppc_fifo; i>0; i--) { if (r_fifo(ppc) != (char)(ppc->ppc_fifo-i)) { - LOG_PPC(__FUNCTION__, ppc, "invalid data in FIFO"); + LOG_PPC(__func__, ppc, "invalid data in FIFO"); goto error; } if (r_ecr(ppc) & PPC_SERVICE_INTR) { @@ -262,14 +262,14 @@ ppc_detect_fifo(struct ppc_data *ppc) } /* if FIFO empty before the last byte, error */ if (i>1 && (r_ecr(ppc) & PPC_FIFO_EMPTY)) { - LOG_PPC(__FUNCTION__, ppc, "data lost in FIFO"); + LOG_PPC(__func__, ppc, "data lost in FIFO"); goto error; } } /* FIFO must be empty after the last byte */ if (!(r_ecr(ppc) & PPC_FIFO_EMPTY)) { - LOG_PPC(__FUNCTION__, ppc, "can't empty the FIFO"); + LOG_PPC(__func__, ppc, "can't empty the FIFO"); goto error; } @@ -1148,7 +1148,7 @@ found: printf(" ECP+EPP SPP"); break; default: - printf("%s: unknown case (0x%x)!\n", __FUNCTION__, r); + printf("%s: unknown case (0x%x)!\n", __func__, r); } } else { @@ -1499,7 +1499,7 @@ ppc_exec_microseq(device_t dev, struct ppb_microseq **p_msq) case MS_OP_CALL: if (stack) - panic("%s: too much calls", __FUNCTION__); + panic("%s: too much calls", __func__); if (mi->arg[0].p) { /* store the state of the actual @@ -1533,7 +1533,7 @@ ppc_exec_microseq(device_t dev, struct ppb_microseq **p_msq) * of a submicrosequence */ if (stack) panic("%s: can't return to ppb level", - __FUNCTION__); + __func__); /* update pc for ppb level of execution */ *p_msq = mi; @@ -1543,7 +1543,7 @@ ppc_exec_microseq(device_t dev, struct ppb_microseq **p_msq) default: panic("%s: unknown microsequence opcode 0x%x", - __FUNCTION__, mi->opcode); + __func__, mi->opcode); } } @@ -2077,7 +2077,7 @@ ppc_io(device_t ppcdev, int iop, u_char *addr, int cnt, u_char byte) w_fifo(ppc, byte); break; default: - panic("%s: unknown I/O operation", __FUNCTION__); + panic("%s: unknown I/O operation", __func__); break; } diff --git a/sys/dev/ray/if_raydbg.h b/sys/dev/ray/if_raydbg.h index 965a180..2ab5310 100644 --- a/sys/dev/ray/if_raydbg.h +++ b/sys/dev/ray/if_raydbg.h @@ -95,14 +95,14 @@ #define RAY_DPRINTF(sc, mask, fmt, args...) do {if (RAY_DEBUG & (mask)) {\ device_printf((sc)->dev, "%s(%d) " fmt "\n", \ - __FUNCTION__ , __LINE__ , ##args); \ + __func__ , __LINE__ , ##args); \ } } while (0) /* This macro assumes that common memory is mapped into kernel space */ #define RAY_DHEX8(sc, mask, off, len, s) do { if (RAY_DEBUG & (mask)) { \ int i, j; \ device_printf((sc)->dev, "%s(%d) %s\n", \ - __FUNCTION__ , __LINE__ , (s)); \ + __func__ , __LINE__ , (s)); \ for (i = (off); i < (off)+(len); i += 8) { \ printf(". 0x%04x ", i); \ for (j = 0; j < 8; j++) \ @@ -113,7 +113,7 @@ #define RAY_DCOM(sc, mask, com, s) do { if (RAY_DEBUG & (mask)) { \ device_printf((sc)->dev, "%s(%d) %s com entry 0x%p\n", \ - __FUNCTION__ , __LINE__ , (s) , (com)); \ + __func__ , __LINE__ , (s) , (com)); \ printf(". c_mesg %s\n", (com)->c_mesg); \ printf(". c_flags 0x%b\n", (com)->c_flags, RAY_COM_FLAGS_PRINTFB); \ printf(". c_retval 0x%x\n", (com)->c_retval); \ @@ -134,13 +134,13 @@ #if RAY_DEBUG #define RAY_RECERR(sc, fmt, args...) do { \ device_printf((sc)->dev, "%s(%d) " fmt "\n", \ - __FUNCTION__ , __LINE__ , ##args); \ + __func__ , __LINE__ , ##args); \ } while (0) #endif /* RAY_DEBUG */ #if RAY_DEBUG & RAY_DBG_COM #define RAY_COM_CHECK(sc, com) do { if (RAY_DEBUG & RAY_DBG_COM) { \ - ray_com_ecf_check((sc), (com), __FUNCTION__ ); \ + ray_com_ecf_check((sc), (com), __func__ ); \ } } while (0) #endif /* RAY_DEBUG & RAY_DBG_COM */ diff --git a/sys/dev/ray/if_rayvar.h b/sys/dev/ray/if_rayvar.h index a5a09b5..09430e3 100644 --- a/sys/dev/ray/if_rayvar.h +++ b/sys/dev/ray/if_rayvar.h @@ -237,12 +237,12 @@ static int mib_info[RAY_MIB_MAX+1][3] = RAY_MIB_INFO; #define RAY_PANIC(sc, fmt, args...) do { \ panic("ray%d: %s(%d) " fmt "\n", device_get_unit((sc)->dev), \ - __FUNCTION__ , __LINE__ , ##args); \ + __func__ , __LINE__ , ##args); \ } while (0) #define RAY_PRINTF(sc, fmt, args...) do { \ device_printf((sc)->dev, "%s(%d) " fmt "\n", \ - __FUNCTION__ , __LINE__ , ##args); \ + __func__ , __LINE__ , ##args); \ } while (0) #define RAY_COM_MALLOC(function, flags) \ @@ -303,7 +303,7 @@ static int mib_info[RAY_MIB_MAX+1][3] = RAY_MIB_INFO; struct ifnet *ifp = &(sc)->arpcom.ac_if; \ if (ifp->if_flags & IFF_DEBUG) { \ device_printf((sc)->dev, "%s(%d) " fmt "\n", \ - __FUNCTION__ , __LINE__ , ##args); \ + __func__ , __LINE__ , ##args); \ } } while (0) #endif /* RAY_RECERR */ @@ -316,7 +316,7 @@ static int mib_info[RAY_MIB_MAX+1][3] = RAY_MIB_INFO; if (ifp->if_flags & IFF_DEBUG) { \ device_printf((sc)->dev, \ "%s(%d) ECF command completed with status %s\n", \ - __FUNCTION__ , __LINE__ , ss[(status)]); \ + __func__ , __LINE__ , ss[(status)]); \ } } } while (0) #endif /* RAY_CCSERR */ diff --git a/sys/dev/sound/pcm/buffer.c b/sys/dev/sound/pcm/buffer.c index e40c9fd..5e2e5b3 100644 --- a/sys/dev/sound/pcm/buffer.c +++ b/sys/dev/sound/pcm/buffer.c @@ -307,7 +307,7 @@ sndbuf_getbuf(struct snd_dbuf *b) void * sndbuf_getbufofs(struct snd_dbuf *b, unsigned int ofs) { - KASSERT((ofs >= 0) && (ofs <= b->bufsize), ("%s: ofs invalid %d", __FUNCTION__, ofs)); + KASSERT((ofs >= 0) && (ofs <= b->bufsize), ("%s: ofs invalid %d", __func__, ofs)); return b->buf + ofs; } @@ -379,7 +379,7 @@ unsigned int sndbuf_getready(struct snd_dbuf *b) { SNDBUF_LOCKASSERT(b); - KASSERT((b->rl >= 0) && (b->rl <= b->bufsize), ("%s: b->rl invalid %d", __FUNCTION__, b->rl)); + KASSERT((b->rl >= 0) && (b->rl <= b->bufsize), ("%s: b->rl invalid %d", __func__, b->rl)); return b->rl; } @@ -388,7 +388,7 @@ unsigned int sndbuf_getreadyptr(struct snd_dbuf *b) { SNDBUF_LOCKASSERT(b); - KASSERT((b->rp >= 0) && (b->rp <= b->bufsize), ("%s: b->rp invalid %d", __FUNCTION__, b->rp)); + KASSERT((b->rp >= 0) && (b->rp <= b->bufsize), ("%s: b->rp invalid %d", __func__, b->rp)); return b->rp; } @@ -397,7 +397,7 @@ unsigned int sndbuf_getfree(struct snd_dbuf *b) { SNDBUF_LOCKASSERT(b); - KASSERT((b->rl >= 0) && (b->rl <= b->bufsize), ("%s: b->rl invalid %d", __FUNCTION__, b->rl)); + KASSERT((b->rl >= 0) && (b->rl <= b->bufsize), ("%s: b->rl invalid %d", __func__, b->rl)); return b->bufsize - b->rl; } @@ -406,8 +406,8 @@ unsigned int sndbuf_getfreeptr(struct snd_dbuf *b) { SNDBUF_LOCKASSERT(b); - KASSERT((b->rp >= 0) && (b->rp <= b->bufsize), ("%s: b->rp invalid %d", __FUNCTION__, b->rp)); - KASSERT((b->rl >= 0) && (b->rl <= b->bufsize), ("%s: b->rl invalid %d", __FUNCTION__, b->rl)); + KASSERT((b->rp >= 0) && (b->rp <= b->bufsize), ("%s: b->rp invalid %d", __func__, b->rp)); + KASSERT((b->rl >= 0) && (b->rl <= b->bufsize), ("%s: b->rl invalid %d", __func__, b->rl)); return (b->rp + b->rl) % b->bufsize; } @@ -451,8 +451,8 @@ sndbuf_acquire(struct snd_dbuf *b, u_int8_t *from, unsigned int count) { int l; - KASSERT(count <= sndbuf_getfree(b), ("%s: count %d > free %d", __FUNCTION__, count, sndbuf_getfree(b))); - KASSERT((b->rl >= 0) && (b->rl <= b->bufsize), ("%s: b->rl invalid %d", __FUNCTION__, b->rl)); + KASSERT(count <= sndbuf_getfree(b), ("%s: count %d > free %d", __func__, count, sndbuf_getfree(b))); + KASSERT((b->rl >= 0) && (b->rl <= b->bufsize), ("%s: b->rl invalid %d", __func__, b->rl)); b->total += count; if (from != NULL) { while (count > 0) { @@ -464,7 +464,7 @@ sndbuf_acquire(struct snd_dbuf *b, u_int8_t *from, unsigned int count) } } else b->rl += count; - KASSERT((b->rl >= 0) && (b->rl <= b->bufsize), ("%s: b->rl invalid %d, count %d", __FUNCTION__, b->rl, count)); + KASSERT((b->rl >= 0) && (b->rl <= b->bufsize), ("%s: b->rl invalid %d, count %d", __func__, b->rl, count)); return 0; } @@ -474,8 +474,8 @@ sndbuf_dispose(struct snd_dbuf *b, u_int8_t *to, unsigned int count) { int l; - KASSERT(count <= sndbuf_getready(b), ("%s: count %d > ready %d", __FUNCTION__, count, sndbuf_getready(b))); - KASSERT((b->rl >= 0) && (b->rl <= b->bufsize), ("%s: b->rl invalid %d", __FUNCTION__, b->rl)); + KASSERT(count <= sndbuf_getready(b), ("%s: count %d > ready %d", __func__, count, sndbuf_getready(b))); + KASSERT((b->rl >= 0) && (b->rl <= b->bufsize), ("%s: b->rl invalid %d", __func__, b->rl)); if (to != NULL) { while (count > 0) { l = MIN(count, sndbuf_getsize(b) - sndbuf_getreadyptr(b)); @@ -489,7 +489,7 @@ sndbuf_dispose(struct snd_dbuf *b, u_int8_t *to, unsigned int count) b->rl -= count; b->rp = (b->rp + count) % b->bufsize; } - KASSERT((b->rl >= 0) && (b->rl <= b->bufsize), ("%s: b->rl invalid %d, count %d", __FUNCTION__, b->rl, count)); + KASSERT((b->rl >= 0) && (b->rl <= b->bufsize), ("%s: b->rl invalid %d, count %d", __func__, b->rl, count)); return 0; } diff --git a/sys/dev/sound/pcm/channel.c b/sys/dev/sound/pcm/channel.c index adf3fb9..c3a3eb9 100644 --- a/sys/dev/sound/pcm/channel.c +++ b/sys/dev/sound/pcm/channel.c @@ -879,7 +879,7 @@ chn_setblocksize(struct pcm_channel *c, int blkcnt, int blksz) return EINVAL; ret = 0; - DEB(printf("%s(%d, %d)\n", __FUNCTION__, blkcnt, blksz)); + DEB(printf("%s(%d, %d)\n", __func__, blkcnt, blksz)); if (blksz == 0 || blksz == -1) { if (blksz == -1) c->flags &= ~CHN_F_HAS_SIZE; @@ -894,11 +894,11 @@ chn_setblocksize(struct pcm_channel *c, int blkcnt, int blksz) RANGE(blksz, 16, CHN_2NDBUFMAXSIZE / 2); RANGE(blkcnt, 2, CHN_2NDBUFMAXSIZE / blksz); - DEB(printf("%s: defaulting to (%d, %d)\n", __FUNCTION__, blkcnt, blksz)); + DEB(printf("%s: defaulting to (%d, %d)\n", __func__, blkcnt, blksz)); } else { blkcnt = sndbuf_getblkcnt(bs); blksz = sndbuf_getblksz(bs); - DEB(printf("%s: updating (%d, %d)\n", __FUNCTION__, blkcnt, blksz)); + DEB(printf("%s: updating (%d, %d)\n", __func__, blkcnt, blksz)); } } else { ret = EINVAL; @@ -917,7 +917,7 @@ chn_setblocksize(struct pcm_channel *c, int blkcnt, int blksz) /* adjust for different hw format/speed */ irqhz = (sndbuf_getbps(bs) * sndbuf_getspd(bs)) / sndbuf_getblksz(bs); - DEB(printf("%s: soft bps %d, spd %d, irqhz == %d\n", __FUNCTION__, sndbuf_getbps(bs), sndbuf_getspd(bs), irqhz)); + DEB(printf("%s: soft bps %d, spd %d, irqhz == %d\n", __func__, sndbuf_getbps(bs), sndbuf_getspd(bs), irqhz)); RANGE(irqhz, 16, 512); sndbuf_setblksz(b, (sndbuf_getbps(b) * sndbuf_getspd(b)) / irqhz); @@ -930,7 +930,7 @@ chn_setblocksize(struct pcm_channel *c, int blkcnt, int blksz) /* round down to fit hw bufhard size */ RANGE(blksz, 16, sndbuf_getmaxsize(b) / 2); - DEB(printf("%s: hard blksz requested %d (maxsize %d), ", __FUNCTION__, blksz, sndbuf_getmaxsize(b))); + DEB(printf("%s: hard blksz requested %d (maxsize %d), ", __func__, blksz, sndbuf_getmaxsize(b))); sndbuf_setblksz(b, CHANNEL_SETBLOCKSIZE(c->methods, c->devinfo, blksz)); diff --git a/sys/dev/twe/twevar.h b/sys/dev/twe/twevar.h index 3e06bb5..84d41dd 100644 --- a/sys/dev/twe/twevar.h +++ b/sys/dev/twe/twevar.h @@ -30,11 +30,11 @@ #ifdef TWE_DEBUG #define debug(level, fmt, args...) \ do { \ - if (level <= TWE_DEBUG) printf("%s: " fmt "\n", __FUNCTION__ , ##args); \ + if (level <= TWE_DEBUG) printf("%s: " fmt "\n", __func__ , ##args); \ } while(0) #define debug_called(level) \ do { \ - if (level <= TWE_DEBUG) printf(__FUNCTION__ ": called\n"); \ + if (level <= TWE_DEBUG) printf("%s: called\n", __func__); \ } while(0) #else #define debug(level, fmt, args...) diff --git a/sys/dev/wi/if_wi.c b/sys/dev/wi/if_wi.c index 29a6fac..c3822fe 100644 --- a/sys/dev/wi/if_wi.c +++ b/sys/dev/wi/if_wi.c @@ -554,8 +554,8 @@ wi_generic_attach(device_t dev) if (bootverbose) { device_printf(sc->dev, - __FUNCTION__ ":wi_has_wep = %d\n", - sc->wi_has_wep); + "%s:wi_has_wep = %d\n", + __func__, sc->wi_has_wep); } bzero((char *)&sc->wi_stats, sizeof(sc->wi_stats)); diff --git a/sys/fs/coda/coda_psdev.c b/sys/fs/coda/coda_psdev.c index 7014c89..c2653ec 100644 --- a/sys/fs/coda/coda_psdev.c +++ b/sys/fs/coda/coda_psdev.c @@ -89,7 +89,7 @@ int coda_pcatch = PCATCH; #else #endif -#define ENTRY if(coda_psdev_print_entry) myprintf(("Entered %s\n",__FUNCTION__)) +#define ENTRY if(coda_psdev_print_entry) myprintf(("Entered %s\n",__func__)) void vcodaattach(int n); diff --git a/sys/fs/coda/coda_vfsops.c b/sys/fs/coda/coda_vfsops.c index dd171df..275b036 100644 --- a/sys/fs/coda/coda_vfsops.c +++ b/sys/fs/coda/coda_vfsops.c @@ -67,7 +67,7 @@ MALLOC_DEFINE(M_CODA, "CODA storage", "Various Coda Structures"); int codadebug = 0; int coda_vfsop_print_entry = 0; -#define ENTRY if(coda_vfsop_print_entry) myprintf(("Entered %s\n",__FUNCTION__)) +#define ENTRY if(coda_vfsop_print_entry) myprintf(("Entered %s\n",__func__)) struct vnode *coda_ctlvp; struct coda_mntinfo coda_mnttbl[NVCODA]; /* indexed by minor device number */ diff --git a/sys/fs/coda/coda_vnops.c b/sys/fs/coda/coda_vnops.c index 9dea336..a9da56b 100644 --- a/sys/fs/coda/coda_vnops.c +++ b/sys/fs/coda/coda_vnops.c @@ -103,7 +103,7 @@ static int coda_lockdebug = 0; * coda_init is called at boot time. */ -#define ENTRY if(coda_vnop_print_entry) myprintf(("Entered %s\n",__FUNCTION__)) +#define ENTRY if(coda_vnop_print_entry) myprintf(("Entered %s\n",__func__)) /* Definition of the vnode operation vector */ diff --git a/sys/fs/nwfs/nwfs_io.c b/sys/fs/nwfs/nwfs_io.c index 7325ac3..e3772f0 100644 --- a/sys/fs/nwfs/nwfs_io.c +++ b/sys/fs/nwfs/nwfs_io.c @@ -163,7 +163,7 @@ nwfs_readvnode(struct vnode *vp, struct uio *uiop, struct ucred *cred) { int error, biosize; if (vp->v_type != VREG && vp->v_type != VDIR) { - printf("%s: vn types other than VREG or VDIR are unsupported !\n",__FUNCTION__); + printf("%s: vn types other than VREG or VDIR are unsupported !\n",__func__); return EIO; } if (uiop->uio_resid == 0) return 0; @@ -208,7 +208,7 @@ nwfs_writevnode(vp, uiop, cred, ioflag) int error = 0; if (vp->v_type != VREG) { - printf("%s: vn types other than VREG unsupported !\n",__FUNCTION__); + printf("%s: vn types other than VREG unsupported !\n",__func__); return EIO; } NCPVNDEBUG("ofs=%d,resid=%d\n",(int)uiop->uio_offset, uiop->uio_resid); diff --git a/sys/fs/nwfs/nwfs_subr.c b/sys/fs/nwfs/nwfs_subr.c index 4755891..3d77342 100644 --- a/sys/fs/nwfs/nwfs_subr.c +++ b/sys/fs/nwfs/nwfs_subr.c @@ -197,7 +197,7 @@ ncp_lookup(struct vnode *dvp, int len, char *name, struct nw_entry_info *fap, } return error; } else if (len == 2 && name[0] == '.' && name[1] == '.') { - printf("%s: knows NOTHING about '..'\n", __FUNCTION__); + printf("%s: knows NOTHING about '..'\n", __func__); return EIO; } else { error = ncp_obtain_info(nmp, dnp->n_fid.f_id, diff --git a/sys/fs/pseudofs/pseudofs.c b/sys/fs/pseudofs/pseudofs.c index 6bb69a7..6477bff 100644 --- a/sys/fs/pseudofs/pseudofs.c +++ b/sys/fs/pseudofs/pseudofs.c @@ -60,13 +60,13 @@ static int _pfs_add_node(struct pfs_node *parent, struct pfs_node *node) { KASSERT(parent != NULL, - (__FUNCTION__ "(): parent is NULL")); + ("%s(): parent is NULL", __func__)); KASSERT(parent->pn_info != NULL, - (__FUNCTION__ "(): parent has no pn_info")); + ("%s(): parent has no pn_info", __func__)); KASSERT(parent->pn_type == pfstype_dir || parent->pn_type == pfstype_procdir || parent->pn_type == pfstype_root, - (__FUNCTION__ "(): parent is not a directory")); + ("%s(): parent is not a directory", __func__)); /* XXX should check for duplicate names etc. */ @@ -121,7 +121,7 @@ pfs_create_dir(struct pfs_node *parent, char *name, struct pfs_node *dir; KASSERT(strlen(name) < PFS_NAMELEN, - (__FUNCTION__ "(): node name is too long")); + ("%s(): node name is too long", __func__)); MALLOC(dir, struct pfs_node *, sizeof *dir, M_PFSNODES, M_WAITOK|M_ZERO); @@ -154,7 +154,7 @@ pfs_create_file(struct pfs_node *parent, char *name, pfs_fill_t fill, struct pfs_node *node; KASSERT(strlen(name) < PFS_NAMELEN, - (__FUNCTION__ "(): node name is too long")); + ("%s(): node name is too long", __func__)); MALLOC(node, struct pfs_node *, sizeof *node, M_PFSNODES, M_WAITOK|M_ZERO); @@ -198,9 +198,9 @@ pfs_destroy(struct pfs_node *node) struct pfs_node *parent, *rover; KASSERT(node != NULL, - (__FUNCTION__ "(): node is NULL")); + ("%s(): node is NULL", __func__)); KASSERT(node->pn_info != NULL, - (__FUNCTION__ "(): node has no pn_info")); + ("%s(): node has no pn_info", __func__)); /* destroy children */ if (node->pn_type == pfstype_dir || @@ -212,7 +212,7 @@ pfs_destroy(struct pfs_node *node) /* unlink from parent */ if ((parent = node->pn_parent) != NULL) { KASSERT(parent->pn_info == node->pn_info, - (__FUNCTION__ "(): parent has different pn_info")); + ("%s(): parent has different pn_info", __func__)); mtx_lock(&node->pn_info->pi_mutex); if (parent->pn_nodes == node) { parent->pn_nodes = node->pn_next; diff --git a/sys/fs/smbfs/smbfs_smb.c b/sys/fs/smbfs/smbfs_smb.c index d7f19c8..db08f5e 100644 --- a/sys/fs/smbfs/smbfs_smb.c +++ b/sys/fs/smbfs/smbfs_smb.c @@ -1254,7 +1254,7 @@ smbfs_smb_lookup(struct smbnode *dnp, const char *name, int nmlen, return error; } else if (nmlen == 2 && name[0] == '.' && name[1] == '.') { error = smbfs_smb_lookup(dnp->n_parent, NULL, 0, fap, scred); - printf("%s: knows NOTHING about '..'\n", __FUNCTION__); + printf("%s: knows NOTHING about '..'\n", __func__); return error; } error = smbfs_findopen(dnp, name, nmlen, diff --git a/sys/fs/smbfs/smbfs_subr.h b/sys/fs/smbfs/smbfs_subr.h index d41e9a8..058ffe8 100644 --- a/sys/fs/smbfs/smbfs_subr.h +++ b/sys/fs/smbfs/smbfs_subr.h @@ -38,10 +38,10 @@ MALLOC_DECLARE(M_SMBFSDATA); #endif -#define SMBFSERR(format, args...) printf("%s: "format, __FUNCTION__ ,## args) +#define SMBFSERR(format, args...) printf("%s: "format, __func__ ,## args) #ifdef SMB_VNODE_DEBUG -#define SMBVDEBUG(format, args...) printf("%s: "format, __FUNCTION__ ,## args) +#define SMBVDEBUG(format, args...) printf("%s: "format, __func__ ,## args) #else #define SMBVDEBUG(format, args...) #endif diff --git a/sys/gnu/ext2fs/ext2_fs.h b/sys/gnu/ext2fs/ext2_fs.h index c449e21..b5e9f4a 100644 --- a/sys/gnu/ext2fs/ext2_fs.h +++ b/sys/gnu/ext2fs/ext2_fs.h @@ -78,7 +78,7 @@ #ifdef EXT2FS_DEBUG # define ext2_debug(f, a...) { \ printf ("EXT2-fs DEBUG (%s, %d): %s:", \ - __FILE__, __LINE__, __FUNCTION__); \ + __FILE__, __LINE__, __func__); \ printf (f, ## a); \ } #else diff --git a/sys/gnu/fs/ext2fs/ext2_fs.h b/sys/gnu/fs/ext2fs/ext2_fs.h index c449e21..b5e9f4a 100644 --- a/sys/gnu/fs/ext2fs/ext2_fs.h +++ b/sys/gnu/fs/ext2fs/ext2_fs.h @@ -78,7 +78,7 @@ #ifdef EXT2FS_DEBUG # define ext2_debug(f, a...) { \ printf ("EXT2-fs DEBUG (%s, %d): %s:", \ - __FILE__, __LINE__, __FUNCTION__); \ + __FILE__, __LINE__, __func__); \ printf (f, ## a); \ } #else diff --git a/sys/i386/ibcs2/imgact_coff.c b/sys/i386/ibcs2/imgact_coff.c index 3ea816b..01edae4 100644 --- a/sys/i386/ibcs2/imgact_coff.c +++ b/sys/i386/ibcs2/imgact_coff.c @@ -276,7 +276,7 @@ coff_load_file(struct thread *td, char *name) if (vm_map_remove(kernel_map, (vm_offset_t) ptr, (vm_offset_t) ptr + PAGE_SIZE)) - panic(__FUNCTION__ " vm_map_remove failed"); + panic("%s vm_map_remove failed", __func__); fail: VOP_UNLOCK(vp, 0, td); diff --git a/sys/i386/include/i4b_debug.h b/sys/i386/include/i4b_debug.h index d9380f7..084623a 100644 --- a/sys/i386/include/i4b_debug.h +++ b/sys/i386/include/i4b_debug.h @@ -51,19 +51,19 @@ extern unsigned int i4b_l4_debug; #define NDBGL1(bits, fmt, args...) \ if(bits & i4b_l1_debug) \ - { printf("i4b-L1 %s: " fmt "\n", __FUNCTION__ , ##args ); } + { printf("i4b-L1 %s: " fmt "\n", __func__ , ##args ); } #define NDBGL2(bits, fmt, args...) \ if(bits & i4b_l2_debug) \ - { printf("i4b-L2 %s: " fmt "\n", __FUNCTION__ , ##args ); } + { printf("i4b-L2 %s: " fmt "\n", __func__ , ##args ); } #define NDBGL3(bits, fmt, args...) \ if(bits & i4b_l3_debug) \ - { printf("i4b-L3 %s: " fmt "\n", __FUNCTION__ , ##args ); } + { printf("i4b-L3 %s: " fmt "\n", __func__ , ##args ); } #define NDBGL4(bits, fmt, args...) \ if(bits & i4b_l4_debug) \ - { printf("i4b-L4 %s: " fmt "\n", __FUNCTION__ , ##args ); } + { printf("i4b-L4 %s: " fmt "\n", __func__ , ##args ); } #else /* !DO_I4B_DEBUG */ diff --git a/sys/i386/isa/pcf.c b/sys/i386/isa/pcf.c index b30b2c6..e4f8a69 100644 --- a/sys/i386/isa/pcf.c +++ b/sys/i386/isa/pcf.c @@ -468,7 +468,7 @@ pcfintr(void *arg) break; default: - panic("%s: unknown slave mode (%d)!", __FUNCTION__, + panic("%s: unknown slave mode (%d)!", __func__, pcf->pcf_slave_mode); } diff --git a/sys/i4b/include/i4b_debug.h b/sys/i4b/include/i4b_debug.h index d9380f7..084623a 100644 --- a/sys/i4b/include/i4b_debug.h +++ b/sys/i4b/include/i4b_debug.h @@ -51,19 +51,19 @@ extern unsigned int i4b_l4_debug; #define NDBGL1(bits, fmt, args...) \ if(bits & i4b_l1_debug) \ - { printf("i4b-L1 %s: " fmt "\n", __FUNCTION__ , ##args ); } + { printf("i4b-L1 %s: " fmt "\n", __func__ , ##args ); } #define NDBGL2(bits, fmt, args...) \ if(bits & i4b_l2_debug) \ - { printf("i4b-L2 %s: " fmt "\n", __FUNCTION__ , ##args ); } + { printf("i4b-L2 %s: " fmt "\n", __func__ , ##args ); } #define NDBGL3(bits, fmt, args...) \ if(bits & i4b_l3_debug) \ - { printf("i4b-L3 %s: " fmt "\n", __FUNCTION__ , ##args ); } + { printf("i4b-L3 %s: " fmt "\n", __func__ , ##args ); } #define NDBGL4(bits, fmt, args...) \ if(bits & i4b_l4_debug) \ - { printf("i4b-L4 %s: " fmt "\n", __FUNCTION__ , ##args ); } + { printf("i4b-L4 %s: " fmt "\n", __func__ , ##args ); } #else /* !DO_I4B_DEBUG */ diff --git a/sys/ia64/conf/GENERIC b/sys/ia64/conf/GENERIC index 3d479e8..2e996ac 100644 --- a/sys/ia64/conf/GENERIC +++ b/sys/ia64/conf/GENERIC @@ -150,7 +150,7 @@ device tun # Packet tunnel. device pty # Pseudo-ttys (telnet etc) device md # Memory "disks" device gif # IPv6 and IPv4 tunneling -device faith # IPv6-to-IPv4 relaying/(translation) +device faith # IPv6-to-IPv4 relaying (translation) # The `bpf' device enables the Berkeley Packet Filter. # Be aware of the administrative consequences of enabling this! @@ -170,3 +170,6 @@ device ums # Mouse device aue # ADMtek USB ethernet device cue # CATC USB ethernet device kue # Kawasaki LSI USB ethernet + +# Tempary things until things are farther along. +makeoptions NO_MODULES=useless_for_now diff --git a/sys/isa/ppc.c b/sys/isa/ppc.c index c36b982..9a535c4 100644 --- a/sys/isa/ppc.c +++ b/sys/isa/ppc.c @@ -198,7 +198,7 @@ ppc_detect_fifo(struct ppc_data *ppc) /* XXX 16 and 32 bits implementations not supported */ if (ppc->ppc_pword != PPC_PWORD_8) { - LOG_PPC(__FUNCTION__, ppc, "PWord not supported"); + LOG_PPC(__func__, ppc, "PWord not supported"); goto error; } @@ -217,7 +217,7 @@ ppc_detect_fifo(struct ppc_data *ppc) } if (i >= 1024) { - LOG_PPC(__FUNCTION__, ppc, "can't flush FIFO"); + LOG_PPC(__func__, ppc, "can't flush FIFO"); goto error; } @@ -240,7 +240,7 @@ ppc_detect_fifo(struct ppc_data *ppc) } if (i >= 1024) { - LOG_PPC(__FUNCTION__, ppc, "can't fill FIFO"); + LOG_PPC(__func__, ppc, "can't fill FIFO"); goto error; } @@ -253,7 +253,7 @@ ppc_detect_fifo(struct ppc_data *ppc) */ for (i=ppc->ppc_fifo; i>0; i--) { if (r_fifo(ppc) != (char)(ppc->ppc_fifo-i)) { - LOG_PPC(__FUNCTION__, ppc, "invalid data in FIFO"); + LOG_PPC(__func__, ppc, "invalid data in FIFO"); goto error; } if (r_ecr(ppc) & PPC_SERVICE_INTR) { @@ -262,14 +262,14 @@ ppc_detect_fifo(struct ppc_data *ppc) } /* if FIFO empty before the last byte, error */ if (i>1 && (r_ecr(ppc) & PPC_FIFO_EMPTY)) { - LOG_PPC(__FUNCTION__, ppc, "data lost in FIFO"); + LOG_PPC(__func__, ppc, "data lost in FIFO"); goto error; } } /* FIFO must be empty after the last byte */ if (!(r_ecr(ppc) & PPC_FIFO_EMPTY)) { - LOG_PPC(__FUNCTION__, ppc, "can't empty the FIFO"); + LOG_PPC(__func__, ppc, "can't empty the FIFO"); goto error; } @@ -1148,7 +1148,7 @@ found: printf(" ECP+EPP SPP"); break; default: - printf("%s: unknown case (0x%x)!\n", __FUNCTION__, r); + printf("%s: unknown case (0x%x)!\n", __func__, r); } } else { @@ -1499,7 +1499,7 @@ ppc_exec_microseq(device_t dev, struct ppb_microseq **p_msq) case MS_OP_CALL: if (stack) - panic("%s: too much calls", __FUNCTION__); + panic("%s: too much calls", __func__); if (mi->arg[0].p) { /* store the state of the actual @@ -1533,7 +1533,7 @@ ppc_exec_microseq(device_t dev, struct ppb_microseq **p_msq) * of a submicrosequence */ if (stack) panic("%s: can't return to ppb level", - __FUNCTION__); + __func__); /* update pc for ppb level of execution */ *p_msq = mi; @@ -1543,7 +1543,7 @@ ppc_exec_microseq(device_t dev, struct ppb_microseq **p_msq) default: panic("%s: unknown microsequence opcode 0x%x", - __FUNCTION__, mi->opcode); + __func__, mi->opcode); } } @@ -2077,7 +2077,7 @@ ppc_io(device_t ppcdev, int iop, u_char *addr, int cnt, u_char byte) w_fifo(ppc, byte); break; default: - panic("%s: unknown I/O operation", __FUNCTION__); + panic("%s: unknown I/O operation", __func__); break; } diff --git a/sys/net/if_ef.c b/sys/net/if_ef.c index 5e85819..5caf365 100644 --- a/sys/net/if_ef.c +++ b/sys/net/if_ef.c @@ -69,12 +69,12 @@ #define EF_NFT 4 /* total number of frame types */ #ifdef EF_DEBUG -#define EFDEBUG(format, args...) printf("%s: "format, __FUNCTION__ ,## args) +#define EFDEBUG(format, args...) printf("%s: "format, __func__ ,## args) #else #define EFDEBUG(format, args...) #endif -#define EFERROR(format, args...) printf("%s: "format, __FUNCTION__ ,## args) +#define EFERROR(format, args...) printf("%s: "format, __func__ ,## args) struct efnet { struct arpcom ef_ac; diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c index 3351c22..7b2b365 100644 --- a/sys/net/if_ethersubr.c +++ b/sys/net/if_ethersubr.c @@ -665,7 +665,7 @@ ether_ifattach(ifp, bpf) ifp->if_baudrate = 10000000; ifp->if_broadcastaddr = etherbroadcastaddr; ifa = ifaddr_byindex(ifp->if_index); - KASSERT(ifa != NULL, ("%s: no lladdr!\n", __FUNCTION__)); + KASSERT(ifa != NULL, ("%s: no lladdr!\n", __func__)); sdl = (struct sockaddr_dl *)ifa->ifa_addr; sdl->sdl_type = IFT_ETHER; sdl->sdl_alen = ifp->if_addrlen; diff --git a/sys/netgraph/ng_UI.c b/sys/netgraph/ng_UI.c index fdf03bd..e0733bc 100644 --- a/sys/netgraph/ng_UI.c +++ b/sys/netgraph/ng_UI.c @@ -200,7 +200,7 @@ ng_UI_rcvdata(hook_p hook, item_p item) mtod(m, u_char *)[0] = HDLC_UI; NG_FWD_NEW_DATA(error, item, priv->downlink, m); /* m -> NULL */ } else - panic(__FUNCTION__); + panic(__func__); done: NG_FREE_M(m); /* does nothing if m == NULL */ @@ -237,7 +237,7 @@ ng_UI_disconnect(hook_p hook) else if (hook == priv->uplink) priv->uplink = NULL; else - panic(__FUNCTION__); + panic(__func__); /* * If we are not already shutting down, * and we have no more hooks, then DO shut down. diff --git a/sys/netgraph/ng_async.c b/sys/netgraph/ng_async.c index 9208447..f88fd70 100644 --- a/sys/netgraph/ng_async.c +++ b/sys/netgraph/ng_async.c @@ -258,7 +258,7 @@ nga_rcvdata(hook_p hook, item_p item) return (nga_rcv_sync(sc, item)); if (hook == sc->async) return (nga_rcv_async(sc, item)); - panic(__FUNCTION__); + panic(__func__); } /* @@ -374,9 +374,9 @@ nga_disconnect(hook_p hook) else if (hook == sc->sync) hookp = &sc->sync; else - panic(__FUNCTION__); + panic(__func__); if (!*hookp) - panic(__FUNCTION__ "2"); + panic("%s 2", __func__); *hookp = NULL; bzero(&sc->stats, sizeof(sc->stats)); sc->lasttime = 0; diff --git a/sys/netgraph/ng_base.c b/sys/netgraph/ng_base.c index af11cb9..00b316b 100644 --- a/sys/netgraph/ng_base.c +++ b/sys/netgraph/ng_base.c @@ -336,12 +336,12 @@ static ng_ID_t nextID = 1; int total; \ \ if (((m)->m_flags & M_PKTHDR) == 0) \ - panic("%s: !PKTHDR", __FUNCTION__); \ + panic("%s: !PKTHDR", __func__); \ for (total = 0, n = (m); n != NULL; n = n->m_next) \ total += n->m_len; \ if ((m)->m_pkthdr.len != total) { \ panic("%s: %d != %d", \ - __FUNCTION__, (m)->m_pkthdr.len, total); \ + __func__, (m)->m_pkthdr.len, total); \ } \ } while (0) #else @@ -2590,7 +2590,7 @@ ng_generic_msg(node_p here, item_p item, hook_p lasthook) if (ni->hooks >= nhooks) { log(LOG_ERR, "%s: number of %s changed\n", - __FUNCTION__, "hooks"); + __func__, "hooks"); break; } if (NG_HOOK_NOT_VALID(hook)) @@ -2645,7 +2645,7 @@ ng_generic_msg(node_p here, item_p item, hook_p lasthook) if (nl->numnames >= num) { log(LOG_ERR, "%s: number of %s changed\n", - __FUNCTION__, "nodes"); + __func__, "nodes"); break; } if (NG_NODE_NOT_VALID(node)) @@ -2693,7 +2693,7 @@ ng_generic_msg(node_p here, item_p item, hook_p lasthook) if (tl->numtypes >= num) { log(LOG_ERR, "%s: number of %s changed\n", - __FUNCTION__, "types"); + __func__, "types"); break; } strncpy(tp->type_name, type->name, NG_TYPELEN); diff --git a/sys/netgraph/ng_bpf.c b/sys/netgraph/ng_bpf.c index 54a6325..8977cec 100644 --- a/sys/netgraph/ng_bpf.c +++ b/sys/netgraph/ng_bpf.c @@ -460,7 +460,7 @@ ng_bpf_disconnect(hook_p hook) { const hinfo_p hip = NG_HOOK_PRIVATE(hook); - KASSERT(hip != NULL, ("%s: null info", __FUNCTION__)); + KASSERT(hip != NULL, ("%s: null info", __func__)); FREE(hip->prog, M_NETGRAPH_BPF); bzero(hip, sizeof(*hip)); FREE(hip, M_NETGRAPH_BPF); diff --git a/sys/netgraph/ng_bridge.c b/sys/netgraph/ng_bridge.c index b549517..9d93201 100644 --- a/sys/netgraph/ng_bridge.c +++ b/sys/netgraph/ng_bridge.c @@ -533,9 +533,9 @@ ng_bridge_rcvdata(hook_p hook, item_p item) /* Get link number */ linkNum = (int)NG_HOOK_PRIVATE(hook); KASSERT(linkNum >= 0 && linkNum < NG_BRIDGE_MAX_LINKS, - ("%s: linkNum=%u", __FUNCTION__, linkNum)); + ("%s: linkNum=%u", __func__, linkNum)); link = priv->links[linkNum]; - KASSERT(link != NULL, ("%s: link%d null", __FUNCTION__, linkNum)); + KASSERT(link != NULL, ("%s: link%d null", __func__, linkNum)); /* Sanity check packet and pull up header */ if (m->m_pkthdr.len < ETHER_HDR_LEN) { @@ -654,7 +654,7 @@ ng_bridge_rcvdata(hook_p hook, item_p item) /* If destination same as incoming link, do nothing */ KASSERT(destLink != NULL, - ("%s: link%d null", __FUNCTION__, host->linkNum)); + ("%s: link%d null", __func__, host->linkNum)); if (destLink == link) { NG_FREE_ITEM(item); NG_FREE_M(m); @@ -768,7 +768,7 @@ ng_bridge_shutdown(node_p node) KASSERT(priv->numLinks == 0 && priv->numHosts == 0, ("%s: numLinks=%d numHosts=%d", - __FUNCTION__, priv->numLinks, priv->numHosts)); + __func__, priv->numLinks, priv->numHosts)); FREE(priv->tab, M_NETGRAPH_BRIDGE); FREE(priv, M_NETGRAPH_BRIDGE); NG_NODE_SET_PRIVATE(node, NULL); @@ -788,13 +788,13 @@ ng_bridge_disconnect(hook_p hook) /* Get link number */ linkNum = (int)NG_HOOK_PRIVATE(hook); KASSERT(linkNum >= 0 && linkNum < NG_BRIDGE_MAX_LINKS, - ("%s: linkNum=%u", __FUNCTION__, linkNum)); + ("%s: linkNum=%u", __func__, linkNum)); /* Remove all hosts associated with this link */ ng_bridge_remove_hosts(priv, linkNum); /* Free associated link information */ - KASSERT(priv->links[linkNum] != NULL, ("%s: no link", __FUNCTION__)); + KASSERT(priv->links[linkNum] != NULL, ("%s: no link", __func__)); FREE(priv->links[linkNum], M_NETGRAPH_BRIDGE); priv->links[linkNum] = NULL; priv->numLinks--; @@ -851,7 +851,7 @@ ng_bridge_put(priv_p priv, const u_char *addr, int linkNum) /* Assert that entry does not already exist in hashtable */ SLIST_FOREACH(hent, &priv->tab[bucket], next) { KASSERT(!ETHER_EQUAL(hent->host.addr, addr), - ("%s: entry %6D exists in table", __FUNCTION__, addr, ":")); + ("%s: entry %6D exists in table", __func__, addr, ":")); } #endif @@ -998,7 +998,7 @@ ng_bridge_timeout(void *arg) /* Make sure host's link really exists */ KASSERT(priv->links[hent->host.linkNum] != NULL, ("%s: host %6D on nonexistent link %d\n", - __FUNCTION__, hent->host.addr, ":", + __func__, hent->host.addr, ":", hent->host.linkNum)); /* Remove hosts we haven't heard from in a while */ @@ -1015,7 +1015,7 @@ ng_bridge_timeout(void *arg) } } KASSERT(priv->numHosts == counter, - ("%s: hosts: %d != %d", __FUNCTION__, priv->numHosts, counter)); + ("%s: hosts: %d != %d", __func__, priv->numHosts, counter)); /* Decrease table size if necessary */ ng_bridge_rehash(priv); @@ -1038,7 +1038,7 @@ ng_bridge_timeout(void *arg) } } KASSERT(priv->numLinks == counter, - ("%s: links: %d != %d", __FUNCTION__, priv->numLinks, counter)); + ("%s: links: %d != %d", __func__, priv->numLinks, counter)); /* Done */ splx(s); diff --git a/sys/netgraph/ng_eiface.c b/sys/netgraph/ng_eiface.c index 2959d93..26e5f1d 100644 --- a/sys/netgraph/ng_eiface.c +++ b/sys/netgraph/ng_eiface.c @@ -163,7 +163,7 @@ ng_eiface_get_unit(int *unit) } bit = ffs(ng_eiface_units[index]) - 1; KASSERT(bit >= 0 && bit <= UNITS_BITSPERWORD - 1, - ("%s: word=%d bit=%d", __FUNCTION__, ng_eiface_units[index], bit)); + ("%s: word=%d bit=%d", __func__, ng_eiface_units[index], bit)); ng_eiface_units[index] &= ~(1 << bit); *unit = (index * UNITS_BITSPERWORD) + bit; ng_units_in_use++; @@ -181,9 +181,9 @@ ng_eiface_free_unit(int unit) index = unit / UNITS_BITSPERWORD; bit = unit % UNITS_BITSPERWORD; KASSERT(index < ng_eiface_units_len, - ("%s: unit=%d len=%d", __FUNCTION__, unit, ng_eiface_units_len)); + ("%s: unit=%d len=%d", __func__, unit, ng_eiface_units_len)); KASSERT((ng_eiface_units[index] & (1 << bit)) == 0, - ("%s: unit=%d is free", __FUNCTION__, unit)); + ("%s: unit=%d is free", __func__, unit)); ng_eiface_units[index] |= (1 << bit); /* * XXX We could think about reducing the size of ng_eiface_units[] diff --git a/sys/netgraph/ng_ether.c b/sys/netgraph/ng_ether.c index 69e1b35..a3c14e9 100644 --- a/sys/netgraph/ng_ether.c +++ b/sys/netgraph/ng_ether.c @@ -297,11 +297,11 @@ ng_ether_attach(struct ifnet *ifp) node_p node; /* Create node */ - KASSERT(!IFP2NG(ifp), ("%s: node already exists?", __FUNCTION__)); + KASSERT(!IFP2NG(ifp), ("%s: node already exists?", __func__)); snprintf(name, sizeof(name), "%s%d", ifp->if_name, ifp->if_unit); if (ng_make_node_common(&ng_ether_typestruct, &node) != 0) { log(LOG_ERR, "%s: can't %s for %s\n", - __FUNCTION__, "create node", name); + __func__, "create node", name); return; } @@ -309,7 +309,7 @@ ng_ether_attach(struct ifnet *ifp) MALLOC(priv, priv_p, sizeof(*priv), M_NETGRAPH, M_NOWAIT | M_ZERO); if (priv == NULL) { log(LOG_ERR, "%s: can't %s for %s\n", - __FUNCTION__, "allocate memory", name); + __func__, "allocate memory", name); NG_NODE_UNREF(node); return; } @@ -321,7 +321,7 @@ ng_ether_attach(struct ifnet *ifp) /* Try to give the node the same name as the interface */ if (ng_name_node(node, name) != 0) { log(LOG_WARNING, "%s: can't name node %s\n", - __FUNCTION__, name); + __func__, name); } } @@ -608,7 +608,7 @@ ng_ether_rcvdata(hook_p hook, item_p item) return ng_ether_rcv_lower(node, m, meta); if (hook == priv->upper) return ng_ether_rcv_upper(node, m, meta); - panic("%s: weird hook", __FUNCTION__); + panic("%s: weird hook", __func__); #ifdef RESTARTABLE_PANICS /* so we don;t get an error msg in LINT */ return NULL; #endif @@ -721,7 +721,7 @@ ng_ether_disconnect(hook_p hook) priv->lower = NULL; priv->lowerOrphan = 0; } else - panic("%s: weird hook", __FUNCTION__); + panic("%s: weird hook", __func__); if ((NG_NODE_NUMHOOKS(NG_HOOK_NODE(hook)) == 0) && (NG_NODE_IS_VALID(NG_HOOK_NODE(hook)))) ng_rmnode_self(NG_HOOK_NODE(hook)); /* reset node */ diff --git a/sys/netgraph/ng_frame_relay.c b/sys/netgraph/ng_frame_relay.c index b82831e..dc55592 100644 --- a/sys/netgraph/ng_frame_relay.c +++ b/sys/netgraph/ng_frame_relay.c @@ -400,7 +400,7 @@ ngfrm_rcvdata(hook_p hook, item_p item) data[3] |= BYTEX_EA; break; default: - panic(__FUNCTION__); + panic(__func__); } /* Send it */ diff --git a/sys/netgraph/ng_gif.c b/sys/netgraph/ng_gif.c index 7661dad..c2c87eb 100644 --- a/sys/netgraph/ng_gif.c +++ b/sys/netgraph/ng_gif.c @@ -232,11 +232,11 @@ ng_gif_attach(struct ifnet *ifp) node_p node; /* Create node */ - KASSERT(!IFP2NG(ifp), ("%s: node already exists?", __FUNCTION__)); + KASSERT(!IFP2NG(ifp), ("%s: node already exists?", __func__)); snprintf(name, sizeof(name), "%s%d", ifp->if_name, ifp->if_unit); if (ng_make_node_common(&ng_gif_typestruct, &node) != 0) { log(LOG_ERR, "%s: can't %s for %s\n", - __FUNCTION__, "create node", name); + __func__, "create node", name); return; } @@ -244,7 +244,7 @@ ng_gif_attach(struct ifnet *ifp) MALLOC(priv, priv_p, sizeof(*priv), M_NETGRAPH, M_NOWAIT | M_ZERO); if (priv == NULL) { log(LOG_ERR, "%s: can't %s for %s\n", - __FUNCTION__, "allocate memory", name); + __func__, "allocate memory", name); NG_NODE_UNREF(node); return; } @@ -255,7 +255,7 @@ ng_gif_attach(struct ifnet *ifp) /* Try to give the node the same name as the interface */ if (ng_name_node(node, name) != 0) { log(LOG_WARNING, "%s: can't name node %s\n", - __FUNCTION__, name); + __func__, name); } } @@ -451,7 +451,7 @@ ng_gif_rcvdata(hook_p hook, item_p item) NG_FREE_ITEM(item); if (hook == priv->lower) return ng_gif_rcv_lower(node, m, meta); - panic("%s: weird hook", __FUNCTION__); + panic("%s: weird hook", __func__); } /* @@ -527,7 +527,7 @@ ng_gif_disconnect(hook_p hook) priv->lower = NULL; priv->lowerOrphan = 0; } else - panic("%s: weird hook", __FUNCTION__); + panic("%s: weird hook", __func__); if ((NG_NODE_NUMHOOKS(NG_HOOK_NODE(hook)) == 0) && (NG_NODE_IS_VALID(NG_HOOK_NODE(hook)))) ng_rmnode_self(NG_HOOK_NODE(hook)); /* reset node */ diff --git a/sys/netgraph/ng_gif_demux.c b/sys/netgraph/ng_gif_demux.c index 9a5aab7..066bea6 100644 --- a/sys/netgraph/ng_gif_demux.c +++ b/sys/netgraph/ng_gif_demux.c @@ -393,7 +393,7 @@ ng_gif_demux_disconnect(hook_p hook) else { iffam = get_iffam_from_hook(priv, hook); if (iffam == NULL) - panic(__FUNCTION__); + panic(__func__); *get_hook_from_iffam(priv, iffam) = NULL; } diff --git a/sys/netgraph/ng_iface.c b/sys/netgraph/ng_iface.c index 384f328..2486fbd 100644 --- a/sys/netgraph/ng_iface.c +++ b/sys/netgraph/ng_iface.c @@ -302,7 +302,7 @@ ng_iface_get_unit(int *unit) } bit = ffs(ng_iface_units[index]) - 1; KASSERT(bit >= 0 && bit <= UNITS_BITSPERWORD - 1, - ("%s: word=%d bit=%d", __FUNCTION__, ng_iface_units[index], bit)); + ("%s: word=%d bit=%d", __func__, ng_iface_units[index], bit)); ng_iface_units[index] &= ~(1 << bit); *unit = (index * UNITS_BITSPERWORD) + bit; ng_units_in_use++; @@ -320,9 +320,9 @@ ng_iface_free_unit(int unit) index = unit / UNITS_BITSPERWORD; bit = unit % UNITS_BITSPERWORD; KASSERT(index < ng_iface_units_len, - ("%s: unit=%d len=%d", __FUNCTION__, unit, ng_iface_units_len)); + ("%s: unit=%d len=%d", __func__, unit, ng_iface_units_len)); KASSERT((ng_iface_units[index] & (1 << bit)) == 0, - ("%s: unit=%d is free", __FUNCTION__, unit)); + ("%s: unit=%d is free", __func__, unit)); ng_iface_units[index] |= (1 << bit); /* * XXX We could think about reducing the size of ng_iface_units[] @@ -471,7 +471,7 @@ ng_iface_output(struct ifnet *ifp, struct mbuf *m, static void ng_iface_start(struct ifnet *ifp) { - printf("%s%d: %s called?", ifp->if_name, ifp->if_unit, __FUNCTION__); + printf("%s%d: %s called?", ifp->if_name, ifp->if_unit, __func__); } /* @@ -484,7 +484,7 @@ ng_iface_bpftap(struct ifnet *ifp, struct mbuf *m, sa_family_t family) int32_t family4 = (int32_t)family; struct mbuf m0; - KASSERT(family != AF_UNSPEC, ("%s: family=AF_UNSPEC", __FUNCTION__)); + KASSERT(family != AF_UNSPEC, ("%s: family=AF_UNSPEC", __func__)); if (ifp->if_bpf != NULL) { bzero(&m0, sizeof(m0)); m0.m_next = m; @@ -733,8 +733,8 @@ ng_iface_rcvdata(hook_p hook, item_p item) NGI_GET_M(item, m); NG_FREE_ITEM(item); /* Sanity checks */ - KASSERT(iffam != NULL, ("%s: iffam", __FUNCTION__)); - KASSERT(m->m_flags & M_PKTHDR, ("%s: not pkthdr", __FUNCTION__)); + KASSERT(iffam != NULL, ("%s: iffam", __func__)); + KASSERT(m->m_flags & M_PKTHDR, ("%s: not pkthdr", __func__)); if (m == NULL) return (EINVAL); if ((ifp->if_flags & IFF_UP) == 0) { @@ -786,7 +786,7 @@ ng_iface_disconnect(hook_p hook) const iffam_p iffam = get_iffam_from_hook(priv, hook); if (iffam == NULL) - panic(__FUNCTION__); + panic(__func__); *get_hook_from_iffam(priv, iffam) = NULL; return (0); } diff --git a/sys/netgraph/ng_ksocket.c b/sys/netgraph/ng_ksocket.c index a642122..f945f6a 100644 --- a/sys/netgraph/ng_ksocket.c +++ b/sys/netgraph/ng_ksocket.c @@ -965,7 +965,7 @@ static int ng_ksocket_disconnect(hook_p hook) { KASSERT(NG_NODE_NUMHOOKS(NG_HOOK_NODE(hook)) == 0, - ("%s: numhooks=%d?", __FUNCTION__, + ("%s: numhooks=%d?", __func__, NG_NODE_NUMHOOKS(NG_HOOK_NODE(hook)))); if (NG_NODE_IS_VALID(NG_HOOK_NODE(hook))) ng_rmnode_self(NG_HOOK_NODE(hook)); @@ -1032,7 +1032,7 @@ ng_ksocket_incoming2(node_p node, hook_p hook, void *arg1, int waitflag) return; } /* so = priv->so; *//* XXX could have derived this like so */ - KASSERT(so == priv->so, ("%s: wrong socket", __FUNCTION__)); + KASSERT(so == priv->so, ("%s: wrong socket", __func__)); /* Check whether a pending connect operation has completed */ if (priv->flags & KSF_CONNECTING) { diff --git a/sys/netgraph/ng_mppc.c b/sys/netgraph/ng_mppc.c index a1d6ce8..5f44386 100644 --- a/sys/netgraph/ng_mppc.c +++ b/sys/netgraph/ng_mppc.c @@ -387,7 +387,7 @@ ng_mppc_rcvdata(hook_p hook, item_p item) } /* Oops */ - panic("%s: unknown hook", __FUNCTION__); + panic("%s: unknown hook", __func__); #ifdef RESTARTABLE_PANICS return (EINVAL); #endif @@ -499,7 +499,7 @@ ng_mppc_compress(node_p node, struct mbuf *m, struct mbuf **resultp) &destCnt, d->history, flags, 0); /* Check return value */ - KASSERT(rtn != MPPC_INVALID, ("%s: invalid", __FUNCTION__)); + KASSERT(rtn != MPPC_INVALID, ("%s: invalid", __func__)); if ((rtn & MPPC_EXPANDED) == 0 && (rtn & MPPC_COMP_OK) == MPPC_COMP_OK) { outlen -= destCnt; @@ -587,7 +587,7 @@ ng_mppc_decompress(node_p node, struct mbuf *m, struct mbuf **resultp) /* Check for insane jumps in sequence numbering (D.O.S. attack) */ numLost = ((cc - d->cc) & MPPC_CCOUNT_MASK); if (numLost >= MPPC_INSANE_JUMP) { - log(LOG_ERR, "%s: insane jump %d", __FUNCTION__, numLost); + log(LOG_ERR, "%s: insane jump %d", __func__, numLost); priv->recv.cfg.enable = 0; goto failed; } @@ -631,7 +631,7 @@ ng_mppc_decompress(node_p node, struct mbuf *m, struct mbuf **resultp) /* Are we not expecting encryption? */ if ((d->cfg.bits & MPPE_BITS) == 0) { log(LOG_ERR, "%s: rec'd unexpectedly %s packet", - __FUNCTION__, "encrypted"); + __func__, "encrypted"); goto failed; } @@ -651,7 +651,7 @@ ng_mppc_decompress(node_p node, struct mbuf *m, struct mbuf **resultp) /* Are we expecting encryption? */ if ((d->cfg.bits & MPPE_BITS) != 0) { log(LOG_ERR, "%s: rec'd unexpectedly %s packet", - __FUNCTION__, "unencrypted"); + __func__, "unencrypted"); goto failed; } } @@ -663,7 +663,7 @@ ng_mppc_decompress(node_p node, struct mbuf *m, struct mbuf **resultp) if ((header & MPPC_FLAG_COMPRESSED) != 0 && (d->cfg.bits & MPPC_BIT) == 0) { log(LOG_ERR, "%s: rec'd unexpectedly %s packet", - __FUNCTION__, "compressed"); + __func__, "compressed"); failed: FREE(buf, M_NETGRAPH_MPPC); return (EINVAL); @@ -699,11 +699,11 @@ failed: &sourceCnt, &destCnt, d->history, flags); /* Check return value */ - KASSERT(rtn != MPPC_INVALID, ("%s: invalid", __FUNCTION__)); + KASSERT(rtn != MPPC_INVALID, ("%s: invalid", __func__)); if ((rtn & MPPC_DEST_EXHAUSTED) != 0 || (rtn & MPPC_DECOMP_OK) != MPPC_DECOMP_OK) { log(LOG_ERR, "%s: decomp returned 0x%x", - __FUNCTION__, rtn); + __func__, rtn); FREE(decompbuf, M_NETGRAPH_MPPC); goto failed; } diff --git a/sys/netgraph/ng_one2many.c b/sys/netgraph/ng_one2many.c index ead577a..da1c7eb 100644 --- a/sys/netgraph/ng_one2many.c +++ b/sys/netgraph/ng_one2many.c @@ -391,12 +391,12 @@ ng_one2many_rcvdata(hook_p hook, item_p item) linkNum = (int)NG_HOOK_PRIVATE(hook); KASSERT(linkNum == NG_ONE2MANY_ONE_LINKNUM || (linkNum >= 0 && linkNum < NG_ONE2MANY_MAX_LINKS), - ("%s: linkNum=%d", __FUNCTION__, linkNum)); + ("%s: linkNum=%d", __func__, linkNum)); /* Figure out source link */ src = (linkNum == NG_ONE2MANY_ONE_LINKNUM) ? &priv->one : &priv->many[linkNum]; - KASSERT(src->hook != NULL, ("%s: no src%d", __FUNCTION__, linkNum)); + KASSERT(src->hook != NULL, ("%s: no src%d", __func__, linkNum)); /* Update receive stats */ src->stats.recvPackets++; @@ -450,7 +450,7 @@ ng_one2many_rcvdata(hook_p hook, item_p item) break; #ifdef INVARIANTS default: - panic("%s: invalid xmitAlg", __FUNCTION__); + panic("%s: invalid xmitAlg", __func__); #endif } } else { @@ -475,7 +475,7 @@ ng_one2many_shutdown(node_p node) const priv_p priv = NG_NODE_PRIVATE(node); KASSERT(priv->numActiveMany == 0, - ("%s: numActiveMany=%d", __FUNCTION__, priv->numActiveMany)); + ("%s: numActiveMany=%d", __func__, priv->numActiveMany)); FREE(priv, M_NETGRAPH); NG_NODE_SET_PRIVATE(node, NULL); NG_NODE_UNREF(node); @@ -495,7 +495,7 @@ ng_one2many_disconnect(hook_p hook) linkNum = (int)NG_HOOK_PRIVATE(hook); KASSERT(linkNum == NG_ONE2MANY_ONE_LINKNUM || (linkNum >= 0 && linkNum < NG_ONE2MANY_MAX_LINKS), - ("%s: linkNum=%d", __FUNCTION__, linkNum)); + ("%s: linkNum=%d", __func__, linkNum)); /* Nuke the link */ if (linkNum == NG_ONE2MANY_ONE_LINKNUM) @@ -538,7 +538,7 @@ ng_one2many_update_many(priv_p priv) break; #ifdef INVARIANTS default: - panic("%s: invalid failAlg", __FUNCTION__); + panic("%s: invalid failAlg", __func__); #endif } } @@ -553,7 +553,7 @@ ng_one2many_update_many(priv_p priv) break; #ifdef INVARIANTS default: - panic("%s: invalid xmitAlg", __FUNCTION__); + panic("%s: invalid xmitAlg", __func__); #endif } } diff --git a/sys/netgraph/ng_parse.c b/sys/netgraph/ng_parse.c index fa29c6b..a69cfa6 100644 --- a/sys/netgraph/ng_parse.c +++ b/sys/netgraph/ng_parse.c @@ -377,7 +377,7 @@ ng_int8_unparse(const struct ng_parse_type *type, fval = (u_int8_t)val; break; default: - panic("%s: unknown type", __FUNCTION__); + panic("%s: unknown type", __func__); #ifdef RESTARTABLE_PANICS return(0); #endif @@ -474,7 +474,7 @@ ng_int16_unparse(const struct ng_parse_type *type, fval = (u_int16_t)val; break; default: - panic("%s: unknown type", __FUNCTION__); + panic("%s: unknown type", __func__); #ifdef RESTARTABLE_PANICS return(0); #endif @@ -571,7 +571,7 @@ ng_int32_unparse(const struct ng_parse_type *type, fval = (u_int32_t)val; break; default: - panic("%s: unknown type", __FUNCTION__); + panic("%s: unknown type", __func__); #ifdef RESTARTABLE_PANICS return(0); #endif @@ -667,7 +667,7 @@ ng_int64_unparse(const struct ng_parse_type *type, fval = (u_int64_t)val; break; default: - panic("%s: unknown type", __FUNCTION__); + panic("%s: unknown type", __func__); #ifdef RESTARTABLE_PANICS return(0); #endif @@ -1411,7 +1411,7 @@ ng_get_composite_elem_default(const struct ng_parse_type *type, break; } default: - panic("%s", __FUNCTION__); + panic("%s", __func__); } /* Default to element type default */ @@ -1458,7 +1458,7 @@ ng_get_composite_len(const struct ng_parse_type *type, return fi->length; } default: - panic("%s", __FUNCTION__); + panic("%s", __func__); } return (0); } @@ -1495,7 +1495,7 @@ ng_get_composite_etype(const struct ng_parse_type *type, break; } default: - panic("%s", __FUNCTION__); + panic("%s", __func__); } return (etype); } diff --git a/sys/netgraph/ng_ppp.c b/sys/netgraph/ng_ppp.c index c2bb76a..5cc71ba 100644 --- a/sys/netgraph/ng_ppp.c +++ b/sys/netgraph/ng_ppp.c @@ -606,7 +606,7 @@ ng_ppp_rcvdata(hook_p hook, item_p item) /* Convert index into a link number */ linkNum = (u_int16_t)~index; KASSERT(linkNum < NG_PPP_MAX_LINKS, - ("%s: bogus index 0x%x", __FUNCTION__, index)); + ("%s: bogus index 0x%x", __func__, index)); link = &priv->links[linkNum]; /* Stats */ @@ -732,7 +732,7 @@ ng_ppp_rcvdata(hook_p hook, item_p item) } break; default: - panic("%s: bogus index 0x%x", __FUNCTION__, index); + panic("%s: bogus index 0x%x", __func__, index); } /* Now figure out what to do with the frame */ @@ -1235,11 +1235,11 @@ ng_ppp_get_packet(node_p node, struct mbuf **mp, meta_p *metap) qent = TAILQ_FIRST(&priv->frags); KASSERT(!TAILQ_EMPTY(&priv->frags) && qent->first, - ("%s: no packet", __FUNCTION__)); + ("%s: no packet", __func__)); for (tail = NULL; qent != NULL; qent = qnext) { qnext = TAILQ_NEXT(qent, f_qent); KASSERT(!TAILQ_EMPTY(&priv->frags), - ("%s: empty q", __FUNCTION__)); + ("%s: empty q", __func__)); TAILQ_REMOVE(&priv->frags, qent, f_qent); if (tail == NULL) { tail = m = qent->data; @@ -1285,7 +1285,7 @@ ng_ppp_frag_trim(node_p node) break; qnext = TAILQ_NEXT(qent, f_qent); KASSERT(qnext != NULL, - ("%s: last frag < MSEQ?", __FUNCTION__)); + ("%s: last frag < MSEQ?", __func__)); if (qnext->seq != MP_NEXT_RECV_SEQ(priv, qent->seq) || qent->last || qnext->first) { dead = 1; @@ -1298,7 +1298,7 @@ ng_ppp_frag_trim(node_p node) /* Remove fragment and all others in the same packet */ while ((qent = TAILQ_FIRST(&priv->frags)) != qnext) { KASSERT(!TAILQ_EMPTY(&priv->frags), - ("%s: empty q", __FUNCTION__)); + ("%s: empty q", __func__)); priv->bundleStats.dropFragments++; TAILQ_REMOVE(&priv->frags, qent, f_qent); NG_FREE_M(qent->data); @@ -1348,7 +1348,7 @@ ng_ppp_frag_process(node_p node) /* Get oldest fragment */ KASSERT(!TAILQ_EMPTY(&priv->frags), - ("%s: empty q", __FUNCTION__)); + ("%s: empty q", __func__)); qent = TAILQ_FIRST(&priv->frags); /* Bump MSEQ if necessary */ @@ -1442,7 +1442,7 @@ ng_ppp_frag_checkstale(node_p node) /* Throw away junk fragments in front of the completed packet */ while ((qent = TAILQ_FIRST(&priv->frags)) != beg) { KASSERT(!TAILQ_EMPTY(&priv->frags), - ("%s: empty q", __FUNCTION__)); + ("%s: empty q", __func__)); priv->bundleStats.dropFragments++; TAILQ_REMOVE(&priv->frags, qent, f_qent); NG_FREE_M(qent->data); @@ -1491,9 +1491,9 @@ ng_ppp_frag_timeout(void *arg) } /* Reset timer state after timeout */ - KASSERT(priv->timerActive, ("%s: !timerActive", __FUNCTION__)); + KASSERT(priv->timerActive, ("%s: !timerActive", __func__)); priv->timerActive = 0; - KASSERT(node->nd_refs > 1, ("%s: nd_refs=%d", __FUNCTION__, node->nd_refs)); + KASSERT(node->nd_refs > 1, ("%s: nd_refs=%d", __func__, node->nd_refs)); NG_NODE_UNREF(node); /* Start timer again */ @@ -2076,7 +2076,7 @@ ng_ppp_stop_frag_timer(node_p node) untimeout(ng_ppp_frag_timeout, node, priv->fragTimer); priv->timerActive = 0; KASSERT(node->nd_refs > 1, - ("%s: nd_refs=%d", __FUNCTION__, node->nd_refs)); + ("%s: nd_refs=%d", __func__, node->nd_refs)); NG_NODE_UNREF(node); } } diff --git a/sys/netgraph/ng_pppoe.c b/sys/netgraph/ng_pppoe.c index 6c9800b..0a1e1b9 100644 --- a/sys/netgraph/ng_pppoe.c +++ b/sys/netgraph/ng_pppoe.c @@ -40,7 +40,7 @@ * $Whistle: ng_pppoe.c,v 1.10 1999/11/01 09:24:52 julian Exp $ */ #if 0 -#define AAA printf("pppoe: %s\n", __FUNCTION__ ); +#define AAA printf("pppoe: %s\n", __func__ ); #define BBB printf("-%d-", __LINE__ ); #else #define AAA diff --git a/sys/netgraph/ng_pptpgre.c b/sys/netgraph/ng_pptpgre.c index 6576efd..f531353 100644 --- a/sys/netgraph/ng_pptpgre.c +++ b/sys/netgraph/ng_pptpgre.c @@ -399,7 +399,7 @@ ng_pptpgre_rcvdata(hook_p hook, item_p item) return ng_pptpgre_xmit(node, item); if (hook == priv->lower) return ng_pptpgre_recv(node, item); - panic("%s: weird hook", __FUNCTION__); + panic("%s: weird hook", __func__); } /* @@ -436,7 +436,7 @@ ng_pptpgre_disconnect(hook_p hook) else if (hook == priv->lower) priv->lower = NULL; else - panic("%s: unknown hook", __FUNCTION__); + panic("%s: unknown hook", __func__); /* Go away if no longer connected to anything */ if ((NG_NODE_NUMHOOKS(node) == 0) @@ -745,7 +745,7 @@ ng_pptpgre_start_recv_ack_timer(node_p node) /* Compute how long until oldest unack'd packet times out, and reset the timer to that time. */ - KASSERT(a->rackTimerPtr == NULL, ("%s: rackTimer", __FUNCTION__)); + KASSERT(a->rackTimerPtr == NULL, ("%s: rackTimer", __func__)); remain = (a->timeSent[0] + a->ato) - ng_pptpgre_time(node); if (remain < 0) remain = 0; @@ -784,7 +784,7 @@ ng_pptpgre_recv_ack_timeout(void *arg) /* This complicated stuff is needed to avoid race conditions */ FREE(arg, M_NETGRAPH); - KASSERT(node->nd_refs > 0, ("%s: no nd_refs", __FUNCTION__)); + KASSERT(node->nd_refs > 0, ("%s: no nd_refs", __func__)); if (NG_NODE_NOT_VALID(node)) { /* shutdown race condition */ NG_NODE_UNREF(node); splx(s); @@ -833,7 +833,7 @@ ng_pptpgre_start_send_ack_timer(node_p node, int ackTimeout) int ticks; /* Start new timer */ - KASSERT(a->sackTimerPtr == NULL, ("%s: sackTimer", __FUNCTION__)); + KASSERT(a->sackTimerPtr == NULL, ("%s: sackTimer", __func__)); MALLOC(a->sackTimerPtr, node_p *, sizeof(node_p), M_NETGRAPH, M_NOWAIT); if (a->sackTimerPtr == NULL) { priv->stats.memoryFailures++; @@ -864,7 +864,7 @@ ng_pptpgre_send_ack_timeout(void *arg) /* This complicated stuff is needed to avoid race conditions */ FREE(arg, M_NETGRAPH); - KASSERT(node->nd_refs > 0, ("%s: no nd_refs", __FUNCTION__)); + KASSERT(node->nd_refs > 0, ("%s: no nd_refs", __func__)); if (NG_NODE_NOT_VALID(node)) { /* shutdown race condition */ NG_NODE_UNREF(node); splx(s); diff --git a/sys/netgraph/ng_rfc1490.c b/sys/netgraph/ng_rfc1490.c index 0d7a2e4..ec1fc19 100644 --- a/sys/netgraph/ng_rfc1490.c +++ b/sys/netgraph/ng_rfc1490.c @@ -291,7 +291,7 @@ ng_rfc1490_rcvdata(hook_p hook, item_p item) mtod(m, u_char *)[1] = NLPID_IP; NG_FWD_NEW_DATA(error, item, priv->downlink, m); } else - panic(__FUNCTION__); + panic(__func__); done: if (item) @@ -334,7 +334,7 @@ ng_rfc1490_disconnect(hook_p hook) else if (hook == priv->ppp) priv->ppp = NULL; else - panic(__FUNCTION__); + panic(__func__); return (0); } diff --git a/sys/netgraph/ng_socket.c b/sys/netgraph/ng_socket.c index 139aa0e..f570355 100644 --- a/sys/netgraph/ng_socket.c +++ b/sys/netgraph/ng_socket.c @@ -547,7 +547,7 @@ ng_detach_common(struct ngpcb *pcbp, int which) priv->datasock = NULL; break; default: - panic(__FUNCTION__); + panic(__func__); } if ((--priv->refs == 0) && (priv->node != NULL)) ng_rmnode_self(priv->node); diff --git a/sys/netgraph/ng_split.c b/sys/netgraph/ng_split.c index 2898369..359d310 100644 --- a/sys/netgraph/ng_split.c +++ b/sys/netgraph/ng_split.c @@ -172,7 +172,7 @@ ng_split_disconnect(hook_p hook) { hook_p *localhook = NG_HOOK_PRIVATE(hook); - KASSERT(localhook != NULL, ("%s: null info", __FUNCTION__)); + KASSERT(localhook != NULL, ("%s: null info", __func__)); *localhook = NULL; if ((NG_NODE_NUMHOOKS(NG_HOOK_NODE(hook)) == 0) && (NG_NODE_IS_VALID(NG_HOOK_NODE(hook)))) { diff --git a/sys/netgraph/ng_tee.c b/sys/netgraph/ng_tee.c index 7b47617..8cac1b1 100644 --- a/sys/netgraph/ng_tee.c +++ b/sys/netgraph/ng_tee.c @@ -310,7 +310,7 @@ ngt_rcvdata(hook_p hook, item_p item) dup = NULL; dest = &sc->left; } else { - panic("%s: no hook!", __FUNCTION__); + panic("%s: no hook!", __func__); #ifdef RESTARTABLE_PANICS return(EINVAL); #endif @@ -394,7 +394,7 @@ ngt_disconnect(hook_p hook) { struct hookinfo *const hinfo = NG_HOOK_PRIVATE(hook); - KASSERT(hinfo != NULL, ("%s: null info", __FUNCTION__)); + KASSERT(hinfo != NULL, ("%s: null info", __func__)); hinfo->hook = NULL; if ((NG_NODE_NUMHOOKS(NG_HOOK_NODE(hook)) == 0) && (NG_NODE_IS_VALID(NG_HOOK_NODE(hook)))) diff --git a/sys/netgraph/ng_tty.c b/sys/netgraph/ng_tty.c index cb3c770..71eb758 100644 --- a/sys/netgraph/ng_tty.c +++ b/sys/netgraph/ng_tty.c @@ -108,7 +108,7 @@ typedef struct ngt_sc *sc_p; k <= MAX_MBUFQ && *mp; \ k++, mp = &(*mp)->m_nextpkt); \ if (k != sc->qlen || k > MAX_MBUFQ || *mp || mp != sc->qtail) \ - panic(__FUNCTION__ ": queue"); \ + panic("%s: queue", __func__); \ } while (0) #else #define QUEUECHECK(sc) do {} while (0) @@ -536,7 +536,7 @@ ngt_disconnect(hook_p hook) s = spltty(); if (hook != sc->hook) - panic(__FUNCTION__); + panic(__func__); sc->hook = NULL; m_freem(sc->m); sc->m = NULL; @@ -576,7 +576,7 @@ ngt_rcvdata(hook_p hook, item_p item) struct mbuf *m; if (hook != sc->hook) - panic(__FUNCTION__); + panic(__func__); NGI_GET_M(item, m); NG_FREE_ITEM(item); @@ -666,7 +666,7 @@ ngt_mod_event(module_t mod, int event, void *data) if ((ngt_ldisc = ldisc_register(NETGRAPHDISC, &ngt_disc)) < 0) { splx(s); log(LOG_ERR, "%s: can't register line discipline", - __FUNCTION__); + __func__); return (EIO); } splx(s); diff --git a/sys/netgraph/ng_vjc.c b/sys/netgraph/ng_vjc.c index 5a2e2da..528d129 100644 --- a/sys/netgraph/ng_vjc.c +++ b/sys/netgraph/ng_vjc.c @@ -442,7 +442,7 @@ ng_vjc_rcvdata(hook_p hook, item_p item) hook = priv->vjcomp; break; default: - panic("%s: type=%d", __FUNCTION__, type); + panic("%s: type=%d", __func__, type); } } else if (hook == priv->vjcomp) { /* incoming compressed packet */ int vjlen, need2pullup; @@ -536,7 +536,7 @@ ng_vjc_rcvdata(hook_p hook, item_p item) } else if (hook == priv->vjip) /* incoming regular packet (bypass) */ hook = priv->ip; else - panic("%s: unknown hook", __FUNCTION__); + panic("%s: unknown hook", __func__); /* Send result back out */ NG_FWD_NEW_DATA(error, item, hook, m); @@ -577,7 +577,7 @@ ng_vjc_disconnect(hook_p hook) else if (hook == priv->vjip) priv->vjip = NULL; else - panic("%s: unknown hook", __FUNCTION__); + panic("%s: unknown hook", __func__); /* Go away if no hooks left */ if ((NG_NODE_NUMHOOKS(node) == 0) diff --git a/sys/netinet/ip_divert.c b/sys/netinet/ip_divert.c index 56a602ac..1341e18 100644 --- a/sys/netinet/ip_divert.c +++ b/sys/netinet/ip_divert.c @@ -150,7 +150,7 @@ divert_packet(struct mbuf *m, int incoming, int port) u_int16_t nport; /* Sanity check */ - KASSERT(port != 0, ("%s: port=0", __FUNCTION__)); + KASSERT(port != 0, ("%s: port=0", __func__)); /* Record and reset divert cookie */ divsrc.sin_port = ip_divert_cookie; @@ -172,7 +172,7 @@ divert_packet(struct mbuf *m, int incoming, int port) struct ifaddr *ifa; /* Sanity check */ - KASSERT((m->m_flags & M_PKTHDR), ("%s: !PKTHDR", __FUNCTION__)); + KASSERT((m->m_flags & M_PKTHDR), ("%s: !PKTHDR", __func__)); /* Find IP address for receive interface */ TAILQ_FOREACH(ifa, &m->m_pkthdr.rcvif->if_addrhead, ifa_link) { diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c index fa884ab..13f5ca9 100644 --- a/sys/netinet/tcp_output.c +++ b/sys/netinet/tcp_output.c @@ -759,7 +759,7 @@ send: /* IP version must be set here for ipv4/ipv6 checking later */ KASSERT(ip->ip_v == IPVERSION, - ("%s: IP version incorrect: %d", __FUNCTION__, ip->ip_v)); + ("%s: IP version incorrect: %d", __func__, ip->ip_v)); } /* diff --git a/sys/netinet6/ip6_fw.c b/sys/netinet6/ip6_fw.c index 5f60716..153c786 100644 --- a/sys/netinet6/ip6_fw.c +++ b/sys/netinet6/ip6_fw.c @@ -1205,7 +1205,7 @@ ip6_fw_init(void) default_rule.fw_flg |= IPV6_FW_F_IN | IPV6_FW_F_OUT; if (check_ip6fw_struct(&default_rule) == NULL || add_entry6(&ip6_fw_chain, &default_rule)) - panic(__FUNCTION__); + panic(__func__); printf("IPv6 packet filtering initialized, "); #ifdef IPV6FIREWALL_DEFAULT_TO_ACCEPT diff --git a/sys/netncp/ncp_conn.c b/sys/netncp/ncp_conn.c index fbe9b15..85f4163 100644 --- a/sys/netncp/ncp_conn.c +++ b/sys/netncp/ncp_conn.c @@ -275,7 +275,7 @@ ncp_conn_free(struct ncp_conn *ncp) return EACCES; } p = ncp->procp; - error = ncp_conn_assert_locked(ncp, __FUNCTION__, p); + error = ncp_conn_assert_locked(ncp, __func__, p); if (error) return error; if (ncp->ref_cnt != 0 || (ncp->flags & NCPFL_PERMANENT)) @@ -357,7 +357,7 @@ ncp_conn_login(struct ncp_conn *conn, struct proc *p, struct ucred *cred) error = ncp_get_encryption_key(conn, ncp_key); if (error) { - printf("%s: Warning: use unencrypted login\n", __FUNCTION__); + printf("%s: Warning: use unencrypted login\n", __func__); error = ncp_login_unencrypted(conn, conn->li.objtype, conn->li.user, conn->li.password, p, cred); } else { diff --git a/sys/netncp/ncp_ncp.c b/sys/netncp/ncp_ncp.c index b7799cc..8d86c02 100644 --- a/sys/netncp/ncp_ncp.c +++ b/sys/netncp/ncp_ncp.c @@ -444,7 +444,7 @@ ncp_write(struct ncp_conn *conn, ncp_fh *file, struct uio *uiop, struct ucred *c int error = 0, len, tsiz, backup; if (uiop->uio_iovcnt != 1) { - printf("%s: can't handle iovcnt>1 !!!\n", __FUNCTION__); + printf("%s: can't handle iovcnt>1 !!!\n", __func__); return EIO; } tsiz = uiop->uio_resid; diff --git a/sys/netncp/ncp_rq.c b/sys/netncp/ncp_rq.c index 4bc1d86..a415adc 100644 --- a/sys/netncp/ncp_rq.c +++ b/sys/netncp/ncp_rq.c @@ -253,7 +253,7 @@ ncp_request_int(struct ncp_rq *rqp) int error, len, dosend, plen = 0, gotpacket; if (so == NULL) { - printf("%s: ncp_so is NULL !\n",__FUNCTION__); + printf("%s: ncp_so is NULL !\n",__func__); ncp_conn_invalidate(conn); return ENOTCONN; } @@ -334,7 +334,7 @@ ncp_request_int(struct ncp_rq *rqp) if (m->m_len < sizeof(*rp)) { m = m_pullup(m, sizeof(*rp)); if (m == NULL) { - printf("%s: reply too short\n",__FUNCTION__); + printf("%s: reply too short\n",__func__); continue; } } diff --git a/sys/netncp/ncp_subr.h b/sys/netncp/ncp_subr.h index b1db7af..a4c4559 100644 --- a/sys/netncp/ncp_subr.h +++ b/sys/netncp/ncp_subr.h @@ -41,7 +41,7 @@ SIGISMEMBER(set, SIGQUIT)) -#define NCP_PRINT(format, args...) printf("FATAL: %s: "format, __FUNCTION__ ,## args) +#define NCP_PRINT(format, args...) printf("FATAL: %s: "format, __func__ ,## args) #define nwfs_printf NCP_PRINT /* Maybe this should panic, but I dont like that */ #define NCPFATAL NCP_PRINT @@ -49,14 +49,14 @@ /* socket debugging */ #ifdef NCP_SOCKET_DEBUG -#define NCPSDEBUG(format, args...) printf("%s: "format, __FUNCTION__ ,## args) +#define NCPSDEBUG(format, args...) printf("%s: "format, __func__ ,## args) #else #define NCPSDEBUG(format, args...) #endif /* NCP calls debug */ #ifdef NCP_NCP_DEBUG -#define NCPNDEBUG(format, args...) printf("%s: "format, __FUNCTION__ ,## args) +#define NCPNDEBUG(format, args...) printf("%s: "format, __func__ ,## args) #else #define NCPNDEBUG(format, args...) #endif @@ -70,14 +70,14 @@ /* FS VOPS debug */ #ifdef NWFS_VOPS_DEBUG -#define NCPVODEBUG(format, args...) printf("%s: "format, __FUNCTION__ ,## args) +#define NCPVODEBUG(format, args...) printf("%s: "format, __func__ ,## args) #else #define NCPVODEBUG(format, args...) #endif /* FS VNOPS debug */ #ifdef NWFS_VNOPS_DEBUG -#define NCPVNDEBUG(format, args...) printf("%s: "format, __FUNCTION__ ,## args) +#define NCPVNDEBUG(format, args...) printf("%s: "format, __func__ ,## args) #else #define NCPVNDEBUG(format, args...) #endif diff --git a/sys/netsmb/smb_smb.c b/sys/netsmb/smb_smb.c index 242b941..16e99ed 100644 --- a/sys/netsmb/smb_smb.c +++ b/sys/netsmb/smb_smb.c @@ -92,7 +92,7 @@ smb_smb_negotiate(struct smb_vc *vcp, struct smb_cred *scred) u_int16_t dindex, tw, tw1, swlen, bc; int error, maxqsz; - if (smb_smb_nomux(vcp, scred, __FUNCTION__) != 0) + if (smb_smb_nomux(vcp, scred, __func__) != 0) return EINVAL; vcp->vc_hflags = 0; vcp->vc_hflags2 = 0; @@ -238,7 +238,7 @@ smb_smb_ssnsetup(struct smb_vc *vcp, struct smb_cred *scred) vcp->vc_smbuid = SMB_UID_UNKNOWN; - if (smb_smb_nomux(vcp, scred, __FUNCTION__) != 0) + if (smb_smb_nomux(vcp, scred, __func__) != 0) return EINVAL; error = smb_rq_alloc(VCTOCP(vcp), SMB_COM_SESSION_SETUP_ANDX, scred, &rqp); @@ -336,7 +336,7 @@ smb_smb_ssnclose(struct smb_vc *vcp, struct smb_cred *scred) if (vcp->vc_smbuid == SMB_UID_UNKNOWN) return 0; - if (smb_smb_nomux(vcp, scred, __FUNCTION__) != 0) + if (smb_smb_nomux(vcp, scred, __func__) != 0) return EINVAL; error = smb_rq_alloc(VCTOCP(vcp), SMB_COM_LOGOFF_ANDX, scred, &rqp); diff --git a/sys/netsmb/smb_subr.h b/sys/netsmb/smb_subr.h index 8591893..1d2a304 100644 --- a/sys/netsmb/smb_subr.h +++ b/sys/netsmb/smb_subr.h @@ -44,17 +44,17 @@ MALLOC_DECLARE(M_SMBTEMP); #define FB_CURRENT -#define SMBERROR(format, args...) printf("%s: "format, __FUNCTION__ ,## args) -#define SMBPANIC(format, args...) printf("%s: "format, __FUNCTION__ ,## args) +#define SMBERROR(format, args...) printf("%s: "format, __func__ ,## args) +#define SMBPANIC(format, args...) printf("%s: "format, __func__ ,## args) #ifdef SMB_SOCKET_DEBUG -#define SMBSDEBUG(format, args...) printf("%s: "format, __FUNCTION__ ,## args) +#define SMBSDEBUG(format, args...) printf("%s: "format, __func__ ,## args) #else #define SMBSDEBUG(format, args...) #endif #ifdef SMB_IOD_DEBUG -#define SMBIODEBUG(format, args...) printf("%s: "format, __FUNCTION__ ,## args) +#define SMBIODEBUG(format, args...) printf("%s: "format, __func__ ,## args) #else #define SMBIODEBUG(format, args...) #endif diff --git a/sys/netsmb/smb_trantcp.h b/sys/netsmb/smb_trantcp.h index 6c625fa..d160fa4 100644 --- a/sys/netsmb/smb_trantcp.h +++ b/sys/netsmb/smb_trantcp.h @@ -38,7 +38,7 @@ #ifdef NB_DEBUG #define NBDEBUG(format, args...) printf("%s(%d): "format, \ - __FUNCTION__ , __LINE__ ,## args) + __func__ , __LINE__ ,## args) #else #define NBDEBUG(format, args...) #endif diff --git a/sys/pc98/cbus/ppc.c b/sys/pc98/cbus/ppc.c index 29d8bc4..b285fce 100644 --- a/sys/pc98/cbus/ppc.c +++ b/sys/pc98/cbus/ppc.c @@ -204,7 +204,7 @@ ppc_detect_fifo(struct ppc_data *ppc) /* XXX 16 and 32 bits implementations not supported */ if (ppc->ppc_pword != PPC_PWORD_8) { - LOG_PPC(__FUNCTION__, ppc, "PWord not supported"); + LOG_PPC(__func__, ppc, "PWord not supported"); goto error; } @@ -223,7 +223,7 @@ ppc_detect_fifo(struct ppc_data *ppc) } if (i >= 1024) { - LOG_PPC(__FUNCTION__, ppc, "can't flush FIFO"); + LOG_PPC(__func__, ppc, "can't flush FIFO"); goto error; } @@ -246,7 +246,7 @@ ppc_detect_fifo(struct ppc_data *ppc) } if (i >= 1024) { - LOG_PPC(__FUNCTION__, ppc, "can't fill FIFO"); + LOG_PPC(__func__, ppc, "can't fill FIFO"); goto error; } @@ -259,7 +259,7 @@ ppc_detect_fifo(struct ppc_data *ppc) */ for (i=ppc->ppc_fifo; i>0; i--) { if (r_fifo(ppc) != (char)(ppc->ppc_fifo-i)) { - LOG_PPC(__FUNCTION__, ppc, "invalid data in FIFO"); + LOG_PPC(__func__, ppc, "invalid data in FIFO"); goto error; } if (r_ecr(ppc) & PPC_SERVICE_INTR) { @@ -268,14 +268,14 @@ ppc_detect_fifo(struct ppc_data *ppc) } /* if FIFO empty before the last byte, error */ if (i>1 && (r_ecr(ppc) & PPC_FIFO_EMPTY)) { - LOG_PPC(__FUNCTION__, ppc, "data lost in FIFO"); + LOG_PPC(__func__, ppc, "data lost in FIFO"); goto error; } } /* FIFO must be empty after the last byte */ if (!(r_ecr(ppc) & PPC_FIFO_EMPTY)) { - LOG_PPC(__FUNCTION__, ppc, "can't empty the FIFO"); + LOG_PPC(__func__, ppc, "can't empty the FIFO"); goto error; } @@ -1154,7 +1154,7 @@ found: printf(" ECP+EPP SPP"); break; default: - printf("%s: unknown case (0x%x)!\n", __FUNCTION__, r); + printf("%s: unknown case (0x%x)!\n", __func__, r); } } else { @@ -1505,7 +1505,7 @@ ppc_exec_microseq(device_t dev, struct ppb_microseq **p_msq) case MS_OP_CALL: if (stack) - panic("%s: too much calls", __FUNCTION__); + panic("%s: too much calls", __func__); if (mi->arg[0].p) { /* store the state of the actual @@ -1539,7 +1539,7 @@ ppc_exec_microseq(device_t dev, struct ppb_microseq **p_msq) * of a submicrosequence */ if (stack) panic("%s: can't return to ppb level", - __FUNCTION__); + __func__); /* update pc for ppb level of execution */ *p_msq = mi; @@ -1549,7 +1549,7 @@ ppc_exec_microseq(device_t dev, struct ppb_microseq **p_msq) default: panic("%s: unknown microsequence opcode 0x%x", - __FUNCTION__, mi->opcode); + __func__, mi->opcode); } } @@ -2132,7 +2132,7 @@ ppc_io(device_t ppcdev, int iop, u_char *addr, int cnt, u_char byte) w_fifo(ppc, byte); break; default: - panic("%s: unknown I/O operation", __FUNCTION__); + panic("%s: unknown I/O operation", __func__); break; } diff --git a/sys/pc98/pc98/ppc.c b/sys/pc98/pc98/ppc.c index 29d8bc4..b285fce 100644 --- a/sys/pc98/pc98/ppc.c +++ b/sys/pc98/pc98/ppc.c @@ -204,7 +204,7 @@ ppc_detect_fifo(struct ppc_data *ppc) /* XXX 16 and 32 bits implementations not supported */ if (ppc->ppc_pword != PPC_PWORD_8) { - LOG_PPC(__FUNCTION__, ppc, "PWord not supported"); + LOG_PPC(__func__, ppc, "PWord not supported"); goto error; } @@ -223,7 +223,7 @@ ppc_detect_fifo(struct ppc_data *ppc) } if (i >= 1024) { - LOG_PPC(__FUNCTION__, ppc, "can't flush FIFO"); + LOG_PPC(__func__, ppc, "can't flush FIFO"); goto error; } @@ -246,7 +246,7 @@ ppc_detect_fifo(struct ppc_data *ppc) } if (i >= 1024) { - LOG_PPC(__FUNCTION__, ppc, "can't fill FIFO"); + LOG_PPC(__func__, ppc, "can't fill FIFO"); goto error; } @@ -259,7 +259,7 @@ ppc_detect_fifo(struct ppc_data *ppc) */ for (i=ppc->ppc_fifo; i>0; i--) { if (r_fifo(ppc) != (char)(ppc->ppc_fifo-i)) { - LOG_PPC(__FUNCTION__, ppc, "invalid data in FIFO"); + LOG_PPC(__func__, ppc, "invalid data in FIFO"); goto error; } if (r_ecr(ppc) & PPC_SERVICE_INTR) { @@ -268,14 +268,14 @@ ppc_detect_fifo(struct ppc_data *ppc) } /* if FIFO empty before the last byte, error */ if (i>1 && (r_ecr(ppc) & PPC_FIFO_EMPTY)) { - LOG_PPC(__FUNCTION__, ppc, "data lost in FIFO"); + LOG_PPC(__func__, ppc, "data lost in FIFO"); goto error; } } /* FIFO must be empty after the last byte */ if (!(r_ecr(ppc) & PPC_FIFO_EMPTY)) { - LOG_PPC(__FUNCTION__, ppc, "can't empty the FIFO"); + LOG_PPC(__func__, ppc, "can't empty the FIFO"); goto error; } @@ -1154,7 +1154,7 @@ found: printf(" ECP+EPP SPP"); break; default: - printf("%s: unknown case (0x%x)!\n", __FUNCTION__, r); + printf("%s: unknown case (0x%x)!\n", __func__, r); } } else { @@ -1505,7 +1505,7 @@ ppc_exec_microseq(device_t dev, struct ppb_microseq **p_msq) case MS_OP_CALL: if (stack) - panic("%s: too much calls", __FUNCTION__); + panic("%s: too much calls", __func__); if (mi->arg[0].p) { /* store the state of the actual @@ -1539,7 +1539,7 @@ ppc_exec_microseq(device_t dev, struct ppb_microseq **p_msq) * of a submicrosequence */ if (stack) panic("%s: can't return to ppb level", - __FUNCTION__); + __func__); /* update pc for ppb level of execution */ *p_msq = mi; @@ -1549,7 +1549,7 @@ ppc_exec_microseq(device_t dev, struct ppb_microseq **p_msq) default: panic("%s: unknown microsequence opcode 0x%x", - __FUNCTION__, mi->opcode); + __func__, mi->opcode); } } @@ -2132,7 +2132,7 @@ ppc_io(device_t ppcdev, int iop, u_char *addr, int cnt, u_char byte) w_fifo(ppc, byte); break; default: - panic("%s: unknown I/O operation", __FUNCTION__); + panic("%s: unknown I/O operation", __func__); break; } diff --git a/sys/pci/agp_intel.c b/sys/pci/agp_intel.c index 532fa07..bb5338a 100644 --- a/sys/pci/agp_intel.c +++ b/sys/pci/agp_intel.c @@ -216,7 +216,7 @@ agp_intel_detach(device_t dev) case 0x1a218086: /* i840 */ case 0x25308086: /* i850 */ case 0x25318086: /* i860 */ - printf("%s: set MCHCFG to %x\n", __FUNCTION__, (unsigned) + printf("%s: set MCHCFG to %x\n", __func__, (unsigned) (pci_read_config(dev, AGP_INTEL_MCHCFG, 2) & ~(1 << 9))); pci_write_config(dev, AGP_INTEL_MCHCFG, @@ -224,7 +224,7 @@ agp_intel_detach(device_t dev) & ~(1 << 9)), 2); case 0x25008086: /* i820 */ - printf("%s: set RDCR to %x\n", __FUNCTION__, (unsigned) + printf("%s: set RDCR to %x\n", __func__, (unsigned) (pci_read_config(dev, AGP_INTEL_I820_RDCR, 1) & ~(1 << 1))); pci_write_config(dev, AGP_INTEL_I820_RDCR, @@ -232,7 +232,7 @@ agp_intel_detach(device_t dev) & ~(1 << 1)), 1); case 0x1a308086: /* i845 */ - printf("%s: set MCHCFG to %x\n", __FUNCTION__, (unsigned) + printf("%s: set MCHCFG to %x\n", __func__, (unsigned) (pci_read_config(dev, AGP_INTEL_I845_MCHCFG, 1) & ~(1 << 1))); pci_write_config(dev, AGP_INTEL_MCHCFG, @@ -240,7 +240,7 @@ agp_intel_detach(device_t dev) & ~(1 << 1)), 1); default: /* Intel Generic (maybe) */ - printf("%s: set NBXCFG to %x\n", __FUNCTION__, + printf("%s: set NBXCFG to %x\n", __func__, (pci_read_config(dev, AGP_INTEL_NBXCFG, 4) & ~(1 << 9))); pci_write_config(dev, AGP_INTEL_NBXCFG, diff --git a/sys/pci/alpm.c b/sys/pci/alpm.c index ecf272c..a99f5f2 100644 --- a/sys/pci/alpm.c +++ b/sys/pci/alpm.c @@ -441,7 +441,7 @@ alsmb_smb_quick(device_t dev, u_char slave, int how) ALPM_SMBOUTB(sc, SMBHADDR, slave | LSB); break; default: - panic("%s: unknown QUICK command (%x)!", __FUNCTION__, + panic("%s: unknown QUICK command (%x)!", __func__, how); } ALPM_SMBOUTB(sc, SMBCMD, SMBQUICK); diff --git a/sys/pci/amdpm.c b/sys/pci/amdpm.c index 8667bb4..be81223 100644 --- a/sys/pci/amdpm.c +++ b/sys/pci/amdpm.c @@ -343,7 +343,7 @@ amdsmb_smb_quick(device_t dev, u_char slave, int how) AMDPM_SMBOUTW(sc, AMDSMB_HSTADDR, slave | LSB); break; default: - panic("%s: unknown QUICK command (%x)!", __FUNCTION__, how); + panic("%s: unknown QUICK command (%x)!", __func__, how); } l = AMDPM_SMBINW(sc, AMDSMB_GLOBAL_ENABLE); AMDPM_SMBOUTW(sc, AMDSMB_GLOBAL_ENABLE, (l & 0xfff8) | AMDSMB_GE_CYC_QUICK | AMDSMB_GE_HOST_STC); diff --git a/sys/powerpc/include/globals.h b/sys/powerpc/include/globals.h index 927020f..4dfefd9 100644 --- a/sys/powerpc/include/globals.h +++ b/sys/powerpc/include/globals.h @@ -33,7 +33,7 @@ #include <machine/cpufunc.h> #include <machine/globaldata.h> -#define GLOBALP ((struct globaldata *) powerpc_get_globalp()) +#define GLOBALP ((struct globaldata *) powerpc_get_globalp()) #define PCPU_GET(member) (GLOBALP->gd_ ## member) #define PCPU_PTR(member) (&GLOBALP->gd_ ## member) diff --git a/sys/powerpc/include/openpicreg.h b/sys/powerpc/include/openpicreg.h index 254a7ac..c426919 100644 --- a/sys/powerpc/include/openpicreg.h +++ b/sys/powerpc/include/openpicreg.h @@ -23,7 +23,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $NetBSD: openpicreg.h,v 1.2 2001/02/05 19:22:23 briggs Exp $ + * $NetBSD: openpicreg.h,v 1.2 2001/02/05 19:22:23 briggs Exp $ * $FreeBSD$ */ |