Skip to content

Commit bbb8d34

Browse files
hharrisontorvalds
authored andcommitted
alpha: remove remaining __FUNCTION__ occurrences
__FUNCTION__ is gcc-specific, use __func__ The change in pci-iommu,c should be safe as arena has not been assigned when we get to this point. Some were within #if 0 blocks, have changed them and left the blocks as they appear to be debugging infrastructure. A #define FN __FUNCTION__ was removed and occurances of FN were replaced with __func__ as well. Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru> Cc: Richard Henderson <rth@twiddle.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent b901d40 commit bbb8d34

12 files changed

Lines changed: 72 additions & 84 deletions

File tree

‎arch/alpha/kernel/core_marvel.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -994,7 +994,7 @@ marvel_agp_configure(alpha_agp_info *agp)
994994
* rate, but warn the user.
995995
*/
996996
printk("%s: unknown PLL setting RNGB=%lx (PLL6_CTL=%016lx)\n",
997-
__FUNCTION__, IO7_PLL_RNGB(agp_pll), agp_pll);
997+
__func__, IO7_PLL_RNGB(agp_pll), agp_pll);
998998
break;
999999
}
10001000

@@ -1044,13 +1044,13 @@ marvel_agp_translate(alpha_agp_info *agp, dma_addr_t addr)
10441044

10451045
if (addr < agp->aperture.bus_base ||
10461046
addr >= agp->aperture.bus_base + agp->aperture.size) {
1047-
printk("%s: addr out of range\n", __FUNCTION__);
1047+
printk("%s: addr out of range\n", __func__);
10481048
return -EINVAL;
10491049
}
10501050

10511051
pte = aper->arena->ptes[baddr >> PAGE_SHIFT];
10521052
if (!(pte & 1)) {
1053-
printk("%s: pte not valid\n", __FUNCTION__);
1053+
printk("%s: pte not valid\n", __func__);
10541054
return -EINVAL;
10551055
}
10561056
return (pte >> 1) << PAGE_SHIFT;

‎arch/alpha/kernel/core_t2.c‎

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -336,10 +336,7 @@ t2_direct_map_window1(unsigned long base, unsigned long length)
336336

337337
#if DEBUG_PRINT_FINAL_SETTINGS
338338
printk("%s: setting WBASE1=0x%lx WMASK1=0x%lx TBASE1=0x%lx\n",
339-
__FUNCTION__,
340-
*(vulp)T2_WBASE1,
341-
*(vulp)T2_WMASK1,
342-
*(vulp)T2_TBASE1);
339+
__func__, *(vulp)T2_WBASE1, *(vulp)T2_WMASK1, *(vulp)T2_TBASE1);
343340
#endif
344341
}
345342

@@ -366,26 +363,23 @@ t2_sg_map_window2(struct pci_controller *hose,
366363

367364
#if DEBUG_PRINT_FINAL_SETTINGS
368365
printk("%s: setting WBASE2=0x%lx WMASK2=0x%lx TBASE2=0x%lx\n",
369-
__FUNCTION__,
370-
*(vulp)T2_WBASE2,
371-
*(vulp)T2_WMASK2,
372-
*(vulp)T2_TBASE2);
366+
__func__, *(vulp)T2_WBASE2, *(vulp)T2_WMASK2, *(vulp)T2_TBASE2);
373367
#endif
374368
}
375369

