Skip to content

Commit a8043ec

Browse files
hharrisonjkkm
authored andcommitted
drivers/parisc: replace remaining __FUNCTION__ occurrences
__FUNCTION__ is gcc-specific, use __func__ Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Cc: Kyle McMartin <kyle@mcmartin.ca> Cc: Matthew Wilcox <willy@debian.org> Cc: Grant Grundler <grundler@parisc-linux.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
1 parent 91bae23 commit a8043ec

9 files changed

Lines changed: 63 additions & 63 deletions

File tree

‎drivers/parisc/asp.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ asp_init_chip(struct parisc_device *dev)
8888
ret = -EBUSY;
8989
dev->irq = gsc_claim_irq(&gsc_irq, ASP_GSC_IRQ);
9090
if (dev->irq < 0) {
91-
printk(KERN_ERR "%s(): cannot get GSC irq\n", __FUNCTION__);
91+
printk(KERN_ERR "%s(): cannot get GSC irq\n", __func__);
9292
goto out;
9393
}
9494

‎drivers/parisc/ccio-dma.c‎

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ ccio_alloc_range(struct ioc *ioc, struct device *dev, size_t size)
359359
BUG_ON((pages_needed * IOVP_SIZE) > DMA_CHUNK_SIZE);
360360

361361
DBG_RES("%s() size: %d pages_needed %d\n",
362-
__FUNCTION__, size, pages_needed);
362+
__func__, size, pages_needed);
363363

364364
/*
365365
** "seek and ye shall find"...praying never hurts either...
@@ -395,16 +395,16 @@ ccio_alloc_range(struct ioc *ioc, struct device *dev, size_t size)
395395
#endif
396396
} else {
397397
panic("%s: %s() Too many pages to map. pages_needed: %u\n",
398-
__FILE__, __FUNCTION__, pages_needed);
398+
__FILE__, __func__, pages_needed);
399399
}
400400

401401
panic("%s: %s() I/O MMU is out of mapping resources.\n", __FILE__,
402-
__FUNCTION__);
402+
__func__);
403403

404404
resource_found:
405405

406406
DBG_RES("%s() res_idx %d res_hint: %d\n",
407-
__FUNCTION__, res_idx, ioc->res_hint);
407+
__func__, res_idx, ioc->res_hint);
408408

409409
#ifdef CCIO_SEARCH_TIME
410410
{
@@ -450,7 +450,7 @@ ccio_free_range(struct ioc *ioc, dma_addr_t iova, unsigned long pages_mapped)
450450
BUG_ON(pages_mapped > BITS_PER_LONG);
451451

452452
DBG_RES("%s(): res_idx: %d pages_mapped %d\n",
453-
__FUNCTION__, res_idx, pages_mapped);
453+
__func__, res_idx, pages_mapped);
454454

455455
#ifdef CCIO_MAP_STATS
456456
ioc->used_pages -= pages_mapped;
@@ -474,7 +474,7 @@ ccio_free_range(struct ioc *ioc, dma_addr_t iova, unsigned long pages_mapped)
474474
#endif
475475
} else {
476476
panic("%s:%s() Too many pages to unmap.\n", __FILE__,
477-
__FUNCTION__);
477+
__func__);
478478
}
479479
}
480480

@@ -775,7 +775,7 @@ ccio_map_single(struct device *dev, void *addr, size_t size,
775775
pdir_start = &(ioc->pdir_base[idx]);
776776

777777
DBG_RUN("%s() 0x%p -> 0x%lx size: %0x%x\n",
778-
__FUNCTION__, addr, (long)iovp | offset, size);
778+
__func__, addr, (long)iovp | offset, size);
779779

780780
/* If not cacheline aligned, force SAFE_DMA on the whole mess */
781781
if((size % L1_CACHE_BYTES) || ((unsigned long)addr % L1_CACHE_BYTES))
@@ -820,7 +820,7 @@ ccio_unmap_single(struct device *dev, dma_addr_t iova, size_t size,
820820
ioc = GET_IOC(dev);
821821

822822
DBG_RUN("%s() iovp 0x%lx/%x\n",
823-
__FUNCTION__, (long)iova, size);
823+
__func__, (long)iova, size);
824824

825825
iova ^= offset; /* clear offset bits */
826826
size += offset;
@@ -922,7 +922,7 @@ ccio_map_sg(struct device *dev, struct scatterlist *sglist, int nents,
922922
BUG_ON(!dev);
923923
ioc = GET_IOC(dev);
924924

925-
DBG_RUN_SG("%s() START %d entries\n", __FUNCTION__, nents);
925+
DBG_RUN_SG("%s() START %d entries\n", __func__, nents);
926926

927927
/* Fast path single entry scatterlists. */
928928
if (nents == 1) {
@@ -966,7 +966,7 @@ ccio_map_sg(struct device *dev, struct scatterlist *sglist, int nents,
966966

967967
BUG_ON(coalesced != filled);
968968

969-
DBG_RUN_SG("%s() DONE %d mappings\n", __FUNCTION__, filled);
969+
DBG_RUN_SG("%s() DONE %d mappings\n", __func__, filled);
970970

971971
for (i = 0; i < filled; i++)
972972
current_len += sg_dma_len(sglist + i);
@@ -995,7 +995,7 @@ ccio_unmap_sg(struct device *dev, struct scatterlist *sglist, int nents,
995995
ioc = GET_IOC(dev);
996996

997997
DBG_RUN_SG("%s() START %d entries, %08lx,%x\n",
998-
__FUNCTION__, nents, sg_virt_addr(sglist), sglist->length);
998+
__func__, nents, sg_virt_addr(sglist), sglist->length);
999999

10001000
#ifdef CCIO_MAP_STATS
10011001
ioc->usg_calls++;
@@ -1011,7 +1011,7 @@ ccio_unmap_sg(struct device *dev, struct scatterlist *sglist, int nents,
10111011
++sglist;
10121012
}
10131013

1014-
DBG_RUN_SG("%s() DONE (nents %d)\n", __FUNCTION__, nents);
1014+
DBG_RUN_SG("%s() DONE (nents %d)\n", __func__, nents);
10151015
}
10161016

10171017
static struct hppa_dma_ops ccio_ops = {
@@ -1225,7 +1225,7 @@ static int
12251225
ccio_get_iotlb_size(struct parisc_device *dev)
12261226
{
12271227
if (dev->spa_shift == 0) {
1228-
panic("%s() : Can't determine I/O TLB size.\n", __FUNCTION__);
1228+
panic("%s() : Can't determine I/O TLB size.\n", __func__);
12291229
}
12301230
return (1 << dev->spa_shift);
12311231
}
@@ -1315,15 +1315,15 @@ ccio_ioc_init(struct ioc *ioc)
13151315
BUG_ON((1 << get_order(ioc->pdir_size)) != (ioc->pdir_size >> PAGE_SHIFT));
13161316

13171317
DBG_INIT("%s() hpa 0x%p mem %luMB IOV %dMB (%d bits)\n",
1318-
__FUNCTION__, ioc->ioc_regs,
1318+
__func__, ioc->ioc_regs,
13191319
(unsigned long) num_physpages >> (20 - PAGE_SHIFT),
13201320
iova_space_size>>20,
13211321
iov_order + PAGE_SHIFT);
13221322

13231323
ioc->pdir_base = (u64 *)__get_free_pages(GFP_KERNEL,
13241324
get_order(ioc->pdir_size));
13251325
if(NULL == ioc->pdir_base) {
1326-
panic("%s() could not allocate I/O Page Table\n", __FUNCTION__);
1326+
panic("%s() could not allocate I/O Page Table\n", __func__);
13271327
}
13281328
memset(ioc->pdir_base, 0, ioc->pdir_size);
13291329

@@ -1332,12 +1332,12 @@ ccio_ioc_init(struct ioc *ioc)
13321332

13331333
/* resource map size dictated by pdir_size */
13341334
ioc->res_size = (ioc->pdir_size / sizeof(u64)) >> 3;
1335-
DBG_INIT("%s() res_size 0x%x\n", __FUNCTION__, ioc->res_size);
1335+
DBG_INIT("%s() res_size 0x%x\n", __func__, ioc->res_size);
13361336

13371337
ioc->res_map = (u8 *)__get_free_pages(GFP_KERNEL,
13381338
get_order(ioc->res_size));
13391339
if(NULL == ioc->res_map) {
1340-
panic("%s() could not allocate resource map\n", __FUNCTION__);
1340+
panic("%s() could not allocate resource map\n", __func__);
13411341
}
13421342
memset(ioc->res_map, 0, ioc->res_size);
13431343

@@ -1409,7 +1409,7 @@ ccio_init_resource(struct resource *res, char *name, void __iomem *ioaddr)
14091409
result = insert_resource(&iomem_resource, res);
14101410
if (result < 0) {
14111411
printk(KERN_ERR "%s() failed to claim CCIO bus address space (%08lx,%08lx)\n",
1412-
__FUNCTION__, res->start, res->end);
1412+
__func__, res->start, res->end);
14131413
}
14141414
}
14151415

‎drivers/parisc/dino.c‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ static int dino_cfg_read(struct pci_bus *bus, unsigned int devfn, int where,
180180
void __iomem *base_addr = d->hba.base_addr;
181181
unsigned long flags;
182182

183-
DBG("%s: %p, %d, %d, %d\n", __FUNCTION__, base_addr, devfn, where,
183+
DBG("%s: %p, %d, %d, %d\n", __func__, base_addr, devfn, where,
184184
size);
185185
spin_lock_irqsave(&d->dinosaur_pen, flags);
186186

@@ -215,7 +215,7 @@ static int dino_cfg_write(struct pci_bus *bus, unsigned int devfn, int where,
215215
void __iomem *base_addr = d->hba.base_addr;
216216
unsigned long flags;
217217

218-
DBG("%s: %p, %d, %d, %d\n", __FUNCTION__, base_addr, devfn, where,
218+
DBG("%s: %p, %d, %d, %d\n", __func__, base_addr, devfn, where,
219219
size);
220220
spin_lock_irqsave(&d->dinosaur_pen, flags);
221221

@@ -301,7 +301,7 @@ static void dino_disable_irq(unsigned int irq)
301301
struct dino_device *dino_dev = irq_desc[irq].chip_data;
302302
int local_irq = gsc_find_local_irq(irq, dino_dev->global_irq, DINO_LOCAL_IRQS);
303303

304-
DBG(KERN_WARNING "%s(0x%p, %d)\n", __FUNCTION__, dino_dev, irq);
304+
DBG(KERN_WARNING "%s(0x%p, %d)\n", __func__, dino_dev, irq);
305305

306306
/* Clear the matching bit in the IMR register */
307307
dino_dev->imr &= ~(DINO_MASK_IRQ(local_irq));
@@ -314,7 +314,7 @@ static void dino_enable_irq(unsigned int irq)
314314
int local_irq = gsc_find_local_irq(irq, dino_dev->global_irq, DINO_LOCAL_IRQS);
315315
u32 tmp;
316316

317-
DBG(KERN_WARNING "%s(0x%p, %d)\n", __FUNCTION__, dino_dev, irq);
317+
DBG(KERN_WARNING "%s(0x%p, %d)\n", __func__, dino_dev, irq);
318318

319319
/*
320320
** clear pending IRQ bits
@@ -340,7 +340,7 @@ static void dino_enable_irq(unsigned int irq)
340340
tmp = __raw_readl(dino_dev->hba.base_addr+DINO_ILR);
341341
if (tmp & DINO_MASK_IRQ(local_irq)) {
342342
DBG(KERN_WARNING "%s(): IRQ asserted! (ILR 0x%x)\n",
343-
__FUNCTION__, tmp);
343+
__func__, tmp);
344344
gsc_writel(dino_dev->txn_data, dino_dev->txn_addr);
345345
}
346346
}
@@ -388,7 +388,7 @@ static irqreturn_t dino_isr(int irq, void *intr_dev)
388388
int local_irq = __ffs(mask);
389389
int irq = dino_dev->global_irq[local_irq];
390390
DBG(KERN_DEBUG "%s(%d, %p) mask 0x%x\n",
391-
__FUNCTION__, irq, intr_dev, mask);
391+
__func__, irq, intr_dev, mask);
392392
__do_IRQ(irq);
393393
mask &= ~(1 << local_irq);
394394
} while (mask);
@@ -566,7 +566,7 @@ dino_fixup_bus(struct pci_bus *bus)
566566
int port_base = HBA_PORT_BASE(dino_dev->hba.hba_num);
567567

568568
DBG(KERN_WARNING "%s(0x%p) bus %d platform_data 0x%p\n",
569-
__FUNCTION__, bus, bus->secondary,
569+
__func__, bus, bus->secondary,
570570
bus->bridge->platform_data);
571571

572572
/* Firmware doesn't set up card-mode dino, so we have to */

‎drivers/parisc/gsc.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ static void gsc_asic_disable_irq(unsigned int irq)
112112
int local_irq = gsc_find_local_irq(irq, irq_dev->global_irq, 32);
113113
u32 imr;
114114

115-
DEBPRINTK(KERN_DEBUG "%s(%d) %s: IMR 0x%x\n", __FUNCTION__, irq,
115+
DEBPRINTK(KERN_DEBUG "%s(%d) %s: IMR 0x%x\n", __func__, irq,
116116
irq_dev->name, imr);
117117

118118
/* Disable the IRQ line by clearing the bit in the IMR */
@@ -127,7 +127,7 @@ static void gsc_asic_enable_irq(unsigned int irq)
127127
int local_irq = gsc_find_local_irq(irq, irq_dev->global_irq, 32);
128128
u32 imr;
129129

130-
DEBPRINTK(KERN_DEBUG "%s(%d) %s: IMR 0x%x\n", __FUNCTION__, irq,
130+
DEBPRINTK(KERN_DEBUG "%s(%d) %s: IMR 0x%x\n", __func__, irq,
131131
irq_dev->name, imr);
132132

133133
/* Enable the IRQ line by setting the bit in the IMR */

‎drivers/parisc/lasi.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ lasi_init_chip(struct parisc_device *dev)
193193
dev->irq = gsc_alloc_irq(&gsc_irq);
194194
if (dev->irq < 0) {
195195
printk(KERN_ERR "%s(): cannot get GSC irq\n",
196-
__FUNCTION__);
196+
__func__);
197197
kfree(lasi);
198198
return -EBUSY;
199199
}

‎drivers/parisc/lba_pci.c‎

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -377,12 +377,12 @@ static int elroy_cfg_read(struct pci_bus *bus, unsigned int devfn, int pos, int
377377
/* original - Generate config cycle on broken elroy
378378
with risk we will miss PCI bus errors. */
379379
*data = lba_rd_cfg(d, tok, pos, size);
380-
DBG_CFG("%s(%x+%2x) -> 0x%x (a)\n", __FUNCTION__, tok, pos, *data);
380+
DBG_CFG("%s(%x+%2x) -> 0x%x (a)\n", __func__, tok, pos, *data);
381381
return 0;
382382
}
383383

384384
if (LBA_SKIP_PROBE(d) && !lba_device_present(bus->secondary, devfn, d)) {
385-
DBG_CFG("%s(%x+%2x) -> -1 (b)\n", __FUNCTION__, tok, pos);
385+
DBG_CFG("%s(%x+%2x) -> -1 (b)\n", __func__, tok, pos);
386386
/* either don't want to look or know device isn't present. */
387387
*data = ~0U;
388388
return(0);
@@ -398,7 +398,7 @@ static int elroy_cfg_read(struct pci_bus *bus, unsigned int devfn, int pos, int
398398
case 2: *data = READ_REG16(data_reg + (pos & 2)); break;
399399
case 4: *data = READ_REG32(data_reg); break;
400400
}
401-
DBG_CFG("%s(%x+%2x) -> 0x%x (c)\n", __FUNCTION__, tok, pos, *data);
401+
DBG_CFG("%s(%x+%2x) -> 0x%x (c)\n", __func__, tok, pos, *data);
402402
return 0;
403403
}
404404

@@ -441,16 +441,16 @@ static int elroy_cfg_write(struct pci_bus *bus, unsigned int devfn, int pos, int
441441
if (!LBA_SKIP_PROBE(d)) {
442442
/* Original Workaround */
443443
lba_wr_cfg(d, tok, pos, (u32) data, size);
444-
DBG_CFG("%s(%x+%2x) = 0x%x (a)\n", __FUNCTION__, tok, pos,data);
444+
DBG_CFG("%s(%x+%2x) = 0x%x (a)\n", __func__, tok, pos,data);
445445
return 0;
446446
}
447447

448448
if (LBA_SKIP_PROBE(d) && (!lba_device_present(bus->secondary, devfn, d))) {
449-
DBG_CFG("%s(%x+%2x) = 0x%x (b)\n", __FUNCTION__, tok, pos,data);
449+
DBG_CFG("%s(%x+%2x) = 0x%x (b)\n", __func__, tok, pos,data);
450450
return 1; /* New Workaround */
451451
}
452452

453-
DBG_CFG("%s(%x+%2x) = 0x%x (c)\n", __FUNCTION__, tok, pos, data);
453+
DBG_CFG("%s(%x+%2x) = 0x%x (c)\n", __func__, tok, pos, data);
454454

455455
/* Basic Algorithm */
456456
LBA_CFG_ADDR_SETUP(d, tok | pos);
@@ -521,7 +521,7 @@ static int mercury_cfg_write(struct pci_bus *bus, unsigned int devfn, int pos, i
521521
if ((pos > 255) || (devfn > 255))
522522
return -EINVAL;
523523

524-
DBG_CFG("%s(%x+%2x) <- 0x%x (c)\n", __FUNCTION__, tok, pos, data);
524+
DBG_CFG("%s(%x+%2x) <- 0x%x (c)\n", __func__, tok, pos, data);
525525

526526
LBA_CFG_TR4_ADDR_SETUP(d, tok | pos);
527527
switch(size) {
@@ -890,7 +890,7 @@ LBA_PORT_IN(32, 0)
890890
#define LBA_PORT_OUT(size, mask) \
891891
static void lba_astro_out##size (struct pci_hba_data *d, u16 addr, u##size val) \
892892
{ \
893-
DBG_PORT("%s(0x%p, 0x%x, 0x%x)\n", __FUNCTION__, d, addr, val); \
893+
DBG_PORT("%s(0x%p, 0x%x, 0x%x)\n", __func__, d, addr, val); \
894894
WRITE_REG##size(val, astro_iop_base + addr); \
895895
if (LBA_DEV(d)->hw_rev < 3) \
896896
lba_t32 = READ_U32(d->base_addr + LBA_FUNC_ID); \
@@ -932,7 +932,7 @@ static struct pci_port_ops lba_astro_port_ops = {
932932
static u##size lba_pat_in##size (struct pci_hba_data *l, u16 addr) \
933933
{ \
934934
u##size t; \
935-
DBG_PORT("%s(0x%p, 0x%x) ->", __FUNCTION__, l, addr); \
935+
DBG_PORT("%s(0x%p, 0x%x) ->", __func__, l, addr); \
936936
t = READ_REG##size(PIOP_TO_GMMIO(LBA_DEV(l), addr)); \
937937
DBG_PORT(" 0x%x\n", t); \
938938
return (t); \
@@ -948,7 +948,7 @@ LBA_PORT_IN(32, 0)
948948
static void lba_pat_out##size (struct pci_hba_data *l, u16 addr, u##size val) \
949949
{ \
950950
void __iomem *where = PIOP_TO_GMMIO(LBA_DEV(l), addr); \
951-
DBG_PORT("%s(0x%p, 0x%x, 0x%x)\n", __FUNCTION__, l, addr, val); \
951+
DBG_PORT("%s(0x%p, 0x%x, 0x%x)\n", __func__, l, addr, val); \
952952
WRITE_REG##size(val, where); \
953953
/* flush the I/O down to the elroy at least */ \
954954
lba_t32 = READ_U32(l->base_addr + LBA_FUNC_ID); \
@@ -1584,7 +1584,7 @@ void lba_set_iregs(struct parisc_device *lba, u32 ibase, u32 imask)
15841584
WARN_ON((ibase & 0x001fffff) != 0);
15851585
WARN_ON((imask & 0x001fffff) != 0);
15861586

1587-
DBG("%s() ibase 0x%x imask 0x%x\n", __FUNCTION__, ibase, imask);
1587+
DBG("%s() ibase 0x%x imask 0x%x\n", __func__, ibase, imask);
15881588
WRITE_REG32( imask, base_addr + LBA_IMASK);
15891589
WRITE_REG32( ibase, base_addr + LBA_IBASE);
15901590
iounmap(base_addr);

‎drivers/parisc/led.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -569,7 +569,7 @@ int __init register_led_driver(int model, unsigned long cmd_reg, unsigned long d
569569

570570
default:
571571
printk(KERN_ERR "%s: Wrong LCD/LED model %d !\n",
572-
__FUNCTION__, lcd_info.model);
572+
__func__, lcd_info.model);
573573
return 1;
574574
}
575575

0 commit comments

Comments
 (0)