Skip to content

Commit bf9d892

Browse files
hharrisontorvalds
authored andcommitted
drivers/char: replace remaining __FUNCTION__ occurrences
__FUNCTION__ is gcc-specific, use __func__ Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 8e24eea commit bf9d892

24 files changed

Lines changed: 91 additions & 91 deletions

‎drivers/char/agp/agp.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535

3636
//#define AGP_DEBUG 1
3737
#ifdef AGP_DEBUG
38-
#define DBG(x,y...) printk (KERN_DEBUG PFX "%s: " x "\n", __FUNCTION__ , ## y)
38+
#define DBG(x,y...) printk (KERN_DEBUG PFX "%s: " x "\n", __func__ , ## y)
3939
#else
4040
#define DBG(x,y...) do { } while (0)
4141
#endif

‎drivers/char/cyclades.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3490,7 +3490,7 @@ static int cy_tiocmget(struct tty_struct *tty, struct file *file)
34903490
struct BOARD_CTRL __iomem *board_ctrl;
34913491
struct CH_CTRL __iomem *ch_ctrl;
34923492

3493-
if (serial_paranoia_check(info, tty->name, __FUNCTION__))
3493+
if (serial_paranoia_check(info, tty->name, __func__))
34943494
return -ENODEV;
34953495

34963496
lock_kernel();
@@ -3561,7 +3561,7 @@ cy_tiocmset(struct tty_struct *tty, struct file *file,
35613561
struct CH_CTRL __iomem *ch_ctrl;
35623562
int retval;
35633563

3564-
if (serial_paranoia_check(info, tty->name, __FUNCTION__))
3564+
if (serial_paranoia_check(info, tty->name, __func__))
35653565
return -ENODEV;
35663566

35673567
card = info->card;

‎drivers/char/drm/drmP.h‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ struct drm_device;
160160
* \param arg arguments
161161
*/
162162
#define DRM_ERROR(fmt, arg...) \
163-
printk(KERN_ERR "[" DRM_NAME ":%s] *ERROR* " fmt , __FUNCTION__ , ##arg)
163+
printk(KERN_ERR "[" DRM_NAME ":%s] *ERROR* " fmt , __func__ , ##arg)
164164

165165
/**
166166
* Memory error output.
@@ -170,7 +170,7 @@ struct drm_device;
170170
* \param arg arguments
171171
*/
172172
#define DRM_MEM_ERROR(area, fmt, arg...) \
173-
printk(KERN_ERR "[" DRM_NAME ":%s:%s] *ERROR* " fmt , __FUNCTION__, \
173+
printk(KERN_ERR "[" DRM_NAME ":%s:%s] *ERROR* " fmt , __func__, \
174174
drm_mem_stats[area].name , ##arg)
175175

176176
#define DRM_INFO(fmt, arg...) printk(KERN_INFO "[" DRM_NAME "] " fmt , ##arg)
@@ -187,7 +187,7 @@ struct drm_device;
187187
if ( drm_debug ) \
188188
printk(KERN_DEBUG \
189189
"[" DRM_NAME ":%s] " fmt , \
190-
__FUNCTION__ , ##arg); \
190+
__func__ , ##arg); \
191191
} while (0)
192192
#else
193193
#define DRM_DEBUG(fmt, arg...) do { } while (0)
@@ -238,7 +238,7 @@ do { \
238238
if ( !_DRM_LOCK_IS_HELD( dev->lock.hw_lock->lock ) || \
239239
dev->lock.file_priv != file_priv ) { \
240240
DRM_ERROR( "%s called without lock held, held %d owner %p %p\n",\
241-
__FUNCTION__, _DRM_LOCK_IS_HELD( dev->lock.hw_lock->lock ),\
241+
__func__, _DRM_LOCK_IS_HELD( dev->lock.hw_lock->lock ),\
242242
dev->lock.file_priv, file_priv ); \
243243
return -EINVAL; \
244244
} \

‎drivers/char/drm/drm_sysfs.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ static int drm_sysfs_suspend(struct device *dev, pm_message_t state)
3434
struct drm_minor *drm_minor = to_drm_minor(dev);
3535
struct drm_device *drm_dev = drm_minor->dev;
3636

37-
printk(KERN_ERR "%s\n", __FUNCTION__);
37+
printk(KERN_ERR "%s\n", __func__);
3838

3939
if (drm_dev->driver->suspend)
4040
return drm_dev->driver->suspend(drm_dev, state);

‎drivers/char/drm/i830_dma.c‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -692,7 +692,7 @@ static void i830EmitState(struct drm_device * dev)
692692
drm_i830_sarea_t *sarea_priv = dev_priv->sarea_priv;
693693
unsigned int dirty = sarea_priv->dirty;
694694

695-
DRM_DEBUG("%s %x\n", __FUNCTION__, dirty);
695+
DRM_DEBUG("%s %x\n", __func__, dirty);
696696

697697
if (dirty & I830_UPLOAD_BUFFERS) {
698698
i830EmitDestVerified(dev, sarea_priv->BufferState);
@@ -1043,7 +1043,7 @@ static void i830_dma_dispatch_flip(struct drm_device * dev)
10431043
RING_LOCALS;
10441044

10451045
DRM_DEBUG("%s: page=%d pfCurrentPage=%d\n",
1046-
__FUNCTION__,
1046+
__func__,
10471047
dev_priv->current_page,
10481048
dev_priv->sarea_priv->pf_current_page);
10491049

@@ -1206,7 +1206,7 @@ static void i830_dma_quiescent(struct drm_device * dev)
12061206
OUT_RING(0);
12071207
ADVANCE_LP_RING();
12081208

1209-
i830_wait_ring(dev, dev_priv->ring.Size - 8, __FUNCTION__);
1209+
i830_wait_ring(dev, dev_priv->ring.Size - 8, __func__);
12101210
}
12111211

12121212
static int i830_flush_queue(struct drm_device * dev)
@@ -1223,7 +1223,7 @@ static int i830_flush_queue(struct drm_device * dev)
12231223
OUT_RING(0);
12241224
ADVANCE_LP_RING();
12251225

1226-
i830_wait_ring(dev, dev_priv->ring.Size - 8, __FUNCTION__);
1226+
i830_wait_ring(dev, dev_priv->ring.Size - 8, __func__);
12271227

12281228
for (i = 0; i < dma->buf_count; i++) {
12291229
struct drm_buf *buf = dma->buflist[i];
@@ -1344,7 +1344,7 @@ static void i830_do_init_pageflip(struct drm_device * dev)
13441344
{
13451345
drm_i830_private_t *dev_priv = dev->dev_private;
13461346

1347-
DRM_DEBUG("%s\n", __FUNCTION__);
1347+
DRM_DEBUG("%s\n", __func__);
13481348
dev_priv->page_flipping = 1;
13491349
dev_priv->current_page = 0;
13501350
dev_priv->sarea_priv->pf_current_page = dev_priv->current_page;
@@ -1354,7 +1354,7 @@ static int i830_do_cleanup_pageflip(struct drm_device * dev)
13541354
{
13551355
drm_i830_private_t *dev_priv = dev->dev_private;
13561356

1357-
DRM_DEBUG("%s\n", __FUNCTION__);
1357+
DRM_DEBUG("%s\n", __func__);
13581358
if (dev_priv->current_page != 0)
13591359
i830_dma_dispatch_flip(dev);
13601360

@@ -1367,7 +1367,7 @@ static int i830_flip_bufs(struct drm_device *dev, void *data,
13671367
{
13681368
drm_i830_private_t *dev_priv = dev->dev_private;
13691369

1370-
DRM_DEBUG("%s\n", __FUNCTION__);
1370+
DRM_DEBUG("%s\n", __func__);
13711371

13721372
LOCK_TEST_WITH_RETURN(dev, file_priv);
13731373

@@ -1437,7 +1437,7 @@ static int i830_getparam(struct drm_device *dev, void *data,
14371437
int value;
14381438

14391439
if (!dev_priv) {
1440-
DRM_ERROR("%s called with no initialization\n", __FUNCTION__);
1440+
DRM_ERROR("%s called with no initialization\n", __func__);
14411441
return -EINVAL;
14421442
}
14431443

@@ -1464,7 +1464,7 @@ static int i830_setparam(struct drm_device *dev, void *data,
14641464
drm_i830_setparam_t *param = data;
14651465

14661466
if (!dev_priv) {
1467-
DRM_ERROR("%s called with no initialization\n", __FUNCTION__);
1467+
DRM_ERROR("%s called with no initialization\n", __func__);
14681468
return -EINVAL;
14691469
}
14701470

‎drivers/char/drm/i830_drv.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ extern int i830_driver_device_is_agp(struct drm_device * dev);
158158
if (I830_VERBOSE) \
159159
printk("BEGIN_LP_RING(%d)\n", (n)); \
160160
if (dev_priv->ring.space < n*4) \
161-
i830_wait_ring(dev, n*4, __FUNCTION__); \
161+
i830_wait_ring(dev, n*4, __func__); \
162162
outcount = 0; \
163163
outring = dev_priv->ring.tail; \
164164
ringmask = dev_priv->ring.tail_mask; \

‎drivers/char/drm/i830_irq.c‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ static int i830_emit_irq(struct drm_device * dev)
5858
drm_i830_private_t *dev_priv = dev->dev_private;
5959
RING_LOCALS;
6060

61-
DRM_DEBUG("%s\n", __FUNCTION__);
61+
DRM_DEBUG("%s\n", __func__);
6262

6363
atomic_inc(&dev_priv->irq_emitted);
6464

@@ -77,7 +77,7 @@ static int i830_wait_irq(struct drm_device * dev, int irq_nr)
7777
unsigned long end = jiffies + HZ * 3;
7878
int ret = 0;
7979

80-
DRM_DEBUG("%s\n", __FUNCTION__);
80+
DRM_DEBUG("%s\n", __func__);
8181

8282
if (atomic_read(&dev_priv->irq_received) >= irq_nr)
8383
return 0;
@@ -124,7 +124,7 @@ int i830_irq_emit(struct drm_device *dev, void *data,
124124
LOCK_TEST_WITH_RETURN(dev, file_priv);
125125

126126
if (!dev_priv) {
127-
DRM_ERROR("%s called with no initialization\n", __FUNCTION__);
127+
DRM_ERROR("%s called with no initialization\n", __func__);
128128
return -EINVAL;
129129
}
130130

@@ -147,7 +147,7 @@ int i830_irq_wait(struct drm_device *dev, void *data,
147147
drm_i830_irq_wait_t *irqwait = data;
148148

149149
if (!dev_priv) {
150-
DRM_ERROR("%s called with no initialization\n", __FUNCTION__);
150+
DRM_ERROR("%s called with no initialization\n", __func__);
151151
return -EINVAL;
152152
}
153153

‎drivers/char/drm/i915_dma.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ static int i915_dma_resume(struct drm_device * dev)
194194
{
195195
drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private;
196196

197-
DRM_DEBUG("%s\n", __FUNCTION__);
197+
DRM_DEBUG("%s\n", __func__);
198198

199199
if (!dev_priv->sarea) {
200200
DRM_ERROR("can not find sarea!\n");
@@ -609,7 +609,7 @@ static int i915_quiescent(struct drm_device * dev)
609609
drm_i915_private_t *dev_priv = dev->dev_private;
610610

611611
i915_kernel_lost_context(dev);
612-
return i915_wait_ring(dev, dev_priv->ring.Size - 8, __FUNCTION__);
612+
return i915_wait_ring(dev, dev_priv->ring.Size - 8, __func__);
613613
}
614614

615615
static int i915_flush_ioctl(struct drm_device *dev, void *data,

‎drivers/char/drm/i915_drv.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ extern void i915_mem_release(struct drm_device * dev,
272272
if (I915_VERBOSE) \
273273
DRM_DEBUG("BEGIN_LP_RING(%d)\n", (n)); \
274274
if (dev_priv->ring.space < (n)*4) \
275-
i915_wait_ring(dev, (n)*4, __FUNCTION__); \
275+
i915_wait_ring(dev, (n)*4, __func__); \
276276
outcount = 0; \
277277
outring = dev_priv->ring.tail; \
278278
ringmask = dev_priv->ring.tail_mask; \

‎drivers/char/drm/radeon_cp.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -894,7 +894,7 @@ static u32 RADEON_READ_IGPGART(drm_radeon_private_t *dev_priv, int addr)
894894
#if RADEON_FIFO_DEBUG
895895
static void radeon_status(drm_radeon_private_t * dev_priv)
896896
{
897-
printk("%s:\n", __FUNCTION__);
897+
printk("%s:\n", __func__);
898898
printk("RBBM_STATUS = 0x%08x\n",
899899
(unsigned int)RADEON_READ(RADEON_RBBM_STATUS));
900900
printk("CP_RB_RTPR = 0x%08x\n",

0 commit comments

Comments
 (0)