376370
static void __init
377371
t2_save_configuration(void)
378372
{
379373
#if DEBUG_PRINT_INITIAL_SETTINGS
380-
printk("%s: HAE_1 was 0x%lx\n", __FUNCTION__, srm_hae); /* HW is 0 */
381-
printk("%s: HAE_2 was 0x%lx\n", __FUNCTION__, *(vulp)T2_HAE_2);
382-
printk("%s: HAE_3 was 0x%lx\n", __FUNCTION__, *(vulp)T2_HAE_3);
383-
printk("%s: HAE_4 was 0x%lx\n", __FUNCTION__, *(vulp)T2_HAE_4);
384-
printk("%s: HBASE was 0x%lx\n", __FUNCTION__, *(vulp)T2_HBASE);
374+
printk("%s: HAE_1 was 0x%lx\n", __func__, srm_hae); /* HW is 0 */
375+
printk("%s: HAE_2 was 0x%lx\n", __func__, *(vulp)T2_HAE_2);
376+
printk("%s: HAE_3 was 0x%lx\n", __func__, *(vulp)T2_HAE_3);
377+
printk("%s: HAE_4 was 0x%lx\n", __func__, *(vulp)T2_HAE_4);
378+
printk("%s: HBASE was 0x%lx\n", __func__, *(vulp)T2_HBASE);
385379

386-
printk("%s: WBASE1=0x%lx WMASK1=0x%lx TBASE1=0x%lx\n", __FUNCTION__,
380+
printk("%s: WBASE1=0x%lx WMASK1=0x%lx TBASE1=0x%lx\n", __func__,
387381
*(vulp)T2_WBASE1, *(vulp)T2_WMASK1, *(vulp)T2_TBASE1);
388-
printk("%s: WBASE2=0x%lx WMASK2=0x%lx TBASE2=0x%lx\n", __FUNCTION__,
382+
printk("%s: WBASE2=0x%lx WMASK2=0x%lx TBASE2=0x%lx\n", __func__,
389383
*(vulp)T2_WBASE2, *(vulp)T2_WMASK2, *(vulp)T2_TBASE2);
390384
#endif
391385

‎arch/alpha/kernel/core_titan.c‎

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -365,21 +365,21 @@ void __init
365365
titan_init_arch(void)
366366
{
367367
#if 0
368-
printk("%s: titan_init_arch()\n", __FUNCTION__);
369-
printk("%s: CChip registers:\n", __FUNCTION__);
370-
printk("%s: CSR_CSC 0x%lx\n", __FUNCTION__, TITAN_cchip->csc.csr);
371-
printk("%s: CSR_MTR 0x%lx\n", __FUNCTION__, TITAN_cchip->mtr.csr);
372-
printk("%s: CSR_MISC 0x%lx\n", __FUNCTION__, TITAN_cchip->misc.csr);
373-
printk("%s: CSR_DIM0 0x%lx\n", __FUNCTION__, TITAN_cchip->dim0.csr);
374-
printk("%s: CSR_DIM1 0x%lx\n", __FUNCTION__, TITAN_cchip->dim1.csr);
375-
printk("%s: CSR_DIR0 0x%lx\n", __FUNCTION__, TITAN_cchip->dir0.csr);
376-
printk("%s: CSR_DIR1 0x%lx\n", __FUNCTION__, TITAN_cchip->dir1.csr);
377-
printk("%s: CSR_DRIR 0x%lx\n", __FUNCTION__, TITAN_cchip->drir.csr);
378-
379-
printk("%s: DChip registers:\n", __FUNCTION__);
380-
printk("%s: CSR_DSC 0x%lx\n", __FUNCTION__, TITAN_dchip->dsc.csr);
381-
printk("%s: CSR_STR 0x%lx\n", __FUNCTION__, TITAN_dchip->str.csr);
382-
printk("%s: CSR_DREV 0x%lx\n", __FUNCTION__, TITAN_dchip->drev.csr);
368+
printk("%s: titan_init_arch()\n", __func__);
369+
printk("%s: CChip registers:\n", __func__);
370+
printk("%s: CSR_CSC 0x%lx\n", __func__, TITAN_cchip->csc.csr);
371+
printk("%s: CSR_MTR 0x%lx\n", __func__, TITAN_cchip->mtr.csr);
372+
printk("%s: CSR_MISC 0x%lx\n", __func__, TITAN_cchip->misc.csr);
373+
printk("%s: CSR_DIM0 0x%lx\n", __func__, TITAN_cchip->dim0.csr);
374+
printk("%s: CSR_DIM1 0x%lx\n", __func__, TITAN_cchip->dim1.csr);
375+
printk("%s: CSR_DIR0 0x%lx\n", __func__, TITAN_cchip->dir0.csr);
376+
printk("%s: CSR_DIR1 0x%lx\n", __func__, TITAN_cchip->dir1.csr);
377+
printk("%s: CSR_DRIR 0x%lx\n", __func__, TITAN_cchip->drir.csr);
378+
379+
printk("%s: DChip registers:\n", __func__);
380+
printk("%s: CSR_DSC 0x%lx\n", __func__, TITAN_dchip->dsc.csr);
381+
printk("%s: CSR_STR 0x%lx\n", __func__, TITAN_dchip->str.csr);
382+
printk("%s: CSR_DREV 0x%lx\n", __func__, TITAN_dchip->drev.csr);
383383
#endif
384384

385385
boot_cpuid = __hard_smp_processor_id();
@@ -700,13 +700,13 @@ titan_agp_translate(alpha_agp_info *agp, dma_addr_t addr)
700700

701701
if (addr < agp->aperture.bus_base ||
702702
addr >= agp->aperture.bus_base + agp->aperture.size) {
703-
printk("%s: addr out of range\n", __FUNCTION__);
703+
printk("%s: addr out of range\n", __func__);
704704
return -EINVAL;
705705
}
706706

707707
pte = aper->arena->ptes[baddr >> PAGE_SHIFT];
708708
if (!(pte & 1)) {
709-
printk("%s: pte not valid\n", __FUNCTION__);
709+
printk("%s: pte not valid\n", __func__);
710710
return -EINVAL;
711711
}
712712

‎arch/alpha/kernel/core_tsunami.c‎

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -241,8 +241,6 @@ tsunami_probe_write(volatile unsigned long *vaddr)
241241
#define tsunami_probe_read(ADDR) 1
242242
#endif /* NXM_MACHINE_CHECKS_ON_TSUNAMI */
243243

244-
#define FN __FUNCTION__
245-
246244
static void __init
247245
tsunami_init_one_pchip(tsunami_pchip *pchip, int index)
248246
{
@@ -383,27 +381,27 @@ tsunami_init_arch(void)
383381
/* NXMs just don't matter to Tsunami--unless they make it
384382
choke completely. */
385383
tmp = (unsigned long)(TSUNAMI_cchip - 1);
386-
printk("%s: probing bogus address: 0x%016lx\n", FN, bogus_addr);
384+
printk("%s: probing bogus address: 0x%016lx\n", __func__, bogus_addr);
387385
printk("\tprobe %s\n",
388386
tsunami_probe_write((unsigned long *)bogus_addr)
389387
? "succeeded" : "failed");
390388
#endif /* NXM_MACHINE_CHECKS_ON_TSUNAMI */
391389

392390
#if 0
393-
printk("%s: CChip registers:\n", FN);
394-
printk("%s: CSR_CSC 0x%lx\n", FN, TSUNAMI_cchip->csc.csr);
395-
printk("%s: CSR_MTR 0x%lx\n", FN, TSUNAMI_cchip.mtr.csr);
396-
printk("%s: CSR_MISC 0x%lx\n", FN, TSUNAMI_cchip->misc.csr);
397-
printk("%s: CSR_DIM0 0x%lx\n", FN, TSUNAMI_cchip->dim0.csr);
398-
printk("%s: CSR_DIM1 0x%lx\n", FN, TSUNAMI_cchip->dim1.csr);
399-
printk("%s: CSR_DIR0 0x%lx\n", FN, TSUNAMI_cchip->dir0.csr);
400-
printk("%s: CSR_DIR1 0x%lx\n", FN, TSUNAMI_cchip->dir1.csr);
401-
printk("%s: CSR_DRIR 0x%lx\n", FN, TSUNAMI_cchip->drir.csr);
391+
printk("%s: CChip registers:\n", __func__);
392+
printk("%s: CSR_CSC 0x%lx\n", __func__, TSUNAMI_cchip->csc.csr);
393+
printk("%s: CSR_MTR 0x%lx\n", __func__, TSUNAMI_cchip.mtr.csr);
394+
printk("%s: CSR_MISC 0x%lx\n", __func__, TSUNAMI_cchip->misc.csr);
395+
printk("%s: CSR_DIM0 0x%lx\n", __func__, TSUNAMI_cchip->dim0.csr);
396+
printk("%s: CSR_DIM1 0x%lx\n", __func__, TSUNAMI_cchip->dim1.csr);
397+
printk("%s: CSR_DIR0 0x%lx\n", __func__, TSUNAMI_cchip->dir0.csr);
398+
printk("%s: CSR_DIR1 0x%lx\n", __func__, TSUNAMI_cchip->dir1.csr);
399+
printk("%s: CSR_DRIR 0x%lx\n", __func__, TSUNAMI_cchip->drir.csr);
402400

403401
printk("%s: DChip registers:\n");
404-
printk("%s: CSR_DSC 0x%lx\n", FN, TSUNAMI_dchip->dsc.csr);
405-
printk("%s: CSR_STR 0x%lx\n", FN, TSUNAMI_dchip->str.csr);
406-
printk("%s: CSR_DREV 0x%lx\n", FN, TSUNAMI_dchip->drev.csr);
402+
printk("%s: CSR_DSC 0x%lx\n", __func__, TSUNAMI_dchip->dsc.csr);
403+
printk("%s: CSR_STR 0x%lx\n", __func__, TSUNAMI_dchip->str.csr);
404+
printk("%s: CSR_DREV 0x%lx\n", __func__, TSUNAMI_dchip->drev.csr);
407405
#endif
408406
/* With multiple PCI busses, we play with I/O as physical addrs. */
409407
ioport_resource.end = ~0UL;

‎arch/alpha/kernel/pci.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ pdev_save_srm_config(struct pci_dev *dev)
208208

209209
tmp = kmalloc(sizeof(*tmp), GFP_KERNEL);
210210
if (!tmp) {
211-
printk(KERN_ERR "%s: kmalloc() failed!\n", __FUNCTION__);
211+
printk(KERN_ERR "%s: kmalloc() failed!\n", __func__);
212212
return;
213213
}
214214
tmp->next = srm_saved_configs;

‎arch/alpha/kernel/pci_iommu.c‎

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -79,25 +79,21 @@ iommu_arena_new_node(int nid, struct pci_controller *hose, dma_addr_t base,
7979

8080
#ifdef CONFIG_DISCONTIGMEM
8181

82-
if (!NODE_DATA(nid) ||
83-
(NULL == (arena = alloc_bootmem_node(NODE_DATA(nid),
84-
sizeof(*arena))))) {
85-
printk("%s: couldn't allocate arena from node %d\n"
86-
" falling back to system-wide allocation\n",
87-
__FUNCTION__, nid);
88-
arena = alloc_bootmem(sizeof(*arena));
89-
}
90-
91-
if (!NODE_DATA(nid) ||
92-
(NULL == (arena->ptes = __alloc_bootmem_node(NODE_DATA(nid),
93-
mem_size,
94-
align,
95-
0)))) {
96-
printk("%s: couldn't allocate arena ptes from node %d\n"
97-
" falling back to system-wide allocation\n",
98-
__FUNCTION__, nid);
99-
arena->ptes = __alloc_bootmem(mem_size, align, 0);
100-
}
82+
arena = alloc_bootmem_node(NODE_DATA(nid), sizeof(*arena));
83+
if (!NODE_DATA(nid) || !arena) {
84+
printk("%s: couldn't allocate arena from node %d\n"
85+
" falling back to system-wide allocation\n",
86+
__func__, nid);
87+
arena = alloc_bootmem(sizeof(*arena));
88+
}
89+
90+
arena->ptes = __alloc_bootmem_node(NODE_DATA(nid), mem_size, align, 0);
91+
if (!NODE_DATA(nid) || !arena->ptes) {
92+
printk("%s: couldn't allocate arena ptes from node %d\n"
93+
" falling back to system-wide allocation\n",
94+
__func__, nid);
95+
arena->ptes = __alloc_bootmem(mem_size, align, 0);
96+
}
10197

10298
#else /* CONFIG_DISCONTIGMEM */
10399

‎arch/alpha/kernel/smp.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -755,7 +755,7 @@ smp_call_function_on_cpu (void (*func) (void *info), void *info, int retry,
755755
if (atomic_read(&data.unstarted_count) > 0) {
756756
long start_time = jiffies;
757757
printk(KERN_ERR "%s: initial timeout -- trying long wait\n",
758-
__FUNCTION__);
758+
__func__);
759759
timeout = jiffies + 30 * HZ;
760760
while (atomic_read(&data.unstarted_count) > 0
761761
&& time_before(jiffies, timeout))
@@ -764,7 +764,7 @@ smp_call_function_on_cpu (void (*func) (void *info), void *info, int retry,
764764
long delta = jiffies - start_time;
765765
printk(KERN_ERR
766766
"%s: response %ld.%ld seconds into long wait\n",
767-
__FUNCTION__, delta / HZ,
767+
__func__, delta / HZ,
768768
(100 * (delta - ((delta / HZ) * HZ))) / HZ);
769769
}
770770
}

‎arch/alpha/kernel/srm_env.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ srm_env_init(void)
199199
printk(KERN_INFO "%s: This Alpha system doesn't "
200200
"know about SRM (or you've booted "
201201
"SRM->MILO->Linux, which gets "
202-
"misdetected)...\n", __FUNCTION__);
202+
"misdetected)...\n", __func__);
203203
return -ENODEV;
204204
}
205205

‎arch/alpha/kernel/sys_alcor.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ alcor_init_pci(void)
259259
if (dev && dev->devfn == PCI_DEVFN(6,0)) {
260260
alpha_mv.sys.cia.gru_int_req_bits = XLT_GRU_INT_REQ_BITS;
261261
printk(KERN_INFO "%s: Detected AS500 or XLT motherboard.\n",
262-
__FUNCTION__);
262+
__func__);
263263
}
264264
pci_dev_put(dev);
265265
}

‎arch/alpha/kernel/sys_marvel.c‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ io7_get_irq_ctl(unsigned int irq, struct io7 **pio7)
8080
if (!(io7 = marvel_find_io7(pid))) {
8181
printk(KERN_ERR
8282
"%s for nonexistent io7 -- vec %x, pid %d\n",
83-
__FUNCTION__, irq, pid);
83+
__func__, irq, pid);
8484
return NULL;
8585
}
8686

@@ -90,7 +90,7 @@ io7_get_irq_ctl(unsigned int irq, struct io7 **pio7)
9090
if (irq >= 0x180) {
9191
printk(KERN_ERR
9292
"%s for invalid irq -- pid %d adjusted irq %x\n",
93-
__FUNCTION__, pid, irq);
93+
__func__, pid, irq);
9494
return NULL;
9595
}
9696

@@ -110,8 +110,8 @@ io7_enable_irq(unsigned int irq)
110110

111111
ctl = io7_get_irq_ctl(irq, &io7);
112112
if (!ctl || !io7) {
113-
printk(KERN_ERR "%s: get_ctl failed for irq %x\n",
114-
__FUNCTION__, irq);
113+
printk(KERN_ERR "%s: get_ctl failed for irq %x\n",
114+
__func__, irq);
115115
return;
116116
}
117117

@@ -130,8 +130,8 @@ io7_disable_irq(unsigned int irq)
130130

131131
ctl = io7_get_irq_ctl(irq, &io7);
132132
if (!ctl || !io7) {
133-
printk(KERN_ERR "%s: get_ctl failed for irq %x\n",
134-
__FUNCTION__, irq);
133+
printk(KERN_ERR "%s: get_ctl failed for irq %x\n",
134+
__func__, irq);
135135
return;
136136
}
137137

0 commit comments

Comments
 (0)