From 7fd4e1a12ffdc583c9780b5a1cd21b3252cc19ae Mon Sep 17 00:00:00 2001 From: Sascha Wildner Date: Sat, 4 May 2013 21:58:43 +0200 Subject: [PATCH] Use C99 __func__ instead of __FUNCTION__. --- lib/libstand/hammerread.c | 10 ++++----- sys/bus/u4b/controller/ehci.c | 22 +++++++++---------- sys/bus/u4b/controller/ohci.c | 12 +++++----- sys/bus/u4b/controller/uhci.c | 16 +++++++------- sys/bus/u4b/controller/xhci.c | 8 +++---- sys/bus/u4b/net/if_mos.c | 2 +- sys/bus/u4b/storage/umass.c | 2 +- sys/bus/u4b/usb_debug.h | 2 +- sys/bus/u4b/usb_transfer.c | 4 ++-- sys/dev/acpica/acpi_smbat.c | 4 ++-- sys/dev/drm/drmP.h | 2 +- sys/dev/drm/mach64/mach64_state.c | 2 +- sys/dev/drm/r128/r128_irq.c | 4 ++-- sys/dev/misc/cmx/cmx.c | 2 +- sys/dev/raid/amr/amr.c | 6 ++--- sys/dev/raid/ciss/cissvar.h | 2 +- sys/dev/raid/hpt27xx/osm.h | 2 +- sys/dev/raid/hptrr/osm.h | 2 +- sys/dev/raid/mfi/mfivar.h | 2 +- sys/netproto/802_11/ieee80211_dragonfly.h | 4 ++-- sys/sys/thread2.h | 22 +++++++++---------- usr.sbin/802_11/hostapd/driver_dragonfly.c | 2 +- .../802_11/wpa_supplicant/driver_dragonfly.c | 4 ++-- usr.sbin/pfctl/pfctl_optimize.c | 2 +- 24 files changed, 69 insertions(+), 71 deletions(-) diff --git a/lib/libstand/hammerread.c b/lib/libstand/hammerread.c index 61ba572618..785c13c774 100644 --- a/lib/libstand/hammerread.c +++ b/lib/libstand/hammerread.c @@ -31,8 +31,6 @@ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. - * - * $DragonFly: src/lib/libstand/hammerread.c,v 1.2 2008/10/29 22:14:25 swildner Exp $ */ /* @@ -575,7 +573,7 @@ hreaddir(struct hfs *hfs, ino_t ino, int64_t *off, struct dirent *de) struct hammer_base_elm key, end; #if DEBUG > 2 - printf("%s(%llx, %lld)\n", __FUNCTION__, (long long)ino, *off); + printf("%s(%llx, %lld)\n", __func__, (long long)ino, *off); #endif bzero(&key, sizeof(key)); @@ -617,7 +615,7 @@ hresolve(struct hfs *hfs, ino_t dirino, const char *name) size_t namel = strlen(name); #if DEBUG > 2 - printf("%s(%llx, %s)\n", __FUNCTION__, (long long)dirino, name); + printf("%s(%llx, %s)\n", __func__, (long long)dirino, name); #endif bzero(&key, sizeof(key)); @@ -661,7 +659,7 @@ static ino_t hlookup(struct hfs *hfs, const char *path) { #if DEBUG > 2 - printf("%s(%s)\n", __FUNCTION__, path); + printf("%s(%s)\n", __func__, path); #endif #ifdef BOOT2 @@ -699,7 +697,7 @@ hstat(struct hfs *hfs, ino_t ino, struct stat* st) struct hammer_base_elm key; #if DEBUG > 2 - printf("%s(%llx)\n", __FUNCTION__, (long long)ino); + printf("%s(%llx)\n", __func__, (long long)ino); #endif bzero(&key, sizeof(key)); diff --git a/sys/bus/u4b/controller/ehci.c b/sys/bus/u4b/controller/ehci.c index cdee012e5e..3770371005 100644 --- a/sys/bus/u4b/controller/ehci.c +++ b/sys/bus/u4b/controller/ehci.c @@ -890,7 +890,7 @@ ehci_dump_isoc(ehci_softc_t *sc) (EHCI_VIRTUAL_FRAMELIST_COUNT - 1); kprintf("%s: isochronous dump from frame 0x%03x:\n", - __FUNCTION__, pos); + __func__, pos); itd = sc->sc_isoc_hs_p_last[pos]; sitd = sc->sc_isoc_fs_p_last[pos]; @@ -1487,7 +1487,7 @@ ehci_interrupt(ehci_softc_t *sc) if (status & EHCI_STS_HSE) { kprintf("%s: unrecoverable error, " - "controller halted\n", __FUNCTION__); + "controller halted\n", __func__); #ifdef USB_DEBUG ehci_dump_regs(sc); ehci_dump_isoc(sc); @@ -1513,7 +1513,7 @@ ehci_interrupt(ehci_softc_t *sc) /* block unprocessed interrupts */ sc->sc_eintrs &= ~status; EOWRITE4(sc, EHCI_USBINTR, sc->sc_eintrs); - kprintf("%s: blocking interrupts 0x%x\n", __FUNCTION__, status); + kprintf("%s: blocking interrupts 0x%x\n", __func__, status); } /* poll all the USB transfers */ ehci_interrupt_poll(sc); @@ -1606,7 +1606,7 @@ restart: } if (td_next == NULL) { - panic("%s: out of EHCI transfer descriptors!", __FUNCTION__); + panic("%s: out of EHCI transfer descriptors!", __func__); } /* get next TD */ @@ -2038,7 +2038,7 @@ ehci_isoc_fs_done(ehci_softc_t *sc, struct usb_xfer *xfer) while (nframes--) { if (td == NULL) { panic("%s:%d: out of TD's\n", - __FUNCTION__, __LINE__); + __func__, __LINE__); } if (pp_last >= &sc->sc_isoc_fs_p_last[EHCI_VIRTUAL_FRAMELIST_COUNT]) { pp_last = &sc->sc_isoc_fs_p_last[0]; @@ -2092,7 +2092,7 @@ ehci_isoc_hs_done(ehci_softc_t *sc, struct usb_xfer *xfer) while (nframes) { if (td == NULL) { panic("%s:%d: out of TD's\n", - __FUNCTION__, __LINE__); + __func__, __LINE__); } if (pp_last >= &sc->sc_isoc_hs_p_last[EHCI_VIRTUAL_FRAMELIST_COUNT]) { pp_last = &sc->sc_isoc_hs_p_last[0]; @@ -2519,7 +2519,7 @@ ehci_device_isoc_fs_enter(struct usb_xfer *xfer) while (nframes--) { if (td == NULL) { panic("%s:%d: out of TD's\n", - __FUNCTION__, __LINE__); + __func__, __LINE__); } if (pp_last >= &sc->sc_isoc_fs_p_last[EHCI_VIRTUAL_FRAMELIST_COUNT]) { pp_last = &sc->sc_isoc_fs_p_last[0]; @@ -2535,7 +2535,7 @@ ehci_device_isoc_fs_enter(struct usb_xfer *xfer) once = 0; kprintf("%s: frame length(%d) exceeds %d " "bytes (frame truncated)\n", - __FUNCTION__, *plen, + __func__, *plen, xfer->max_frame_size); } #endif @@ -2809,7 +2809,7 @@ ehci_device_isoc_hs_enter(struct usb_xfer *xfer) while (nframes) { if (td == NULL) { panic("%s:%d: out of TD's\n", - __FUNCTION__, __LINE__); + __func__, __LINE__); } if (pp_last >= &sc->sc_isoc_hs_p_last[EHCI_VIRTUAL_FRAMELIST_COUNT]) { pp_last = &sc->sc_isoc_hs_p_last[0]; @@ -2821,7 +2821,7 @@ ehci_device_isoc_hs_enter(struct usb_xfer *xfer) once = 0; kprintf("%s: frame length(%d) exceeds %d bytes " "(frame truncated)\n", - __FUNCTION__, *plen, xfer->max_frame_size); + __func__, *plen, xfer->max_frame_size); } #endif *plen = xfer->max_frame_size; @@ -2886,7 +2886,7 @@ ehci_device_isoc_hs_enter(struct usb_xfer *xfer) /* new page needed */ page_addr = buf_res.physaddr & ~0xFFF; if (page_no == 6) { - panic("%s: too many pages\n", __FUNCTION__); + panic("%s: too many pages\n", __func__); } page_no++; /* update page address */ diff --git a/sys/bus/u4b/controller/ohci.c b/sys/bus/u4b/controller/ohci.c index 95e653a9b4..2c0cf12ebb 100644 --- a/sys/bus/u4b/controller/ohci.c +++ b/sys/bus/u4b/controller/ohci.c @@ -720,7 +720,7 @@ ohci_isoc_done(struct usb_xfer *xfer) while (1) { if (td == NULL) { panic("%s:%d: out of TD's\n", - __FUNCTION__, __LINE__); + __func__, __LINE__); } #ifdef USB_DEBUG if (ohcidebug > 5) { @@ -1173,12 +1173,12 @@ ohci_interrupt(ohci_softc_t *sc) } #endif if (status & OHCI_RD) { - kprintf("%s: resume detect\n", __FUNCTION__); + kprintf("%s: resume detect\n", __func__); /* XXX process resume detect */ } if (status & OHCI_UE) { kprintf("%s: unrecoverable error, " - "controller halted\n", __FUNCTION__); + "controller halted\n", __func__); OWRITE4(sc, OHCI_CONTROL, OHCI_HCFS_RESET); /* XXX what else */ } @@ -1203,7 +1203,7 @@ ohci_interrupt(ohci_softc_t *sc) OWRITE4(sc, OHCI_INTERRUPT_DISABLE, status); sc->sc_eintrs &= ~status; kprintf("%s: blocking intrs 0x%x\n", - __FUNCTION__, status); + __func__, status); } /* poll all the USB transfers */ ohci_interrupt_poll(sc); @@ -1295,7 +1295,7 @@ restart: } if (td_next == NULL) { - panic("%s: out of OHCI transfer descriptors!", __FUNCTION__); + panic("%s: out of OHCI transfer descriptors!", __func__); } /* get next TD */ @@ -1900,7 +1900,7 @@ ohci_device_isoc_enter(struct usb_xfer *xfer) while (nframes--) { if (td == NULL) { panic("%s:%d: out of TD's\n", - __FUNCTION__, __LINE__); + __func__, __LINE__); } itd_offset[ncur] = length; buf_offset += *plen; diff --git a/sys/bus/u4b/controller/uhci.c b/sys/bus/u4b/controller/uhci.c index 5c9f12ce8a..7002172738 100644 --- a/sys/bus/u4b/controller/uhci.c +++ b/sys/bus/u4b/controller/uhci.c @@ -1017,7 +1017,7 @@ uhci_isoc_done(uhci_softc_t *sc, struct usb_xfer *xfer) while (nframes--) { if (td == NULL) { panic("%s:%d: out of TD's\n", - __FUNCTION__, __LINE__); + __func__, __LINE__); } if (pp_last >= &sc->sc_isoc_p_last[UHCI_VFRAMELIST_COUNT]) { pp_last = &sc->sc_isoc_p_last[0]; @@ -1438,21 +1438,21 @@ uhci_interrupt(uhci_softc_t *sc) if (status & UHCI_STS_RD) { #ifdef USB_DEBUG kprintf("%s: resume detect\n", - __FUNCTION__); + __func__); #endif } if (status & UHCI_STS_HSE) { kprintf("%s: host system error\n", - __FUNCTION__); + __func__); } if (status & UHCI_STS_HCPE) { kprintf("%s: host controller process error\n", - __FUNCTION__); + __func__); } if (status & UHCI_STS_HCH) { /* no acknowledge needed */ DPRINTF("%s: host controller halted\n", - __FUNCTION__); + __func__); #ifdef USB_DEBUG if (uhcidebug > 0) { uhci_dump_all(sc); @@ -1567,7 +1567,7 @@ restart: } if (td_next == NULL) { - panic("%s: out of UHCI transfer descriptors!", __FUNCTION__); + panic("%s: out of UHCI transfer descriptors!", __func__); } /* get next TD */ @@ -2197,7 +2197,7 @@ uhci_device_isoc_enter(struct usb_xfer *xfer) while (nframes--) { if (td == NULL) { panic("%s:%d: out of TD's\n", - __FUNCTION__, __LINE__); + __func__, __LINE__); } if (pp_last >= &sc->sc_isoc_p_last[UHCI_VFRAMELIST_COUNT]) { pp_last = &sc->sc_isoc_p_last[0]; @@ -2208,7 +2208,7 @@ uhci_device_isoc_enter(struct usb_xfer *xfer) once = 0; kprintf("%s: frame length(%d) exceeds %d " "bytes (frame truncated)\n", - __FUNCTION__, *plen, + __func__, *plen, xfer->max_frame_size); } #endif diff --git a/sys/bus/u4b/controller/xhci.c b/sys/bus/u4b/controller/xhci.c index 9e207ac1b9..bf9afb9cae 100644 --- a/sys/bus/u4b/controller/xhci.c +++ b/sys/bus/u4b/controller/xhci.c @@ -1447,17 +1447,17 @@ xhci_interrupt(struct xhci_softc *sc) if (status & XHCI_STS_HCH) { kprintf("%s: host controller halted\n", - __FUNCTION__); + __func__); } if (status & XHCI_STS_HSE) { kprintf("%s: host system error\n", - __FUNCTION__); + __func__); } if (status & XHCI_STS_HCE) { kprintf("%s: host controller error\n", - __FUNCTION__); + __func__); } } @@ -1543,7 +1543,7 @@ restart: } if (td_next == NULL) - panic("%s: out of XHCI transfer descriptors!", __FUNCTION__); + panic("%s: out of XHCI transfer descriptors!", __func__); /* get next TD */ diff --git a/sys/bus/u4b/net/if_mos.c b/sys/bus/u4b/net/if_mos.c index 7dd889efda..7e1c8268db 100644 --- a/sys/bus/u4b/net/if_mos.c +++ b/sys/bus/u4b/net/if_mos.c @@ -138,7 +138,7 @@ SYSCTL_INT(_hw_usb_mos, OID_AUTO, debug, CTLFLAG_RW, &mos_debug, 0, #endif #define MOS_DPRINTFN(fmt,...) \ - DPRINTF("mos: %s: " fmt "\n",__FUNCTION__,## __VA_ARGS__) + DPRINTF("mos: %s: " fmt "\n",__func__,## __VA_ARGS__) #define USB_PRODUCT_MOSCHIP_MCS7730 0x7730 #define USB_PRODUCT_SITECOMEU_LN030 0x0021 diff --git a/sys/bus/u4b/storage/umass.c b/sys/bus/u4b/storage/umass.c index 5b05c70ab1..818a4ab43e 100644 --- a/sys/bus/u4b/storage/umass.c +++ b/sys/bus/u4b/storage/umass.c @@ -151,7 +151,7 @@ kprintf("%s:%s: " fmt, \ (sc) ? (const char *)(sc)->sc_name : \ (const char *)"umassX", \ - __FUNCTION__ ,## __VA_ARGS__); \ + __func__ ,## __VA_ARGS__); \ } \ } while (0) diff --git a/sys/bus/u4b/usb_debug.h b/sys/bus/u4b/usb_debug.h index 8697c13979..58daa31496 100644 --- a/sys/bus/u4b/usb_debug.h +++ b/sys/bus/u4b/usb_debug.h @@ -38,7 +38,7 @@ extern int usb_debug; #define DPRINTFN(n,fmt,...) do { \ if ((USB_DEBUG_VAR) >= (n)) { \ kprintf("%s: " fmt, \ - __FUNCTION__,## __VA_ARGS__); \ + __func__,## __VA_ARGS__); \ } \ } while (0) #define DPRINTF(...) DPRINTFN(1, __VA_ARGS__) diff --git a/sys/bus/u4b/usb_transfer.c b/sys/bus/u4b/usb_transfer.c index 72cbab8249..de9bcb160e 100644 --- a/sys/bus/u4b/usb_transfer.c +++ b/sys/bus/u4b/usb_transfer.c @@ -2711,7 +2711,7 @@ usbd_callback_wrapper_sub(struct usb_xfer *xfer) if (xfer->error == 0) { panic("%s: actual number of frames, %d, is " "greater than initial number of frames, %d\n", - __FUNCTION__, xfer->aframes, xfer->nframes); + __func__, xfer->aframes, xfer->nframes); } else { /* just set some valid value */ xfer->aframes = xfer->nframes; @@ -2738,7 +2738,7 @@ usbd_callback_wrapper_sub(struct usb_xfer *xfer) if (xfer->error == 0) { panic("%s: actual length, %d, is greater than " "initial length, %d\n", - __FUNCTION__, xfer->actlen, xfer->sumlen); + __func__, xfer->actlen, xfer->sumlen); } else { /* just set some valid value */ xfer->actlen = xfer->sumlen; diff --git a/sys/dev/acpica/acpi_smbat.c b/sys/dev/acpica/acpi_smbat.c index 3bb32d950a..97dfbbae8e 100644 --- a/sys/dev/acpica/acpi_smbat.c +++ b/sys/dev/acpica/acpi_smbat.c @@ -237,7 +237,7 @@ acpi_smbus_read_2(struct acpi_smbat_softc *sc, uint8_t addr, uint8_t cmd, goto out; if (val & SMBUS_STS_MASK) { kprintf("%s: AE_ERROR 0x%x\n", - __FUNCTION__, (int)(val & SMBUS_STS_MASK)); + __func__, (int)(val & SMBUS_STS_MASK)); error = EIO; goto out; } @@ -306,7 +306,7 @@ acpi_smbus_read_multi_1(struct acpi_smbat_softc *sc, uint8_t addr, uint8_t cmd, goto out; if (val & SMBUS_STS_MASK) { kprintf("%s: AE_ERROR 0x%x\n", - __FUNCTION__, (int)(val & SMBUS_STS_MASK)); + __func__, (int)(val & SMBUS_STS_MASK)); error = EIO; goto out; } diff --git a/sys/dev/drm/drmP.h b/sys/dev/drm/drmP.h index 130107616a..f03cf0e914 100644 --- a/sys/dev/drm/drmP.h +++ b/sys/dev/drm/drmP.h @@ -287,7 +287,7 @@ do { \ if (!_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock) || \ dev->lock.file_priv != file_priv) { \ DRM_ERROR("%s called without lock held\n", \ - __FUNCTION__); \ + __func__); \ return EINVAL; \ } \ } while (0) diff --git a/sys/dev/drm/mach64/mach64_state.c b/sys/dev/drm/mach64/mach64_state.c index 84d5d547b0..3b6c24351c 100644 --- a/sys/dev/drm/mach64/mach64_state.c +++ b/sys/dev/drm/mach64/mach64_state.c @@ -144,7 +144,7 @@ static __inline__ int mach64_emit_state(struct drm_file *file_priv, DMALOCALS; if (MACH64_VERBOSE) { - mach64_print_dirty(__FUNCTION__, dirty); + mach64_print_dirty(__func__, dirty); } else { DRM_DEBUG("dirty=0x%08x\n", dirty); } diff --git a/sys/dev/drm/r128/r128_irq.c b/sys/dev/drm/r128/r128_irq.c index 05682ded54..714aac50e3 100644 --- a/sys/dev/drm/r128/r128_irq.c +++ b/sys/dev/drm/r128/r128_irq.c @@ -68,7 +68,7 @@ int r128_enable_vblank(struct drm_device *dev, int crtc) drm_r128_private_t *dev_priv = dev->dev_private; if (crtc != 0) { - DRM_ERROR("%s: bad crtc %d\n", __FUNCTION__, crtc); + DRM_ERROR("%s: bad crtc %d\n", __func__, crtc); return -EINVAL; } @@ -79,7 +79,7 @@ int r128_enable_vblank(struct drm_device *dev, int crtc) void r128_disable_vblank(struct drm_device *dev, int crtc) { if (crtc != 0) - DRM_ERROR("%s: bad crtc %d\n", __FUNCTION__, crtc); + DRM_ERROR("%s: bad crtc %d\n", __func__, crtc); /* * FIXME: implement proper interrupt disable by using the vblank diff --git a/sys/dev/misc/cmx/cmx.c b/sys/dev/misc/cmx/cmx.c index 815590cedb..f3d1dcd837 100644 --- a/sys/dev/misc/cmx/cmx.c +++ b/sys/dev/misc/cmx/cmx.c @@ -62,7 +62,7 @@ #ifdef CMX_DEBUG #define DEBUG_printf(dev, fmt, args...) \ - device_printf(dev, "%s: " fmt, __FUNCTION__, ##args) + device_printf(dev, "%s: " fmt, __func__, ##args) #else #define DEBUG_printf(dev, fmt, args...) #endif diff --git a/sys/dev/raid/amr/amr.c b/sys/dev/raid/amr/amr.c index 08b2caba1f..7483fe5c7e 100644 --- a/sys/dev/raid/amr/amr.c +++ b/sys/dev/raid/amr/amr.c @@ -1383,7 +1383,7 @@ amr_setup_polled_dmamap(void *arg, bus_dma_segment_t *segs, int nsegs, int err) int mb_channel; if (err) { - device_printf(sc->amr_dev, "error %d in %s", err, __FUNCTION__); + device_printf(sc->amr_dev, "error %d in %s", err, __func__); ac->ac_status = AMR_STATUS_ABORTED; return; } @@ -1585,7 +1585,7 @@ amr_setup_data(void *arg, bus_dma_segment_t *segs, int nsegs, int err) int mb_channel; if (err) { - device_printf(sc->amr_dev, "error %d in %s", err, __FUNCTION__); + device_printf(sc->amr_dev, "error %d in %s", err, __func__); amr_abort_load(ac); return; } @@ -1621,7 +1621,7 @@ amr_setup_ccb(void *arg, bus_dma_segment_t *segs, int nsegs, int err) struct amr_ext_passthrough *aep = &ac->ac_ccb->ccb_epthru; if (err) { - device_printf(sc->amr_dev, "error %d in %s", err, __FUNCTION__); + device_printf(sc->amr_dev, "error %d in %s", err, __func__); amr_abort_load(ac); return; } diff --git a/sys/dev/raid/ciss/cissvar.h b/sys/dev/raid/ciss/cissvar.h index ae307ebd7a..6a873abbe4 100644 --- a/sys/dev/raid/ciss/cissvar.h +++ b/sys/dev/raid/ciss/cissvar.h @@ -387,4 +387,4 @@ padstr(char *targ, const char *src, int len) } #define ciss_report_request(a, b, c) \ - _ciss_report_request(a, b, c, __FUNCTION__) + _ciss_report_request(a, b, c, __func__) diff --git a/sys/dev/raid/hpt27xx/osm.h b/sys/dev/raid/hpt27xx/osm.h index e7c1552618..659428b30e 100644 --- a/sys/dev/raid/hpt27xx/osm.h +++ b/sys/dev/raid/hpt27xx/osm.h @@ -228,7 +228,7 @@ void __os_dbgbreak(const char *file, int line); #define os_dbgbreak() __os_dbgbreak(__FILE__, __LINE__) #define HPT_ASSERT(x) do { if (!(x)) os_dbgbreak(); } while (0) void os_check_stack(const char *location, int size); -#define HPT_CHECK_STACK(size) os_check_stack(__FUNCTION__, (size)) +#define HPT_CHECK_STACK(size) os_check_stack(__func__, (size)) #else #define KdPrint(x) #define HPT_ASSERT(x) diff --git a/sys/dev/raid/hptrr/osm.h b/sys/dev/raid/hptrr/osm.h index c0fd6561df..07ffcdeb74 100644 --- a/sys/dev/raid/hptrr/osm.h +++ b/sys/dev/raid/hptrr/osm.h @@ -194,7 +194,7 @@ void __os_dbgbreak(const char *file, int line); #define os_dbgbreak() __os_dbgbreak(__FILE__, __LINE__) #define HPT_ASSERT(x) do { if (!(x)) os_dbgbreak(); } while (0) void os_check_stack(const char *location, int size); -#define HPT_CHECK_STACK(size) os_check_stack(__FUNCTION__, (size)) +#define HPT_CHECK_STACK(size) os_check_stack(__func__, (size)) #else #define KdPrint(x) #define HPT_ASSERT(x) diff --git a/sys/dev/raid/mfi/mfivar.h b/sys/dev/raid/mfi/mfivar.h index a07f70c844..18eb7d708d 100644 --- a/sys/dev/raid/mfi/mfivar.h +++ b/sys/dev/raid/mfi/mfivar.h @@ -598,7 +598,7 @@ extern void mfi_dump_cmds(struct mfi_softc *sc); extern void mfi_validate_sg(struct mfi_softc *, struct mfi_command *, const char *, int ); #define MFI_PRINT_CMD(cm) mfi_print_cmd(cm) #define MFI_DUMP_CMDS(sc) mfi_dump_cmds(sc) -#define MFI_VALIDATE_CMD(sc, cm) mfi_validate_sg(sc, cm, __FUNCTION__, __LINE__) +#define MFI_VALIDATE_CMD(sc, cm) mfi_validate_sg(sc, cm, __func__, __LINE__) #else #define MFI_PRINT_CMD(cm) #define MFI_DUMP_CMDS(sc) diff --git a/sys/netproto/802_11/ieee80211_dragonfly.h b/sys/netproto/802_11/ieee80211_dragonfly.h index 8750d0eddc..9e7f08b711 100644 --- a/sys/netproto/802_11/ieee80211_dragonfly.h +++ b/sys/netproto/802_11/ieee80211_dragonfly.h @@ -62,8 +62,8 @@ extern struct lwkt_serialize wlan_global_serializer; extern int ieee80211_force_swcrypto; -#define wlan_serialize_enter() _wlan_serialize_enter(__FUNCTION__) -#define wlan_serialize_exit() _wlan_serialize_exit(__FUNCTION__) +#define wlan_serialize_enter() _wlan_serialize_enter(__func__) +#define wlan_serialize_exit() _wlan_serialize_exit(__func__) void _wlan_serialize_enter(const char *funcname); void _wlan_serialize_exit(const char *funcname); int wlan_serialize_sleep(void *ident, int flags, const char *wmesg, int timo); diff --git a/sys/sys/thread2.h b/sys/sys/thread2.h index 510bcd4f53..9c99d0a60d 100644 --- a/sys/sys/thread2.h +++ b/sys/sys/thread2.h @@ -69,19 +69,19 @@ _lwkt_token_held_excl(lwkt_token_t tok, thread_t td) #define __DEBUG_CRIT_PASS_ARG__ , id #define __DEBUG_CRIT_ENTER(td) _debug_crit_enter((td), id) #define __DEBUG_CRIT_EXIT(td) _debug_crit_exit((td), id) -#define crit_enter() _crit_enter(mycpu, __FUNCTION__) +#define crit_enter() _crit_enter(mycpu, __func__) #define crit_enter_id(id) _crit_enter(mycpu, id) -#define crit_enter_gd(curgd) _crit_enter((curgd), __FUNCTION__) -#define crit_enter_quick(curtd) _crit_enter_quick((curtd), __FUNCTION__) -#define crit_enter_hard() _crit_enter_hard(mycpu, __FUNCTION__) -#define crit_enter_hard_gd(curgd) _crit_enter_hard((curgd), __FUNCTION__) -#define crit_exit() _crit_exit(mycpu, __FUNCTION__) +#define crit_enter_gd(curgd) _crit_enter((curgd), __func__) +#define crit_enter_quick(curtd) _crit_enter_quick((curtd), __func__) +#define crit_enter_hard() _crit_enter_hard(mycpu, __func__) +#define crit_enter_hard_gd(curgd) _crit_enter_hard((curgd), __func__) +#define crit_exit() _crit_exit(mycpu, __func__) #define crit_exit_id(id) _crit_exit(mycpu, id) -#define crit_exit_gd(curgd) _crit_exit((curgd), __FUNCTION__) -#define crit_exit_quick(curtd) _crit_exit_quick((curtd), __FUNCTION__) -#define crit_exit_hard() _crit_exit_hard(mycpu, __FUNCTION__) -#define crit_exit_hard_gd(curgd) _crit_exit_hard((curgd), __FUNCTION__) -#define crit_exit_noyield(curtd) _crit_exit_noyield((curtd),__FUNCTION__) +#define crit_exit_gd(curgd) _crit_exit((curgd), __func__) +#define crit_exit_quick(curtd) _crit_exit_quick((curtd), __func__) +#define crit_exit_hard() _crit_exit_hard(mycpu, __func__) +#define crit_exit_hard_gd(curgd) _crit_exit_hard((curgd), __func__) +#define crit_exit_noyield(curtd) _crit_exit_noyield((curtd),__func__) #else #define __DEBUG_CRIT_ARG__ void #define __DEBUG_CRIT_ADD_ARG__ diff --git a/usr.sbin/802_11/hostapd/driver_dragonfly.c b/usr.sbin/802_11/hostapd/driver_dragonfly.c index 8dd031bc69..b20aea8fff 100644 --- a/usr.sbin/802_11/hostapd/driver_dragonfly.c +++ b/usr.sbin/802_11/hostapd/driver_dragonfly.c @@ -748,7 +748,7 @@ bsd_set_countermeasures(void *priv, int enabled) { struct bsd_driver_data *drv = priv; - wpa_printf(MSG_DEBUG, "%s: enabled=%d", __FUNCTION__, enabled); + wpa_printf(MSG_DEBUG, "%s: enabled=%d", __func__, enabled); return set80211param(drv, IEEE80211_IOC_COUNTERMEASURES, enabled); } diff --git a/usr.sbin/802_11/wpa_supplicant/driver_dragonfly.c b/usr.sbin/802_11/wpa_supplicant/driver_dragonfly.c index a0d2b2f62a..c027f5a375 100644 --- a/usr.sbin/802_11/wpa_supplicant/driver_dragonfly.c +++ b/usr.sbin/802_11/wpa_supplicant/driver_dragonfly.c @@ -219,7 +219,7 @@ wpa_driver_bsd_set_wpa_internal(void *priv, int wpa, int privacy) int ret = 0; wpa_printf(MSG_DEBUG, "%s: wpa=%d privacy=%d", - __FUNCTION__, wpa, privacy); + __func__, wpa, privacy); if (!wpa && wpa_driver_bsd_set_wpa_ie(drv, NULL, 0) < 0) ret = -1; @@ -234,7 +234,7 @@ wpa_driver_bsd_set_wpa_internal(void *priv, int wpa, int privacy) static int wpa_driver_bsd_set_wpa(void *priv, int enabled) { - wpa_printf(MSG_DEBUG, "%s: enabled=%d", __FUNCTION__, enabled); + wpa_printf(MSG_DEBUG, "%s: enabled=%d", __func__, enabled); return wpa_driver_bsd_set_wpa_internal(priv, enabled ? 3 : 0, enabled); } diff --git a/usr.sbin/pfctl/pfctl_optimize.c b/usr.sbin/pfctl/pfctl_optimize.c index 0d1e581821..b5e488728e 100644 --- a/usr.sbin/pfctl/pfctl_optimize.c +++ b/usr.sbin/pfctl/pfctl_optimize.c @@ -45,7 +45,7 @@ /* #define OPT_DEBUG 1 */ #ifdef OPT_DEBUG # define DEBUG(str, v...) \ - printf("%s: " str "\n", __FUNCTION__ , ## v) + printf("%s: " str "\n", __func__ , ## v) #else # define DEBUG(str, v...) ((void)0) #endif -- 2.41.0