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>
This commit is contained in:
Harvey Harrison 2008-04-30 00:55:10 -07:00 committed by Linus Torvalds
parent 8e24eea728
commit bf9d892952
24 changed files with 91 additions and 91 deletions

View File

@ -35,7 +35,7 @@
//#define AGP_DEBUG 1 //#define AGP_DEBUG 1
#ifdef AGP_DEBUG #ifdef AGP_DEBUG
#define DBG(x,y...) printk (KERN_DEBUG PFX "%s: " x "\n", __FUNCTION__ , ## y) #define DBG(x,y...) printk (KERN_DEBUG PFX "%s: " x "\n", __func__ , ## y)
#else #else
#define DBG(x,y...) do { } while (0) #define DBG(x,y...) do { } while (0)
#endif #endif

View File

@ -3490,7 +3490,7 @@ static int cy_tiocmget(struct tty_struct *tty, struct file *file)
struct BOARD_CTRL __iomem *board_ctrl; struct BOARD_CTRL __iomem *board_ctrl;
struct CH_CTRL __iomem *ch_ctrl; struct CH_CTRL __iomem *ch_ctrl;
if (serial_paranoia_check(info, tty->name, __FUNCTION__)) if (serial_paranoia_check(info, tty->name, __func__))
return -ENODEV; return -ENODEV;
lock_kernel(); lock_kernel();
@ -3561,7 +3561,7 @@ cy_tiocmset(struct tty_struct *tty, struct file *file,
struct CH_CTRL __iomem *ch_ctrl; struct CH_CTRL __iomem *ch_ctrl;
int retval; int retval;
if (serial_paranoia_check(info, tty->name, __FUNCTION__)) if (serial_paranoia_check(info, tty->name, __func__))
return -ENODEV; return -ENODEV;
card = info->card; card = info->card;

View File

@ -160,7 +160,7 @@ struct drm_device;
* \param arg arguments * \param arg arguments
*/ */
#define DRM_ERROR(fmt, arg...) \ #define DRM_ERROR(fmt, arg...) \
printk(KERN_ERR "[" DRM_NAME ":%s] *ERROR* " fmt , __FUNCTION__ , ##arg) printk(KERN_ERR "[" DRM_NAME ":%s] *ERROR* " fmt , __func__ , ##arg)
/** /**
* Memory error output. * Memory error output.
@ -170,7 +170,7 @@ struct drm_device;
* \param arg arguments * \param arg arguments
*/ */
#define DRM_MEM_ERROR(area, fmt, arg...) \ #define DRM_MEM_ERROR(area, fmt, arg...) \
printk(KERN_ERR "[" DRM_NAME ":%s:%s] *ERROR* " fmt , __FUNCTION__, \ printk(KERN_ERR "[" DRM_NAME ":%s:%s] *ERROR* " fmt , __func__, \
drm_mem_stats[area].name , ##arg) drm_mem_stats[area].name , ##arg)
#define DRM_INFO(fmt, arg...) printk(KERN_INFO "[" DRM_NAME "] " fmt , ##arg) #define DRM_INFO(fmt, arg...) printk(KERN_INFO "[" DRM_NAME "] " fmt , ##arg)
@ -187,7 +187,7 @@ struct drm_device;
if ( drm_debug ) \ if ( drm_debug ) \
printk(KERN_DEBUG \ printk(KERN_DEBUG \
"[" DRM_NAME ":%s] " fmt , \ "[" DRM_NAME ":%s] " fmt , \
__FUNCTION__ , ##arg); \ __func__ , ##arg); \
} while (0) } while (0)
#else #else
#define DRM_DEBUG(fmt, arg...) do { } while (0) #define DRM_DEBUG(fmt, arg...) do { } while (0)
@ -238,7 +238,7 @@ do { \
if ( !_DRM_LOCK_IS_HELD( dev->lock.hw_lock->lock ) || \ if ( !_DRM_LOCK_IS_HELD( dev->lock.hw_lock->lock ) || \
dev->lock.file_priv != file_priv ) { \ dev->lock.file_priv != file_priv ) { \
DRM_ERROR( "%s called without lock held, held %d owner %p %p\n",\ DRM_ERROR( "%s called without lock held, held %d owner %p %p\n",\
__FUNCTION__, _DRM_LOCK_IS_HELD( dev->lock.hw_lock->lock ),\ __func__, _DRM_LOCK_IS_HELD( dev->lock.hw_lock->lock ),\
dev->lock.file_priv, file_priv ); \ dev->lock.file_priv, file_priv ); \
return -EINVAL; \ return -EINVAL; \
} \ } \

View File

@ -34,7 +34,7 @@ static int drm_sysfs_suspend(struct device *dev, pm_message_t state)
struct drm_minor *drm_minor = to_drm_minor(dev); struct drm_minor *drm_minor = to_drm_minor(dev);
struct drm_device *drm_dev = drm_minor->dev; struct drm_device *drm_dev = drm_minor->dev;
printk(KERN_ERR "%s\n", __FUNCTION__); printk(KERN_ERR "%s\n", __func__);
if (drm_dev->driver->suspend) if (drm_dev->driver->suspend)
return drm_dev->driver->suspend(drm_dev, state); return drm_dev->driver->suspend(drm_dev, state);

View File

@ -692,7 +692,7 @@ static void i830EmitState(struct drm_device * dev)
drm_i830_sarea_t *sarea_priv = dev_priv->sarea_priv; drm_i830_sarea_t *sarea_priv = dev_priv->sarea_priv;
unsigned int dirty = sarea_priv->dirty; unsigned int dirty = sarea_priv->dirty;
DRM_DEBUG("%s %x\n", __FUNCTION__, dirty); DRM_DEBUG("%s %x\n", __func__, dirty);
if (dirty & I830_UPLOAD_BUFFERS) { if (dirty & I830_UPLOAD_BUFFERS) {
i830EmitDestVerified(dev, sarea_priv->BufferState); i830EmitDestVerified(dev, sarea_priv->BufferState);
@ -1043,7 +1043,7 @@ static void i830_dma_dispatch_flip(struct drm_device * dev)
RING_LOCALS; RING_LOCALS;
DRM_DEBUG("%s: page=%d pfCurrentPage=%d\n", DRM_DEBUG("%s: page=%d pfCurrentPage=%d\n",
__FUNCTION__, __func__,
dev_priv->current_page, dev_priv->current_page,
dev_priv->sarea_priv->pf_current_page); dev_priv->sarea_priv->pf_current_page);
@ -1206,7 +1206,7 @@ static void i830_dma_quiescent(struct drm_device * dev)
OUT_RING(0); OUT_RING(0);
ADVANCE_LP_RING(); ADVANCE_LP_RING();
i830_wait_ring(dev, dev_priv->ring.Size - 8, __FUNCTION__); i830_wait_ring(dev, dev_priv->ring.Size - 8, __func__);
} }
static int i830_flush_queue(struct drm_device * dev) static int i830_flush_queue(struct drm_device * dev)
@ -1223,7 +1223,7 @@ static int i830_flush_queue(struct drm_device * dev)
OUT_RING(0); OUT_RING(0);
ADVANCE_LP_RING(); ADVANCE_LP_RING();
i830_wait_ring(dev, dev_priv->ring.Size - 8, __FUNCTION__); i830_wait_ring(dev, dev_priv->ring.Size - 8, __func__);
for (i = 0; i < dma->buf_count; i++) { for (i = 0; i < dma->buf_count; i++) {
struct drm_buf *buf = dma->buflist[i]; struct drm_buf *buf = dma->buflist[i];
@ -1344,7 +1344,7 @@ static void i830_do_init_pageflip(struct drm_device * dev)
{ {
drm_i830_private_t *dev_priv = dev->dev_private; drm_i830_private_t *dev_priv = dev->dev_private;
DRM_DEBUG("%s\n", __FUNCTION__); DRM_DEBUG("%s\n", __func__);
dev_priv->page_flipping = 1; dev_priv->page_flipping = 1;
dev_priv->current_page = 0; dev_priv->current_page = 0;
dev_priv->sarea_priv->pf_current_page = dev_priv->current_page; 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)
{ {
drm_i830_private_t *dev_priv = dev->dev_private; drm_i830_private_t *dev_priv = dev->dev_private;
DRM_DEBUG("%s\n", __FUNCTION__); DRM_DEBUG("%s\n", __func__);
if (dev_priv->current_page != 0) if (dev_priv->current_page != 0)
i830_dma_dispatch_flip(dev); i830_dma_dispatch_flip(dev);
@ -1367,7 +1367,7 @@ static int i830_flip_bufs(struct drm_device *dev, void *data,
{ {
drm_i830_private_t *dev_priv = dev->dev_private; drm_i830_private_t *dev_priv = dev->dev_private;
DRM_DEBUG("%s\n", __FUNCTION__); DRM_DEBUG("%s\n", __func__);
LOCK_TEST_WITH_RETURN(dev, file_priv); LOCK_TEST_WITH_RETURN(dev, file_priv);
@ -1437,7 +1437,7 @@ static int i830_getparam(struct drm_device *dev, void *data,
int value; int value;
if (!dev_priv) { if (!dev_priv) {
DRM_ERROR("%s called with no initialization\n", __FUNCTION__); DRM_ERROR("%s called with no initialization\n", __func__);
return -EINVAL; return -EINVAL;
} }
@ -1464,7 +1464,7 @@ static int i830_setparam(struct drm_device *dev, void *data,
drm_i830_setparam_t *param = data; drm_i830_setparam_t *param = data;
if (!dev_priv) { if (!dev_priv) {
DRM_ERROR("%s called with no initialization\n", __FUNCTION__); DRM_ERROR("%s called with no initialization\n", __func__);
return -EINVAL; return -EINVAL;
} }

View File

@ -158,7 +158,7 @@ extern int i830_driver_device_is_agp(struct drm_device * dev);
if (I830_VERBOSE) \ if (I830_VERBOSE) \
printk("BEGIN_LP_RING(%d)\n", (n)); \ printk("BEGIN_LP_RING(%d)\n", (n)); \
if (dev_priv->ring.space < n*4) \ if (dev_priv->ring.space < n*4) \
i830_wait_ring(dev, n*4, __FUNCTION__); \ i830_wait_ring(dev, n*4, __func__); \
outcount = 0; \ outcount = 0; \
outring = dev_priv->ring.tail; \ outring = dev_priv->ring.tail; \
ringmask = dev_priv->ring.tail_mask; \ ringmask = dev_priv->ring.tail_mask; \

View File

@ -58,7 +58,7 @@ static int i830_emit_irq(struct drm_device * dev)
drm_i830_private_t *dev_priv = dev->dev_private; drm_i830_private_t *dev_priv = dev->dev_private;
RING_LOCALS; RING_LOCALS;
DRM_DEBUG("%s\n", __FUNCTION__); DRM_DEBUG("%s\n", __func__);
atomic_inc(&dev_priv->irq_emitted); atomic_inc(&dev_priv->irq_emitted);
@ -77,7 +77,7 @@ static int i830_wait_irq(struct drm_device * dev, int irq_nr)
unsigned long end = jiffies + HZ * 3; unsigned long end = jiffies + HZ * 3;
int ret = 0; int ret = 0;
DRM_DEBUG("%s\n", __FUNCTION__); DRM_DEBUG("%s\n", __func__);
if (atomic_read(&dev_priv->irq_received) >= irq_nr) if (atomic_read(&dev_priv->irq_received) >= irq_nr)
return 0; return 0;
@ -124,7 +124,7 @@ int i830_irq_emit(struct drm_device *dev, void *data,
LOCK_TEST_WITH_RETURN(dev, file_priv); LOCK_TEST_WITH_RETURN(dev, file_priv);
if (!dev_priv) { if (!dev_priv) {
DRM_ERROR("%s called with no initialization\n", __FUNCTION__); DRM_ERROR("%s called with no initialization\n", __func__);
return -EINVAL; return -EINVAL;
} }
@ -147,7 +147,7 @@ int i830_irq_wait(struct drm_device *dev, void *data,
drm_i830_irq_wait_t *irqwait = data; drm_i830_irq_wait_t *irqwait = data;
if (!dev_priv) { if (!dev_priv) {
DRM_ERROR("%s called with no initialization\n", __FUNCTION__); DRM_ERROR("%s called with no initialization\n", __func__);
return -EINVAL; return -EINVAL;
} }

View File

@ -194,7 +194,7 @@ static int i915_dma_resume(struct drm_device * dev)
{ {
drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private;
DRM_DEBUG("%s\n", __FUNCTION__); DRM_DEBUG("%s\n", __func__);
if (!dev_priv->sarea) { if (!dev_priv->sarea) {
DRM_ERROR("can not find sarea!\n"); DRM_ERROR("can not find sarea!\n");
@ -609,7 +609,7 @@ static int i915_quiescent(struct drm_device * dev)
drm_i915_private_t *dev_priv = dev->dev_private; drm_i915_private_t *dev_priv = dev->dev_private;
i915_kernel_lost_context(dev); i915_kernel_lost_context(dev);
return i915_wait_ring(dev, dev_priv->ring.Size - 8, __FUNCTION__); return i915_wait_ring(dev, dev_priv->ring.Size - 8, __func__);
} }
static int i915_flush_ioctl(struct drm_device *dev, void *data, static int i915_flush_ioctl(struct drm_device *dev, void *data,

View File

@ -272,7 +272,7 @@ extern void i915_mem_release(struct drm_device * dev,
if (I915_VERBOSE) \ if (I915_VERBOSE) \
DRM_DEBUG("BEGIN_LP_RING(%d)\n", (n)); \ DRM_DEBUG("BEGIN_LP_RING(%d)\n", (n)); \
if (dev_priv->ring.space < (n)*4) \ if (dev_priv->ring.space < (n)*4) \
i915_wait_ring(dev, (n)*4, __FUNCTION__); \ i915_wait_ring(dev, (n)*4, __func__); \
outcount = 0; \ outcount = 0; \
outring = dev_priv->ring.tail; \ outring = dev_priv->ring.tail; \
ringmask = dev_priv->ring.tail_mask; \ ringmask = dev_priv->ring.tail_mask; \

View File

@ -894,7 +894,7 @@ static u32 RADEON_READ_IGPGART(drm_radeon_private_t *dev_priv, int addr)
#if RADEON_FIFO_DEBUG #if RADEON_FIFO_DEBUG
static void radeon_status(drm_radeon_private_t * dev_priv) static void radeon_status(drm_radeon_private_t * dev_priv)
{ {
printk("%s:\n", __FUNCTION__); printk("%s:\n", __func__);
printk("RBBM_STATUS = 0x%08x\n", printk("RBBM_STATUS = 0x%08x\n",
(unsigned int)RADEON_READ(RADEON_RBBM_STATUS)); (unsigned int)RADEON_READ(RADEON_RBBM_STATUS));
printk("CP_RB_RTPR = 0x%08x\n", printk("CP_RB_RTPR = 0x%08x\n",

View File

@ -1671,7 +1671,7 @@ static int esp_tiocmget(struct tty_struct *tty, struct file *file)
unsigned char control, status; unsigned char control, status;
unsigned long flags; unsigned long flags;
if (serial_paranoia_check(info, tty->name, __FUNCTION__)) if (serial_paranoia_check(info, tty->name, __func__))
return -ENODEV; return -ENODEV;
if (tty->flags & (1 << TTY_IO_ERROR)) if (tty->flags & (1 << TTY_IO_ERROR))
return -EIO; return -EIO;
@ -1697,7 +1697,7 @@ static int esp_tiocmset(struct tty_struct *tty, struct file *file,
struct esp_struct *info = tty->driver_data; struct esp_struct *info = tty->driver_data;
unsigned long flags; unsigned long flags;
if (serial_paranoia_check(info, tty->name, __FUNCTION__)) if (serial_paranoia_check(info, tty->name, __func__))
return -ENODEV; return -ENODEV;
if (tty->flags & (1 << TTY_IO_ERROR)) if (tty->flags & (1 << TTY_IO_ERROR))
return -EIO; return -EIO;

View File

@ -40,8 +40,8 @@ static int gs_debug;
#define gs_dprintk(f, str...) /* nothing */ #define gs_dprintk(f, str...) /* nothing */
#endif #endif
#define func_enter() gs_dprintk (GS_DEBUG_FLOW, "gs: enter %s\n", __FUNCTION__) #define func_enter() gs_dprintk (GS_DEBUG_FLOW, "gs: enter %s\n", __func__)
#define func_exit() gs_dprintk (GS_DEBUG_FLOW, "gs: exit %s\n", __FUNCTION__) #define func_exit() gs_dprintk (GS_DEBUG_FLOW, "gs: exit %s\n", __func__)
#define RS_EVENT_WRITE_WAKEUP 1 #define RS_EVENT_WRITE_WAKEUP 1

View File

@ -308,7 +308,7 @@ static int hpet_mmap(struct file *file, struct vm_area_struct *vma)
if (io_remap_pfn_range(vma, vma->vm_start, addr >> PAGE_SHIFT, if (io_remap_pfn_range(vma, vma->vm_start, addr >> PAGE_SHIFT,
PAGE_SIZE, vma->vm_page_prot)) { PAGE_SIZE, vma->vm_page_prot)) {
printk(KERN_ERR "%s: io_remap_pfn_range failed\n", printk(KERN_ERR "%s: io_remap_pfn_range failed\n",
__FUNCTION__); __func__);
return -EAGAIN; return -EAGAIN;
} }
@ -748,7 +748,7 @@ int hpet_alloc(struct hpet_data *hdp)
*/ */
if (hpet_is_known(hdp)) { if (hpet_is_known(hdp)) {
printk(KERN_DEBUG "%s: duplicate HPET ignored\n", printk(KERN_DEBUG "%s: duplicate HPET ignored\n",
__FUNCTION__); __func__);
return 0; return 0;
} }
@ -869,7 +869,7 @@ static acpi_status hpet_resources(struct acpi_resource *res, void *data)
if (hpet_is_known(hdp)) { if (hpet_is_known(hdp)) {
printk(KERN_DEBUG "%s: 0x%lx is busy\n", printk(KERN_DEBUG "%s: 0x%lx is busy\n",
__FUNCTION__, hdp->hd_phys_address); __func__, hdp->hd_phys_address);
iounmap(hdp->hd_address); iounmap(hdp->hd_address);
return AE_ALREADY_EXISTS; return AE_ALREADY_EXISTS;
} }
@ -886,7 +886,7 @@ static acpi_status hpet_resources(struct acpi_resource *res, void *data)
if (hpet_is_known(hdp)) { if (hpet_is_known(hdp)) {
printk(KERN_DEBUG "%s: 0x%lx is busy\n", printk(KERN_DEBUG "%s: 0x%lx is busy\n",
__FUNCTION__, hdp->hd_phys_address); __func__, hdp->hd_phys_address);
iounmap(hdp->hd_address); iounmap(hdp->hd_address);
return AE_ALREADY_EXISTS; return AE_ALREADY_EXISTS;
} }
@ -925,7 +925,7 @@ static int hpet_acpi_add(struct acpi_device *device)
return -ENODEV; return -ENODEV;
if (!data.hd_address || !data.hd_nirqs) { if (!data.hd_address || !data.hd_nirqs) {
printk("%s: no address or irqs in _CRS\n", __FUNCTION__); printk("%s: no address or irqs in _CRS\n", __func__);
return -ENODEV; return -ENODEV;
} }

View File

@ -246,7 +246,7 @@ static void compact_inbuf(struct hvsi_struct *hp, uint8_t *read_to)
{ {
int remaining = (int)(hp->inbuf_end - read_to); int remaining = (int)(hp->inbuf_end - read_to);
pr_debug("%s: %i chars remain\n", __FUNCTION__, remaining); pr_debug("%s: %i chars remain\n", __func__, remaining);
if (read_to != hp->inbuf) if (read_to != hp->inbuf)
memmove(hp->inbuf, read_to, remaining); memmove(hp->inbuf, read_to, remaining);
@ -365,7 +365,7 @@ static int hvsi_version_respond(struct hvsi_struct *hp, uint16_t query_seqno)
packet.u.version = HVSI_VERSION; packet.u.version = HVSI_VERSION;
packet.query_seqno = query_seqno+1; packet.query_seqno = query_seqno+1;
pr_debug("%s: sending %i bytes\n", __FUNCTION__, packet.len); pr_debug("%s: sending %i bytes\n", __func__, packet.len);
dbg_dump_hex((uint8_t*)&packet, packet.len); dbg_dump_hex((uint8_t*)&packet, packet.len);
wrote = hvc_put_chars(hp->vtermno, (char *)&packet, packet.len); wrote = hvc_put_chars(hp->vtermno, (char *)&packet, packet.len);
@ -437,7 +437,7 @@ static struct tty_struct *hvsi_recv_data(struct hvsi_struct *hp,
return NULL; return NULL;
if (overflow > 0) { if (overflow > 0) {
pr_debug("%s: got >TTY_THRESHOLD_THROTTLE bytes\n", __FUNCTION__); pr_debug("%s: got >TTY_THRESHOLD_THROTTLE bytes\n", __func__);
datalen = TTY_THRESHOLD_THROTTLE; datalen = TTY_THRESHOLD_THROTTLE;
} }
@ -448,7 +448,7 @@ static struct tty_struct *hvsi_recv_data(struct hvsi_struct *hp,
* we still have more data to deliver, so we need to save off the * we still have more data to deliver, so we need to save off the
* overflow and send it later * overflow and send it later
*/ */
pr_debug("%s: deferring overflow\n", __FUNCTION__); pr_debug("%s: deferring overflow\n", __func__);
memcpy(hp->throttle_buf, data + TTY_THRESHOLD_THROTTLE, overflow); memcpy(hp->throttle_buf, data + TTY_THRESHOLD_THROTTLE, overflow);
hp->n_throttle = overflow; hp->n_throttle = overflow;
} }
@ -474,11 +474,11 @@ static int hvsi_load_chunk(struct hvsi_struct *hp, struct tty_struct **flip,
chunklen = hvsi_read(hp, hp->inbuf_end, HVSI_MAX_READ); chunklen = hvsi_read(hp, hp->inbuf_end, HVSI_MAX_READ);
if (chunklen == 0) { if (chunklen == 0) {
pr_debug("%s: 0-length read\n", __FUNCTION__); pr_debug("%s: 0-length read\n", __func__);
return 0; return 0;
} }
pr_debug("%s: got %i bytes\n", __FUNCTION__, chunklen); pr_debug("%s: got %i bytes\n", __func__, chunklen);
dbg_dump_hex(hp->inbuf_end, chunklen); dbg_dump_hex(hp->inbuf_end, chunklen);
hp->inbuf_end += chunklen; hp->inbuf_end += chunklen;
@ -495,7 +495,7 @@ static int hvsi_load_chunk(struct hvsi_struct *hp, struct tty_struct **flip,
continue; continue;
} }
pr_debug("%s: handling %i-byte packet\n", __FUNCTION__, pr_debug("%s: handling %i-byte packet\n", __func__,
len_packet(packet)); len_packet(packet));
dbg_dump_packet(packet); dbg_dump_packet(packet);
@ -526,7 +526,7 @@ static int hvsi_load_chunk(struct hvsi_struct *hp, struct tty_struct **flip,
packet += len_packet(packet); packet += len_packet(packet);
if (*hangup || *handshake) { if (*hangup || *handshake) {
pr_debug("%s: hangup or handshake\n", __FUNCTION__); pr_debug("%s: hangup or handshake\n", __func__);
/* /*
* we need to send the hangup now before receiving any more data. * we need to send the hangup now before receiving any more data.
* If we get "data, hangup, data", we can't deliver the second * If we get "data, hangup, data", we can't deliver the second
@ -543,7 +543,7 @@ static int hvsi_load_chunk(struct hvsi_struct *hp, struct tty_struct **flip,
static void hvsi_send_overflow(struct hvsi_struct *hp) static void hvsi_send_overflow(struct hvsi_struct *hp)
{ {
pr_debug("%s: delivering %i bytes overflow\n", __FUNCTION__, pr_debug("%s: delivering %i bytes overflow\n", __func__,
hp->n_throttle); hp->n_throttle);
hvsi_insert_chars(hp, hp->throttle_buf, hp->n_throttle); hvsi_insert_chars(hp, hp->throttle_buf, hp->n_throttle);
@ -563,7 +563,7 @@ static irqreturn_t hvsi_interrupt(int irq, void *arg)
unsigned long flags; unsigned long flags;
int again = 1; int again = 1;
pr_debug("%s\n", __FUNCTION__); pr_debug("%s\n", __func__);
while (again) { while (again) {
spin_lock_irqsave(&hp->lock, flags); spin_lock_irqsave(&hp->lock, flags);
@ -647,7 +647,7 @@ static int hvsi_query(struct hvsi_struct *hp, uint16_t verb)
packet.seqno = atomic_inc_return(&hp->seqno); packet.seqno = atomic_inc_return(&hp->seqno);
packet.verb = verb; packet.verb = verb;
pr_debug("%s: sending %i bytes\n", __FUNCTION__, packet.len); pr_debug("%s: sending %i bytes\n", __func__, packet.len);
dbg_dump_hex((uint8_t*)&packet, packet.len); dbg_dump_hex((uint8_t*)&packet, packet.len);
wrote = hvc_put_chars(hp->vtermno, (char *)&packet, packet.len); wrote = hvc_put_chars(hp->vtermno, (char *)&packet, packet.len);
@ -674,7 +674,7 @@ static int hvsi_get_mctrl(struct hvsi_struct *hp)
return ret; return ret;
} }
pr_debug("%s: mctrl 0x%x\n", __FUNCTION__, hp->mctrl); pr_debug("%s: mctrl 0x%x\n", __func__, hp->mctrl);
return 0; return 0;
} }
@ -694,7 +694,7 @@ static int hvsi_set_mctrl(struct hvsi_struct *hp, uint16_t mctrl)
if (mctrl & TIOCM_DTR) if (mctrl & TIOCM_DTR)
packet.word = HVSI_TSDTR; packet.word = HVSI_TSDTR;
pr_debug("%s: sending %i bytes\n", __FUNCTION__, packet.len); pr_debug("%s: sending %i bytes\n", __func__, packet.len);
dbg_dump_hex((uint8_t*)&packet, packet.len); dbg_dump_hex((uint8_t*)&packet, packet.len);
wrote = hvc_put_chars(hp->vtermno, (char *)&packet, packet.len); wrote = hvc_put_chars(hp->vtermno, (char *)&packet, packet.len);
@ -790,7 +790,7 @@ static void hvsi_close_protocol(struct hvsi_struct *hp)
packet.len = 6; packet.len = 6;
packet.verb = VSV_CLOSE_PROTOCOL; packet.verb = VSV_CLOSE_PROTOCOL;
pr_debug("%s: sending %i bytes\n", __FUNCTION__, packet.len); pr_debug("%s: sending %i bytes\n", __func__, packet.len);
dbg_dump_hex((uint8_t*)&packet, packet.len); dbg_dump_hex((uint8_t*)&packet, packet.len);
hvc_put_chars(hp->vtermno, (char *)&packet, packet.len); hvc_put_chars(hp->vtermno, (char *)&packet, packet.len);
@ -803,7 +803,7 @@ static int hvsi_open(struct tty_struct *tty, struct file *filp)
int line = tty->index; int line = tty->index;
int ret; int ret;
pr_debug("%s\n", __FUNCTION__); pr_debug("%s\n", __func__);
if (line < 0 || line >= hvsi_count) if (line < 0 || line >= hvsi_count)
return -ENODEV; return -ENODEV;
@ -868,7 +868,7 @@ static void hvsi_close(struct tty_struct *tty, struct file *filp)
struct hvsi_struct *hp = tty->driver_data; struct hvsi_struct *hp = tty->driver_data;
unsigned long flags; unsigned long flags;
pr_debug("%s\n", __FUNCTION__); pr_debug("%s\n", __func__);
if (tty_hung_up_p(filp)) if (tty_hung_up_p(filp))
return; return;
@ -920,7 +920,7 @@ static void hvsi_hangup(struct tty_struct *tty)
struct hvsi_struct *hp = tty->driver_data; struct hvsi_struct *hp = tty->driver_data;
unsigned long flags; unsigned long flags;
pr_debug("%s\n", __FUNCTION__); pr_debug("%s\n", __func__);
spin_lock_irqsave(&hp->lock, flags); spin_lock_irqsave(&hp->lock, flags);
@ -942,7 +942,7 @@ static void hvsi_push(struct hvsi_struct *hp)
n = hvsi_put_chars(hp, hp->outbuf, hp->n_outbuf); n = hvsi_put_chars(hp, hp->outbuf, hp->n_outbuf);
if (n > 0) { if (n > 0) {
/* success */ /* success */
pr_debug("%s: wrote %i chars\n", __FUNCTION__, n); pr_debug("%s: wrote %i chars\n", __func__, n);
hp->n_outbuf = 0; hp->n_outbuf = 0;
} else if (n == -EIO) { } else if (n == -EIO) {
__set_state(hp, HVSI_FSP_DIED); __set_state(hp, HVSI_FSP_DIED);
@ -965,7 +965,7 @@ static void hvsi_write_worker(struct work_struct *work)
spin_lock_irqsave(&hp->lock, flags); spin_lock_irqsave(&hp->lock, flags);
pr_debug("%s: %i chars in buffer\n", __FUNCTION__, hp->n_outbuf); pr_debug("%s: %i chars in buffer\n", __func__, hp->n_outbuf);
if (!is_open(hp)) { if (!is_open(hp)) {
/* /*
@ -983,7 +983,7 @@ static void hvsi_write_worker(struct work_struct *work)
schedule_delayed_work(&hp->writer, 10); schedule_delayed_work(&hp->writer, 10);
else { else {
#ifdef DEBUG #ifdef DEBUG
pr_debug("%s: outbuf emptied after %li jiffies\n", __FUNCTION__, pr_debug("%s: outbuf emptied after %li jiffies\n", __func__,
jiffies - start_j); jiffies - start_j);
start_j = 0; start_j = 0;
#endif /* DEBUG */ #endif /* DEBUG */
@ -1020,11 +1020,11 @@ static int hvsi_write(struct tty_struct *tty,
spin_lock_irqsave(&hp->lock, flags); spin_lock_irqsave(&hp->lock, flags);
pr_debug("%s: %i chars in buffer\n", __FUNCTION__, hp->n_outbuf); pr_debug("%s: %i chars in buffer\n", __func__, hp->n_outbuf);
if (!is_open(hp)) { if (!is_open(hp)) {
/* we're either closing or not yet open; don't accept data */ /* we're either closing or not yet open; don't accept data */
pr_debug("%s: not open\n", __FUNCTION__); pr_debug("%s: not open\n", __func__);
goto out; goto out;
} }
@ -1058,7 +1058,7 @@ out:
spin_unlock_irqrestore(&hp->lock, flags); spin_unlock_irqrestore(&hp->lock, flags);
if (total != origcount) if (total != origcount)
pr_debug("%s: wanted %i, only wrote %i\n", __FUNCTION__, origcount, pr_debug("%s: wanted %i, only wrote %i\n", __func__, origcount,
total); total);
return total; return total;
@ -1072,7 +1072,7 @@ static void hvsi_throttle(struct tty_struct *tty)
{ {
struct hvsi_struct *hp = (struct hvsi_struct *)tty->driver_data; struct hvsi_struct *hp = (struct hvsi_struct *)tty->driver_data;
pr_debug("%s\n", __FUNCTION__); pr_debug("%s\n", __func__);
h_vio_signal(hp->vtermno, VIO_IRQ_DISABLE); h_vio_signal(hp->vtermno, VIO_IRQ_DISABLE);
} }
@ -1083,7 +1083,7 @@ static void hvsi_unthrottle(struct tty_struct *tty)
unsigned long flags; unsigned long flags;
int shouldflip = 0; int shouldflip = 0;
pr_debug("%s\n", __FUNCTION__); pr_debug("%s\n", __func__);
spin_lock_irqsave(&hp->lock, flags); spin_lock_irqsave(&hp->lock, flags);
if (hp->n_throttle) { if (hp->n_throttle) {
@ -1302,7 +1302,7 @@ static int __init hvsi_console_init(void)
hp->virq = irq_create_mapping(NULL, irq[0]); hp->virq = irq_create_mapping(NULL, irq[0]);
if (hp->virq == NO_IRQ) { if (hp->virq == NO_IRQ) {
printk(KERN_ERR "%s: couldn't create irq mapping for 0x%x\n", printk(KERN_ERR "%s: couldn't create irq mapping for 0x%x\n",
__FUNCTION__, irq[0]); __func__, irq[0]);
continue; continue;
} }

View File

@ -73,7 +73,7 @@ do { \
char tmp[P_BUF_SIZE]; \ char tmp[P_BUF_SIZE]; \
snprintf(tmp, sizeof(tmp), ##args); \ snprintf(tmp, sizeof(tmp), ##args); \
printk(_err_flag_ "[%d] %s(): %s\n", __LINE__, \ printk(_err_flag_ "[%d] %s(): %s\n", __LINE__, \
__FUNCTION__, tmp); \ __func__, tmp); \
} while (0) } while (0)
#define DBG1(args...) D_(0x01, ##args) #define DBG1(args...) D_(0x01, ##args)

View File

@ -53,7 +53,7 @@ module_param(pc_debug, int, 0600);
#define DEBUGP(n, rdr, x, args...) do { \ #define DEBUGP(n, rdr, x, args...) do { \
if (pc_debug >= (n)) \ if (pc_debug >= (n)) \
dev_printk(KERN_DEBUG, reader_to_dev(rdr), "%s:" x, \ dev_printk(KERN_DEBUG, reader_to_dev(rdr), "%s:" x, \
__FUNCTION__ , ## args); \ __func__ , ## args); \
} while (0) } while (0)
#else #else
#define DEBUGP(n, rdr, x, args...) #define DEBUGP(n, rdr, x, args...)

View File

@ -47,7 +47,7 @@ module_param(pc_debug, int, 0600);
#define DEBUGP(n, rdr, x, args...) do { \ #define DEBUGP(n, rdr, x, args...) do { \
if (pc_debug >= (n)) \ if (pc_debug >= (n)) \
dev_printk(KERN_DEBUG, reader_to_dev(rdr), "%s:" x, \ dev_printk(KERN_DEBUG, reader_to_dev(rdr), "%s:" x, \
__FUNCTION__ , ##args); \ __func__ , ##args); \
} while (0) } while (0)
#else #else
#define DEBUGP(n, rdr, x, args...) #define DEBUGP(n, rdr, x, args...)

View File

@ -186,9 +186,9 @@ static inline void *rio_memcpy_fromio(void *dest, void __iomem *source, int n)
#ifdef DEBUG #ifdef DEBUG
#define rio_dprintk(f, str...) do { if (rio_debug & f) printk (str);} while (0) #define rio_dprintk(f, str...) do { if (rio_debug & f) printk (str);} while (0)
#define func_enter() rio_dprintk (RIO_DEBUG_FLOW, "rio: enter %s\n", __FUNCTION__) #define func_enter() rio_dprintk (RIO_DEBUG_FLOW, "rio: enter %s\n", __func__)
#define func_exit() rio_dprintk (RIO_DEBUG_FLOW, "rio: exit %s\n", __FUNCTION__) #define func_exit() rio_dprintk (RIO_DEBUG_FLOW, "rio: exit %s\n", __func__)
#define func_enter2() rio_dprintk (RIO_DEBUG_FLOW, "rio: enter %s (port %d)\n",__FUNCTION__, port->line) #define func_enter2() rio_dprintk (RIO_DEBUG_FLOW, "rio: enter %s (port %d)\n",__func__, port->line)
#else #else
#define rio_dprintk(f, str...) /* nothing */ #define rio_dprintk(f, str...) /* nothing */
#define func_enter() #define func_enter()

View File

@ -1222,7 +1222,7 @@ static int rc_tiocmget(struct tty_struct *tty, struct file *file)
unsigned int result; unsigned int result;
unsigned long flags; unsigned long flags;
if (rc_paranoia_check(port, tty->name, __FUNCTION__)) if (rc_paranoia_check(port, tty->name, __func__))
return -ENODEV; return -ENODEV;
bp = port_Board(port); bp = port_Board(port);
@ -1250,7 +1250,7 @@ static int rc_tiocmset(struct tty_struct *tty, struct file *file,
unsigned long flags; unsigned long flags;
struct riscom_board *bp; struct riscom_board *bp;
if (rc_paranoia_check(port, tty->name, __FUNCTION__)) if (rc_paranoia_check(port, tty->name, __func__))
return -ENODEV; return -ENODEV;
bp = port_Board(port); bp = port_Board(port);

View File

@ -80,7 +80,7 @@ scdrv_open(struct inode *inode, struct file *file)
sd = kzalloc(sizeof (struct subch_data_s), GFP_KERNEL); sd = kzalloc(sizeof (struct subch_data_s), GFP_KERNEL);
if (sd == NULL) { if (sd == NULL) {
printk("%s: couldn't allocate subchannel data\n", printk("%s: couldn't allocate subchannel data\n",
__FUNCTION__); __func__);
return -ENOMEM; return -ENOMEM;
} }
@ -90,7 +90,7 @@ scdrv_open(struct inode *inode, struct file *file)
if (sd->sd_subch < 0) { if (sd->sd_subch < 0) {
kfree(sd); kfree(sd);
printk("%s: couldn't allocate subchannel\n", __FUNCTION__); printk("%s: couldn't allocate subchannel\n", __func__);
return -EBUSY; return -EBUSY;
} }
@ -110,7 +110,7 @@ scdrv_open(struct inode *inode, struct file *file)
if (rv) { if (rv) {
ia64_sn_irtr_close(sd->sd_nasid, sd->sd_subch); ia64_sn_irtr_close(sd->sd_nasid, sd->sd_subch);
kfree(sd); kfree(sd);
printk("%s: irq request failed (%d)\n", __FUNCTION__, rv); printk("%s: irq request failed (%d)\n", __func__, rv);
return -EBUSY; return -EBUSY;
} }
@ -215,7 +215,7 @@ scdrv_read(struct file *file, char __user *buf, size_t count, loff_t *f_pos)
*/ */
if (count < len) { if (count < len) {
pr_debug("%s: only accepting %d of %d bytes\n", pr_debug("%s: only accepting %d of %d bytes\n",
__FUNCTION__, (int) count, len); __func__, (int) count, len);
} }
len = min((int) count, len); len = min((int) count, len);
if (copy_to_user(buf, sd->sd_rb, len)) if (copy_to_user(buf, sd->sd_rb, len))
@ -384,7 +384,7 @@ scdrv_init(void)
if (alloc_chrdev_region(&first_dev, 0, num_cnodes, if (alloc_chrdev_region(&first_dev, 0, num_cnodes,
SYSCTL_BASENAME) < 0) { SYSCTL_BASENAME) < 0) {
printk("%s: failed to register SN system controller device\n", printk("%s: failed to register SN system controller device\n",
__FUNCTION__); __func__);
return -ENODEV; return -ENODEV;
} }
snsc_class = class_create(THIS_MODULE, SYSCTL_BASENAME); snsc_class = class_create(THIS_MODULE, SYSCTL_BASENAME);
@ -403,7 +403,7 @@ scdrv_init(void)
GFP_KERNEL); GFP_KERNEL);
if (!scd) { if (!scd) {
printk("%s: failed to allocate device info" printk("%s: failed to allocate device info"
"for %s/%s\n", __FUNCTION__, "for %s/%s\n", __func__,
SYSCTL_BASENAME, devname); SYSCTL_BASENAME, devname);
continue; continue;
} }
@ -412,7 +412,7 @@ scdrv_init(void)
scd->scd_nasid = cnodeid_to_nasid(cnode); scd->scd_nasid = cnodeid_to_nasid(cnode);
if (!(salbuf = kmalloc(SCDRV_BUFSZ, GFP_KERNEL))) { if (!(salbuf = kmalloc(SCDRV_BUFSZ, GFP_KERNEL))) {
printk("%s: failed to allocate driver buffer" printk("%s: failed to allocate driver buffer"
"(%s%s)\n", __FUNCTION__, "(%s%s)\n", __func__,
SYSCTL_BASENAME, devname); SYSCTL_BASENAME, devname);
kfree(scd); kfree(scd);
continue; continue;
@ -424,7 +424,7 @@ scdrv_init(void)
("%s: failed to initialize SAL for" ("%s: failed to initialize SAL for"
" system controller communication" " system controller communication"
" (%s/%s): outdated PROM?\n", " (%s/%s): outdated PROM?\n",
__FUNCTION__, SYSCTL_BASENAME, devname); __func__, SYSCTL_BASENAME, devname);
kfree(scd); kfree(scd);
kfree(salbuf); kfree(salbuf);
continue; continue;
@ -435,7 +435,7 @@ scdrv_init(void)
if (cdev_add(&scd->scd_cdev, dev, 1)) { if (cdev_add(&scd->scd_cdev, dev, 1)) {
printk("%s: failed to register system" printk("%s: failed to register system"
" controller device (%s%s)\n", " controller device (%s%s)\n",
__FUNCTION__, SYSCTL_BASENAME, devname); __func__, SYSCTL_BASENAME, devname);
kfree(scd); kfree(scd);
kfree(salbuf); kfree(salbuf);
continue; continue;

View File

@ -271,7 +271,7 @@ scdrv_event_init(struct sysctl_data_s *scd)
event_sd = kzalloc(sizeof (struct subch_data_s), GFP_KERNEL); event_sd = kzalloc(sizeof (struct subch_data_s), GFP_KERNEL);
if (event_sd == NULL) { if (event_sd == NULL) {
printk(KERN_WARNING "%s: couldn't allocate subchannel info" printk(KERN_WARNING "%s: couldn't allocate subchannel info"
" for event monitoring\n", __FUNCTION__); " for event monitoring\n", __func__);
return; return;
} }
@ -285,7 +285,7 @@ scdrv_event_init(struct sysctl_data_s *scd)
if (event_sd->sd_subch < 0) { if (event_sd->sd_subch < 0) {
kfree(event_sd); kfree(event_sd);
printk(KERN_WARNING "%s: couldn't open event subchannel\n", printk(KERN_WARNING "%s: couldn't open event subchannel\n",
__FUNCTION__); __func__);
return; return;
} }
@ -295,7 +295,7 @@ scdrv_event_init(struct sysctl_data_s *scd)
"system controller events", event_sd); "system controller events", event_sd);
if (rv) { if (rv) {
printk(KERN_WARNING "%s: irq request failed (%d)\n", printk(KERN_WARNING "%s: irq request failed (%d)\n",
__FUNCTION__, rv); __func__, rv);
ia64_sn_irtr_close(event_sd->sd_nasid, event_sd->sd_subch); ia64_sn_irtr_close(event_sd->sd_nasid, event_sd->sd_subch);
kfree(event_sd); kfree(event_sd);
return; return;

View File

@ -506,7 +506,7 @@ static struct sonypi_device {
while (--n && (command)) \ while (--n && (command)) \
udelay(1); \ udelay(1); \
if (!n && (verbose || !quiet)) \ if (!n && (verbose || !quiet)) \
printk(KERN_WARNING "sonypi command failed at %s : %s (line %d)\n", __FILE__, __FUNCTION__, __LINE__); \ printk(KERN_WARNING "sonypi command failed at %s : %s (line %d)\n", __FILE__, __func__, __LINE__); \
} }
#ifdef CONFIG_ACPI #ifdef CONFIG_ACPI

View File

@ -131,8 +131,8 @@ static int sx_rxfifo = SPECIALIX_RXFIFO;
#define SX_DEBUG_FIFO 0x0800 #define SX_DEBUG_FIFO 0x0800
#define func_enter() dprintk (SX_DEBUG_FLOW, "io8: enter %s\n",__FUNCTION__) #define func_enter() dprintk (SX_DEBUG_FLOW, "io8: enter %s\n",__func__)
#define func_exit() dprintk (SX_DEBUG_FLOW, "io8: exit %s\n", __FUNCTION__) #define func_exit() dprintk (SX_DEBUG_FLOW, "io8: exit %s\n", __func__)
#define jiffies_from_ms(a) ((((a) * HZ)/1000)+1) #define jiffies_from_ms(a) ((((a) * HZ)/1000)+1)
@ -874,7 +874,7 @@ static irqreturn_t sx_interrupt(int dummy, void *dev_id)
spin_lock_irqsave(&bp->lock, flags); spin_lock_irqsave(&bp->lock, flags);
dprintk (SX_DEBUG_FLOW, "enter %s port %d room: %ld\n", __FUNCTION__, port_No(sx_get_port(bp, "INT")), SERIAL_XMIT_SIZE - sx_get_port(bp, "ITN")->xmit_cnt - 1); dprintk (SX_DEBUG_FLOW, "enter %s port %d room: %ld\n", __func__, port_No(sx_get_port(bp, "INT")), SERIAL_XMIT_SIZE - sx_get_port(bp, "ITN")->xmit_cnt - 1);
if (!(bp->flags & SX_BOARD_ACTIVE)) { if (!(bp->flags & SX_BOARD_ACTIVE)) {
dprintk (SX_DEBUG_IRQ, "sx: False interrupt. irq %d.\n", bp->irq); dprintk (SX_DEBUG_IRQ, "sx: False interrupt. irq %d.\n", bp->irq);
spin_unlock_irqrestore(&bp->lock, flags); spin_unlock_irqrestore(&bp->lock, flags);
@ -1802,7 +1802,7 @@ static int sx_tiocmget(struct tty_struct *tty, struct file *file)
func_enter(); func_enter();
if (sx_paranoia_check(port, tty->name, __FUNCTION__)) { if (sx_paranoia_check(port, tty->name, __func__)) {
func_exit(); func_exit();
return -ENODEV; return -ENODEV;
} }
@ -1844,7 +1844,7 @@ static int sx_tiocmset(struct tty_struct *tty, struct file *file,
func_enter(); func_enter();
if (sx_paranoia_check(port, tty->name, __FUNCTION__)) { if (sx_paranoia_check(port, tty->name, __func__)) {
func_exit(); func_exit();
return -ENODEV; return -ENODEV;
} }

View File

@ -384,11 +384,11 @@ static struct real_driver sx_real_driver = {
#define sx_dprintk(f, str...) /* nothing */ #define sx_dprintk(f, str...) /* nothing */
#endif #endif
#define func_enter() sx_dprintk(SX_DEBUG_FLOW, "sx: enter %s\n",__FUNCTION__) #define func_enter() sx_dprintk(SX_DEBUG_FLOW, "sx: enter %s\n",__func__)
#define func_exit() sx_dprintk(SX_DEBUG_FLOW, "sx: exit %s\n",__FUNCTION__) #define func_exit() sx_dprintk(SX_DEBUG_FLOW, "sx: exit %s\n",__func__)
#define func_enter2() sx_dprintk(SX_DEBUG_FLOW, "sx: enter %s (port %d)\n", \ #define func_enter2() sx_dprintk(SX_DEBUG_FLOW, "sx: enter %s (port %d)\n", \
__FUNCTION__, port->line) __func__, port->line)
/* /*
* Firmware loader driver specific routines * Firmware loader driver specific routines
@ -1574,7 +1574,7 @@ static void sx_close(void *ptr)
sx_dprintk(SX_DEBUG_CLOSE, "WARNING port count:%d\n", sx_dprintk(SX_DEBUG_CLOSE, "WARNING port count:%d\n",
port->gs.count); port->gs.count);
/*printk("%s SETTING port count to zero: %p count: %d\n", /*printk("%s SETTING port count to zero: %p count: %d\n",
__FUNCTION__, port, port->gs.count); __func__, port, port->gs.count);
port->gs.count = 0;*/ port->gs.count = 0;*/
} }