Commit 97f068ec authored by Linus Torvalds's avatar Linus Torvalds

Don't use __func__ - not all versions of gcc support it.

Some day gcc may drop support for __FUNCTION__ entirely, we'll
just add a #define __FUNCTION__ __func__ at that point. In the
meantime, gcc-3.x warns about pasting __FUNCTION__, so don't do it.
parent 9d5dd622
......@@ -696,7 +696,7 @@ int mga_dma_flush( DRM_IOCTL_ARGS )
#if MGA_DMA_DEBUG
int ret = mga_do_wait_for_idle( dev_priv );
if ( ret < 0 )
DRM_INFO( "%s: -EBUSY\n", __func__ );
DRM_INFO( "%s: -EBUSY\n", __FUNCTION__ );
return ret;
#else
return mga_do_wait_for_idle( dev_priv );
......
......@@ -188,7 +188,7 @@ do { \
if ( !_DRM_LOCK_IS_HELD( dev->lock.hw_lock->lock ) || \
dev->lock.pid != DRM_CURRENTPID ) { \
DRM_ERROR( "%s called without lock held\n", \
__func__ ); \
__FUNCTION__ ); \
return DRM_ERR(EINVAL); \
} \
} while (0)
......@@ -201,7 +201,7 @@ do { \
} else if ( dev_priv->prim.space < \
dev_priv->prim.high_mark ) { \
if ( MGA_DMA_DEBUG ) \
DRM_INFO( "%s: wrap...\n", __func__ ); \
DRM_INFO( "%s: wrap...\n", __FUNCTION__ ); \
return DRM_ERR(EBUSY); \
} \
} \
......@@ -212,7 +212,7 @@ do { \
if ( test_bit( 0, &dev_priv->prim.wrapped ) ) { \
if ( mga_do_wait_for_idle( dev_priv ) < 0 ) { \
if ( MGA_DMA_DEBUG ) \
DRM_INFO( "%s: wrap...\n", __func__ ); \
DRM_INFO( "%s: wrap...\n", __FUNCTION__ ); \
return DRM_ERR(EBUSY); \
} \
mga_do_dma_wrap_end( dev_priv ); \
......@@ -234,7 +234,7 @@ do { \
do { \
if ( MGA_VERBOSE ) { \
DRM_INFO( "BEGIN_DMA( %d ) in %s\n", \
(n), __func__ ); \
(n), __FUNCTION__ ); \
DRM_INFO( " space=0x%x req=0x%x\n", \
dev_priv->prim.space, (n) * DMA_BLOCK_SIZE ); \
} \
......@@ -245,7 +245,7 @@ do { \
#define BEGIN_DMA_WRAP() \
do { \
if ( MGA_VERBOSE ) { \
DRM_INFO( "BEGIN_DMA() in %s\n", __func__ ); \
DRM_INFO( "BEGIN_DMA() in %s\n", __FUNCTION__ ); \
DRM_INFO( " space=0x%x\n", dev_priv->prim.space ); \
} \
prim = dev_priv->prim.start; \
......@@ -264,7 +264,7 @@ do { \
#define FLUSH_DMA() \
do { \
if ( 0 ) { \
DRM_INFO( "%s:\n", __func__ ); \
DRM_INFO( "%s:\n", __FUNCTION__ ); \
DRM_INFO( " tail=0x%06x head=0x%06lx\n", \
dev_priv->prim.tail, \
MGA_READ( MGA_PRIMADDRESS ) - \
......
......@@ -662,7 +662,7 @@ static void mga_dma_dispatch_swap( drm_device_t *dev )
FLUSH_DMA();
DRM_DEBUG( "%s... done.\n", __func__ );
DRM_DEBUG( "%s... done.\n", __FUNCTION__ );
}
static void mga_dma_dispatch_vertex( drm_device_t *dev, drm_buf_t *buf )
......@@ -1023,7 +1023,7 @@ int mga_dma_iload( DRM_IOCTL_ARGS )
#if 0
if ( mga_do_wait_for_idle( dev_priv ) < 0 ) {
if ( MGA_DMA_DEBUG )
DRM_INFO( "%s: -EBUSY\n", __func__ );
DRM_INFO( "%s: -EBUSY\n", __FUNCTION__ );
return DRM_ERR(EBUSY);
}
#endif
......
......@@ -666,7 +666,7 @@ int r128_cce_start( DRM_IOCTL_ARGS )
LOCK_TEST_WITH_RETURN( dev );
if ( dev_priv->cce_running || dev_priv->cce_mode == R128_PM4_NONPM4 ) {
DRM_DEBUG( "%s while CCE running\n", __func__ );
DRM_DEBUG( "%s while CCE running\n", __FUNCTION__ );
return 0;
}
......@@ -728,7 +728,7 @@ int r128_cce_reset( DRM_IOCTL_ARGS )
LOCK_TEST_WITH_RETURN( dev );
if ( !dev_priv ) {
DRM_DEBUG( "%s called before init done\n", __func__ );
DRM_DEBUG( "%s called before init done\n", __FUNCTION__ );
return DRM_ERR(EINVAL);
}
......
......@@ -401,7 +401,7 @@ extern int R128_READ_PLL(drm_device_t *dev, int addr);
do { \
if ( !_DRM_LOCK_IS_HELD( dev->lock.hw_lock->lock ) || \
dev->lock.pid != DRM_CURRENTPID ) { \
DRM_ERROR( "%s called without lock held\n", __func__ ); \
DRM_ERROR( "%s called without lock held\n", __FUNCTION__ ); \
return DRM_ERR(EINVAL); \
} \
} while (0)
......@@ -459,7 +459,7 @@ do { \
#define BEGIN_RING( n ) do { \
if ( R128_VERBOSE ) { \
DRM_INFO( "BEGIN_RING( %d ) in %s\n", \
(n), __func__ ); \
(n), __FUNCTION__ ); \
} \
if ( dev_priv->ring.space <= (n) * sizeof(u32) ) { \
r128_wait_ring( dev_priv, (n) * sizeof(u32) ); \
......
......@@ -43,7 +43,7 @@ static void r128_emit_clip_rects( drm_r128_private_t *dev_priv,
{
u32 aux_sc_cntl = 0x00000000;
RING_LOCALS;
DRM_DEBUG( " %s\n", __func__ );
DRM_DEBUG( " %s\n", __FUNCTION__ );
BEGIN_RING( 17 );
......@@ -86,7 +86,7 @@ static __inline__ void r128_emit_core( drm_r128_private_t *dev_priv )
drm_r128_sarea_t *sarea_priv = dev_priv->sarea_priv;
drm_r128_context_regs_t *ctx = &sarea_priv->context_state;
RING_LOCALS;
DRM_DEBUG( " %s\n", __func__ );
DRM_DEBUG( " %s\n", __FUNCTION__ );
BEGIN_RING( 2 );
......@@ -101,7 +101,7 @@ static __inline__ void r128_emit_context( drm_r128_private_t *dev_priv )
drm_r128_sarea_t *sarea_priv = dev_priv->sarea_priv;
drm_r128_context_regs_t *ctx = &sarea_priv->context_state;
RING_LOCALS;
DRM_DEBUG( " %s\n", __func__ );
DRM_DEBUG( " %s\n", __FUNCTION__ );
BEGIN_RING( 13 );
......@@ -127,7 +127,7 @@ static __inline__ void r128_emit_setup( drm_r128_private_t *dev_priv )
drm_r128_sarea_t *sarea_priv = dev_priv->sarea_priv;
drm_r128_context_regs_t *ctx = &sarea_priv->context_state;
RING_LOCALS;
DRM_DEBUG( " %s\n", __func__ );
DRM_DEBUG( " %s\n", __FUNCTION__ );
BEGIN_RING( 3 );
......@@ -143,7 +143,7 @@ static __inline__ void r128_emit_masks( drm_r128_private_t *dev_priv )
drm_r128_sarea_t *sarea_priv = dev_priv->sarea_priv;
drm_r128_context_regs_t *ctx = &sarea_priv->context_state;
RING_LOCALS;
DRM_DEBUG( " %s\n", __func__ );
DRM_DEBUG( " %s\n", __FUNCTION__ );
BEGIN_RING( 5 );
......@@ -162,7 +162,7 @@ static __inline__ void r128_emit_window( drm_r128_private_t *dev_priv )
drm_r128_sarea_t *sarea_priv = dev_priv->sarea_priv;
drm_r128_context_regs_t *ctx = &sarea_priv->context_state;
RING_LOCALS;
DRM_DEBUG( " %s\n", __func__ );
DRM_DEBUG( " %s\n", __FUNCTION__ );
BEGIN_RING( 2 );
......@@ -179,7 +179,7 @@ static __inline__ void r128_emit_tex0( drm_r128_private_t *dev_priv )
drm_r128_texture_regs_t *tex = &sarea_priv->tex_state[0];
int i;
RING_LOCALS;
DRM_DEBUG( " %s\n", __func__ );
DRM_DEBUG( " %s\n", __FUNCTION__ );
BEGIN_RING( 7 + R128_MAX_TEXTURE_LEVELS );
......@@ -205,7 +205,7 @@ static __inline__ void r128_emit_tex1( drm_r128_private_t *dev_priv )
drm_r128_texture_regs_t *tex = &sarea_priv->tex_state[1];
int i;
RING_LOCALS;
DRM_DEBUG( " %s\n", __func__ );
DRM_DEBUG( " %s\n", __FUNCTION__ );
BEGIN_RING( 5 + R128_MAX_TEXTURE_LEVELS );
......@@ -228,7 +228,7 @@ static __inline__ void r128_emit_state( drm_r128_private_t *dev_priv )
drm_r128_sarea_t *sarea_priv = dev_priv->sarea_priv;
unsigned int dirty = sarea_priv->dirty;
DRM_DEBUG( "%s: dirty=0x%08x\n", __func__, dirty );
DRM_DEBUG( "%s: dirty=0x%08x\n", __FUNCTION__, dirty );
if ( dirty & R128_UPLOAD_CORE ) {
r128_emit_core( dev_priv );
......@@ -369,7 +369,7 @@ static void r128_cce_dispatch_clear( drm_device_t *dev,
unsigned int flags = clear->flags;
int i;
RING_LOCALS;
DRM_DEBUG( "%s\n", __func__ );
DRM_DEBUG( "%s\n", __FUNCTION__ );
if ( dev_priv->page_flipping && dev_priv->current_page == 1 ) {
unsigned int tmp = flags;
......@@ -472,7 +472,7 @@ static void r128_cce_dispatch_swap( drm_device_t *dev )
drm_clip_rect_t *pbox = sarea_priv->boxes;
int i;
RING_LOCALS;
DRM_DEBUG( "%s\n", __func__ );
DRM_DEBUG( "%s\n", __FUNCTION__ );
#if R128_PERFORMANCE_BOXES
/* Do some trivial performance monitoring...
......@@ -1148,7 +1148,7 @@ static int r128_cce_dispatch_read_pixels( drm_device_t *dev,
int count, *x, *y;
int i;
RING_LOCALS;
DRM_DEBUG( "%s\n", __func__ );
DRM_DEBUG( "%s\n", __FUNCTION__ );
count = depth->n;
if ( count > dev_priv->depth_pitch ) {
......@@ -1215,7 +1215,7 @@ static void r128_cce_dispatch_stipple( drm_device_t *dev, u32 *stipple )
drm_r128_private_t *dev_priv = dev->dev_private;
int i;
RING_LOCALS;
DRM_DEBUG( "%s\n", __func__ );
DRM_DEBUG( "%s\n", __FUNCTION__ );
BEGIN_RING( 33 );
......@@ -1264,7 +1264,7 @@ int r128_cce_swap( DRM_IOCTL_ARGS )
DRM_DEVICE;
drm_r128_private_t *dev_priv = dev->dev_private;
drm_r128_sarea_t *sarea_priv = dev_priv->sarea_priv;
DRM_DEBUG( "%s\n", __func__ );
DRM_DEBUG( "%s\n", __FUNCTION__ );
LOCK_TEST_WITH_RETURN( dev );
......@@ -1296,7 +1296,7 @@ int r128_cce_vertex( DRM_IOCTL_ARGS )
LOCK_TEST_WITH_RETURN( dev );
if ( !dev_priv ) {
DRM_ERROR( "%s called with no initialization\n", __func__ );
DRM_ERROR( "%s called with no initialization\n", __FUNCTION__ );
return DRM_ERR(EINVAL);
}
......@@ -1356,7 +1356,7 @@ int r128_cce_indices( DRM_IOCTL_ARGS )
LOCK_TEST_WITH_RETURN( dev );
if ( !dev_priv ) {
DRM_ERROR( "%s called with no initialization\n", __func__ );
DRM_ERROR( "%s called with no initialization\n", __FUNCTION__ );
return DRM_ERR(EINVAL);
}
......@@ -1505,7 +1505,7 @@ int r128_cce_indirect( DRM_IOCTL_ARGS )
LOCK_TEST_WITH_RETURN( dev );
if ( !dev_priv ) {
DRM_ERROR( "%s called with no initialization\n", __func__ );
DRM_ERROR( "%s called with no initialization\n", __FUNCTION__ );
return DRM_ERR(EINVAL);
}
......
......@@ -1307,12 +1307,12 @@ int radeon_cp_start( DRM_IOCTL_ARGS )
LOCK_TEST_WITH_RETURN( dev );
if ( dev_priv->cp_running ) {
DRM_DEBUG( "%s while CP running\n", __func__ );
DRM_DEBUG( "%s while CP running\n", __FUNCTION__ );
return 0;
}
if ( dev_priv->cp_mode == RADEON_CSQ_PRIDIS_INDDIS ) {
DRM_DEBUG( "%s called with bogus CP mode (%d)\n",
__func__, dev_priv->cp_mode );
__FUNCTION__, dev_priv->cp_mode );
return 0;
}
......@@ -1374,7 +1374,7 @@ int radeon_cp_reset( DRM_IOCTL_ARGS )
LOCK_TEST_WITH_RETURN( dev );
if ( !dev_priv ) {
DRM_DEBUG( "%s called before init done\n", __func__ );
DRM_DEBUG( "%s called before init done\n", __FUNCTION__ );
return DRM_ERR(EINVAL);
}
......
......@@ -680,7 +680,7 @@ extern int RADEON_READ_PLL( drm_device_t *dev, int addr );
do { \
if ( !_DRM_LOCK_IS_HELD( dev->lock.hw_lock->lock ) || \
dev->lock.pid != DRM_CURRENTPID ) { \
DRM_ERROR( "%s called without lock held\n", __func__ ); \
DRM_ERROR( "%s called without lock held\n", __FUNCTION__ ); \
return DRM_ERR(EINVAL); \
} \
} while (0)
......@@ -742,7 +742,7 @@ do { \
#define BEGIN_RING( n ) do { \
if ( RADEON_VERBOSE ) { \
DRM_INFO( "BEGIN_RING( %d ) in %s\n", \
n, __func__ ); \
n, __FUNCTION__ ); \
} \
if ( dev_priv->ring.space <= (n) * sizeof(u32) ) { \
COMMIT_RING(); \
......
......@@ -1383,7 +1383,7 @@ int radeon_cp_vertex( DRM_IOCTL_ARGS )
LOCK_TEST_WITH_RETURN( dev );
if ( !dev_priv ) {
DRM_ERROR( "%s called with no initialization\n", __func__ );
DRM_ERROR( "%s called with no initialization\n", __FUNCTION__ );
return DRM_ERR(EINVAL);
}
......@@ -1470,7 +1470,7 @@ int radeon_cp_indices( DRM_IOCTL_ARGS )
LOCK_TEST_WITH_RETURN( dev );
if ( !dev_priv ) {
DRM_ERROR( "%s called with no initialization\n", __func__ );
DRM_ERROR( "%s called with no initialization\n", __FUNCTION__ );
return DRM_ERR(EINVAL);
}
......@@ -1620,7 +1620,7 @@ int radeon_cp_indirect( DRM_IOCTL_ARGS )
LOCK_TEST_WITH_RETURN( dev );
if ( !dev_priv ) {
DRM_ERROR( "%s called with no initialization\n", __func__ );
DRM_ERROR( "%s called with no initialization\n", __FUNCTION__ );
return DRM_ERR(EINVAL);
}
......@@ -1697,7 +1697,7 @@ int radeon_cp_vertex2( DRM_IOCTL_ARGS )
LOCK_TEST_WITH_RETURN( dev );
if ( !dev_priv ) {
DRM_ERROR( "%s called with no initialization\n", __func__ );
DRM_ERROR( "%s called with no initialization\n", __FUNCTION__ );
return DRM_ERR(EINVAL);
}
......@@ -1975,7 +1975,7 @@ int radeon_cp_cmdbuf( DRM_IOCTL_ARGS )
LOCK_TEST_WITH_RETURN( dev );
if ( !dev_priv ) {
DRM_ERROR( "%s called with no initialization\n", __func__ );
DRM_ERROR( "%s called with no initialization\n", __FUNCTION__ );
return DRM_ERR(EINVAL);
}
......@@ -2097,7 +2097,7 @@ int radeon_cp_getparam( DRM_IOCTL_ARGS )
int value;
if ( !dev_priv ) {
DRM_ERROR( "%s called with no initialization\n", __func__ );
DRM_ERROR( "%s called with no initialization\n", __FUNCTION__ );
return DRM_ERR(EINVAL);
}
......
......@@ -73,16 +73,12 @@
extern void bluez_dump(char *pref, __u8 *buf, int count);
#if __GNUC__ <= 2 && __GNUC_MINOR__ < 95
#define __func__ __FUNCTION__
#endif
#define BT_INFO(fmt, arg...) printk(KERN_INFO fmt "\n" , ## arg)
#define BT_DBG(fmt, arg...) printk(KERN_INFO "%s: " fmt "\n" , __func__ , ## arg)
#define BT_ERR(fmt, arg...) printk(KERN_ERR "%s: " fmt "\n" , __func__ , ## arg)
#define BT_DBG(fmt, arg...) printk(KERN_INFO "%s: " fmt "\n" , __FUNCTION__ , ## arg)
#define BT_ERR(fmt, arg...) printk(KERN_ERR "%s: " fmt "\n" , __FUNCTION__ , ## arg)
#ifdef HCI_DATA_DUMP
#define BT_DMP(buf, len) bluez_dump(__func__, buf, len)
#define BT_DMP(buf, len) bluez_dump(__FUNCTION__, buf, len)
#else
#define BT_DMP(D...)
#endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment