summaryrefslogtreecommitdiffstats
path: root/sys/dev
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>2001-12-10 08:09:49 +0000
committerobrien <obrien@FreeBSD.org>2001-12-10 08:09:49 +0000
commit7fd9a6a23abf2fb25b5925b444d0eed93c8d06f6 (patch)
treeb580d740769b3b201f76ad941e8b0b8ca3015bc0 /sys/dev
parent957a76ab241ec60b1b21124054416935dba9688b (diff)
downloadFreeBSD-src-7fd9a6a23abf2fb25b5925b444d0eed93c8d06f6.zip
FreeBSD-src-7fd9a6a23abf2fb25b5925b444d0eed93c8d06f6.tar.gz
Update to C99, s/__FUNCTION__/__func__/,
also don't use ANSI string concatenation.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/aac/aacvar.h6
-rw-r--r--sys/dev/agp/agp_intel.c8
-rw-r--r--sys/dev/amr/amrvar.h6
-rw-r--r--sys/dev/ciss/cissvar.h4
-rw-r--r--sys/dev/fb/s3_pci.c10
-rw-r--r--sys/dev/ichsmb/ichsmb.c24
-rw-r--r--sys/dev/iicbus/if_ic.c2
-rw-r--r--sys/dev/iicbus/iic.c4
-rw-r--r--sys/dev/iicbus/iicbus.c4
-rw-r--r--sys/dev/iicbus/iicsmb.c6
-rw-r--r--sys/dev/mlx/mlx.c2
-rw-r--r--sys/dev/mlx/mlxvar.h4
-rw-r--r--sys/dev/mly/mlyvar.h4
-rw-r--r--sys/dev/pcf/pcf.c2
-rw-r--r--sys/dev/ppbus/ppb_1284.c6
-rw-r--r--sys/dev/ppbus/ppb_msq.c14
-rw-r--r--sys/dev/ppbus/vpoio.c4
-rw-r--r--sys/dev/ppc/ppc.c22
-rw-r--r--sys/dev/ray/if_raydbg.h10
-rw-r--r--sys/dev/ray/if_rayvar.h8
-rw-r--r--sys/dev/sound/pcm/buffer.c24
-rw-r--r--sys/dev/sound/pcm/channel.c10
-rw-r--r--sys/dev/twe/twevar.h4
-rw-r--r--sys/dev/wi/if_wi.c4
24 files changed, 96 insertions, 96 deletions
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));
OpenPOWER on IntegriCloud