alpha: remove remaining __FUNCTION__ occurrences
authorHarvey Harrison <harvey.harrison@gmail.com>
Mon, 28 Apr 2008 09:13:46 +0000 (02:13 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 28 Apr 2008 15:58:27 +0000 (08:58 -0700)
__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>
12 files changed:
arch/alpha/kernel/core_marvel.c
arch/alpha/kernel/core_t2.c
arch/alpha/kernel/core_titan.c
arch/alpha/kernel/core_tsunami.c
arch/alpha/kernel/pci.c
arch/alpha/kernel/pci_iommu.c
arch/alpha/kernel/smp.c
arch/alpha/kernel/srm_env.c
arch/alpha/kernel/sys_alcor.c
arch/alpha/kernel/sys_marvel.c
arch/alpha/kernel/sys_sable.c
arch/alpha/kernel/sys_sio.c

index f10d2eddd2c309a807d58df12c48f01156f99efc..b04f1feb1dda80cd6c9868473b9c8789f1db4906 100644 (file)
@@ -994,7 +994,7 @@ marvel_agp_configure(alpha_agp_info *agp)
                 * rate, but warn the user.
                 */
                printk("%s: unknown PLL setting RNGB=%lx (PLL6_CTL=%016lx)\n",
-                      __FUNCTION__, IO7_PLL_RNGB(agp_pll), agp_pll);
+                      __func__, IO7_PLL_RNGB(agp_pll), agp_pll);
                break;
        }
 
@@ -1044,13 +1044,13 @@ marvel_agp_translate(alpha_agp_info *agp, dma_addr_t addr)
 
        if (addr < agp->aperture.bus_base ||
            addr >= agp->aperture.bus_base + agp->aperture.size) {
-               printk("%s: addr out of range\n", __FUNCTION__);
+               printk("%s: addr out of range\n", __func__);
                return -EINVAL;
        }
 
        pte = aper->arena->ptes[baddr >> PAGE_SHIFT];
        if (!(pte & 1)) {
-               printk("%s: pte not valid\n", __FUNCTION__);
+               printk("%s: pte not valid\n", __func__);
                return -EINVAL;
        } 
        return (pte >> 1) << PAGE_SHIFT;
index f5ca5255eb060ad822fff8358b4557ced9e11d2e..c0750291b44ad54a885fd3395f0811dc254ea44e 100644 (file)
@@ -336,10 +336,7 @@ t2_direct_map_window1(unsigned long base, unsigned long length)
 
 #if DEBUG_PRINT_FINAL_SETTINGS
        printk("%s: setting WBASE1=0x%lx WMASK1=0x%lx TBASE1=0x%lx\n",
-              __FUNCTION__,
-              *(vulp)T2_WBASE1,
-              *(vulp)T2_WMASK1,
-              *(vulp)T2_TBASE1);
+              __func__, *(vulp)T2_WBASE1, *(vulp)T2_WMASK1, *(vulp)T2_TBASE1);
 #endif
 }
 
@@ -366,10 +363,7 @@ t2_sg_map_window2(struct pci_controller *hose,
 
 #if DEBUG_PRINT_FINAL_SETTINGS
        printk("%s: setting WBASE2=0x%lx WMASK2=0x%lx TBASE2=0x%lx\n",
-              __FUNCTION__,
-              *(vulp)T2_WBASE2,
-              *(vulp)T2_WMASK2,
-              *(vulp)T2_TBASE2);
+              __func__, *(vulp)T2_WBASE2, *(vulp)T2_WMASK2, *(vulp)T2_TBASE2);
 #endif
 }
 
@@ -377,15 +371,15 @@ static void __init
 t2_save_configuration(void)
 {
 #if DEBUG_PRINT_INITIAL_SETTINGS
-       printk("%s: HAE_1 was 0x%lx\n", __FUNCTION__, srm_hae); /* HW is 0 */
-       printk("%s: HAE_2 was 0x%lx\n", __FUNCTION__, *(vulp)T2_HAE_2);
-       printk("%s: HAE_3 was 0x%lx\n", __FUNCTION__, *(vulp)T2_HAE_3);
-       printk("%s: HAE_4 was 0x%lx\n", __FUNCTION__, *(vulp)T2_HAE_4);
-       printk("%s: HBASE was 0x%lx\n", __FUNCTION__, *(vulp)T2_HBASE);
+       printk("%s: HAE_1 was 0x%lx\n", __func__, srm_hae); /* HW is 0 */
+       printk("%s: HAE_2 was 0x%lx\n", __func__, *(vulp)T2_HAE_2);
+       printk("%s: HAE_3 was 0x%lx\n", __func__, *(vulp)T2_HAE_3);
+       printk("%s: HAE_4 was 0x%lx\n", __func__, *(vulp)T2_HAE_4);
+       printk("%s: HBASE was 0x%lx\n", __func__, *(vulp)T2_HBASE);
 
-       printk("%s: WBASE1=0x%lx WMASK1=0x%lx TBASE1=0x%lx\n", __FUNCTION__, 
+       printk("%s: WBASE1=0x%lx WMASK1=0x%lx TBASE1=0x%lx\n", __func__,
               *(vulp)T2_WBASE1, *(vulp)T2_WMASK1, *(vulp)T2_TBASE1);
-       printk("%s: WBASE2=0x%lx WMASK2=0x%lx TBASE2=0x%lx\n", __FUNCTION__, 
+       printk("%s: WBASE2=0x%lx WMASK2=0x%lx TBASE2=0x%lx\n", __func__,
               *(vulp)T2_WBASE2, *(vulp)T2_WMASK2, *(vulp)T2_TBASE2);
 #endif
 
index 819326627b966c3f166f76b38a11614ad51e11ec..319fcb74611e57c9990aaba2e691079e8f1aa038 100644 (file)
@@ -365,21 +365,21 @@ void __init
 titan_init_arch(void)
 {
 #if 0
-       printk("%s: titan_init_arch()\n", __FUNCTION__);
-       printk("%s: CChip registers:\n", __FUNCTION__);
-       printk("%s: CSR_CSC 0x%lx\n", __FUNCTION__, TITAN_cchip->csc.csr);
-       printk("%s: CSR_MTR 0x%lx\n", __FUNCTION__, TITAN_cchip->mtr.csr);
-       printk("%s: CSR_MISC 0x%lx\n", __FUNCTION__, TITAN_cchip->misc.csr);
-       printk("%s: CSR_DIM0 0x%lx\n", __FUNCTION__, TITAN_cchip->dim0.csr);
-       printk("%s: CSR_DIM1 0x%lx\n", __FUNCTION__, TITAN_cchip->dim1.csr);
-       printk("%s: CSR_DIR0 0x%lx\n", __FUNCTION__, TITAN_cchip->dir0.csr);
-       printk("%s: CSR_DIR1 0x%lx\n", __FUNCTION__, TITAN_cchip->dir1.csr);
-       printk("%s: CSR_DRIR 0x%lx\n", __FUNCTION__, TITAN_cchip->drir.csr);
-
-       printk("%s: DChip registers:\n", __FUNCTION__);
-       printk("%s: CSR_DSC 0x%lx\n", __FUNCTION__, TITAN_dchip->dsc.csr);
-       printk("%s: CSR_STR 0x%lx\n", __FUNCTION__, TITAN_dchip->str.csr);
-       printk("%s: CSR_DREV 0x%lx\n", __FUNCTION__, TITAN_dchip->drev.csr);
+       printk("%s: titan_init_arch()\n", __func__);
+       printk("%s: CChip registers:\n", __func__);
+       printk("%s: CSR_CSC 0x%lx\n", __func__, TITAN_cchip->csc.csr);
+       printk("%s: CSR_MTR 0x%lx\n", __func__, TITAN_cchip->mtr.csr);
+       printk("%s: CSR_MISC 0x%lx\n", __func__, TITAN_cchip->misc.csr);
+       printk("%s: CSR_DIM0 0x%lx\n", __func__, TITAN_cchip->dim0.csr);
+       printk("%s: CSR_DIM1 0x%lx\n", __func__, TITAN_cchip->dim1.csr);
+       printk("%s: CSR_DIR0 0x%lx\n", __func__, TITAN_cchip->dir0.csr);
+       printk("%s: CSR_DIR1 0x%lx\n", __func__, TITAN_cchip->dir1.csr);
+       printk("%s: CSR_DRIR 0x%lx\n", __func__, TITAN_cchip->drir.csr);
+
+       printk("%s: DChip registers:\n", __func__);
+       printk("%s: CSR_DSC 0x%lx\n", __func__, TITAN_dchip->dsc.csr);
+       printk("%s: CSR_STR 0x%lx\n", __func__, TITAN_dchip->str.csr);
+       printk("%s: CSR_DREV 0x%lx\n", __func__, TITAN_dchip->drev.csr);
 #endif
 
        boot_cpuid = __hard_smp_processor_id();
@@ -700,13 +700,13 @@ titan_agp_translate(alpha_agp_info *agp, dma_addr_t addr)
 
        if (addr < agp->aperture.bus_base ||
            addr >= agp->aperture.bus_base + agp->aperture.size) {
-               printk("%s: addr out of range\n", __FUNCTION__);
+               printk("%s: addr out of range\n", __func__);
                return -EINVAL;
        }
 
        pte = aper->arena->ptes[baddr >> PAGE_SHIFT];
        if (!(pte & 1)) {
-               printk("%s: pte not valid\n", __FUNCTION__);
+               printk("%s: pte not valid\n", __func__);
                return -EINVAL;
        }
 
index ef91e09590d4d1aefe76772e81b29c83d9f73b78..5e7c28f92f19f29dde28d0e636ceb696f1750457 100644 (file)
@@ -241,8 +241,6 @@ tsunami_probe_write(volatile unsigned long *vaddr)
 #define tsunami_probe_read(ADDR) 1
 #endif /* NXM_MACHINE_CHECKS_ON_TSUNAMI */
 
-#define FN __FUNCTION__
-
 static void __init
 tsunami_init_one_pchip(tsunami_pchip *pchip, int index)
 {
@@ -383,27 +381,27 @@ tsunami_init_arch(void)
        /* NXMs just don't matter to Tsunami--unless they make it
           choke completely. */
        tmp = (unsigned long)(TSUNAMI_cchip - 1);
-       printk("%s: probing bogus address:  0x%016lx\n", FN, bogus_addr);
+       printk("%s: probing bogus address:  0x%016lx\n", __func__, bogus_addr);
        printk("\tprobe %s\n",
               tsunami_probe_write((unsigned long *)bogus_addr)
               ? "succeeded" : "failed");
 #endif /* NXM_MACHINE_CHECKS_ON_TSUNAMI */
 
 #if 0
-       printk("%s: CChip registers:\n", FN);
-       printk("%s: CSR_CSC 0x%lx\n", FN, TSUNAMI_cchip->csc.csr);
-       printk("%s: CSR_MTR 0x%lx\n", FN, TSUNAMI_cchip.mtr.csr);
-       printk("%s: CSR_MISC 0x%lx\n", FN, TSUNAMI_cchip->misc.csr);
-       printk("%s: CSR_DIM0 0x%lx\n", FN, TSUNAMI_cchip->dim0.csr);
-       printk("%s: CSR_DIM1 0x%lx\n", FN, TSUNAMI_cchip->dim1.csr);
-       printk("%s: CSR_DIR0 0x%lx\n", FN, TSUNAMI_cchip->dir0.csr);
-       printk("%s: CSR_DIR1 0x%lx\n", FN, TSUNAMI_cchip->dir1.csr);
-       printk("%s: CSR_DRIR 0x%lx\n", FN, TSUNAMI_cchip->drir.csr);
+       printk("%s: CChip registers:\n", __func__);
+       printk("%s: CSR_CSC 0x%lx\n", __func__, TSUNAMI_cchip->csc.csr);
+       printk("%s: CSR_MTR 0x%lx\n", __func__, TSUNAMI_cchip.mtr.csr);
+       printk("%s: CSR_MISC 0x%lx\n", __func__, TSUNAMI_cchip->misc.csr);
+       printk("%s: CSR_DIM0 0x%lx\n", __func__, TSUNAMI_cchip->dim0.csr);
+       printk("%s: CSR_DIM1 0x%lx\n", __func__, TSUNAMI_cchip->dim1.csr);
+       printk("%s: CSR_DIR0 0x%lx\n", __func__, TSUNAMI_cchip->dir0.csr);
+       printk("%s: CSR_DIR1 0x%lx\n", __func__, TSUNAMI_cchip->dir1.csr);
+       printk("%s: CSR_DRIR 0x%lx\n", __func__, TSUNAMI_cchip->drir.csr);
 
        printk("%s: DChip registers:\n");
-       printk("%s: CSR_DSC 0x%lx\n", FN, TSUNAMI_dchip->dsc.csr);
-       printk("%s: CSR_STR 0x%lx\n", FN, TSUNAMI_dchip->str.csr);
-       printk("%s: CSR_DREV 0x%lx\n", FN, TSUNAMI_dchip->drev.csr);
+       printk("%s: CSR_DSC 0x%lx\n", __func__, TSUNAMI_dchip->dsc.csr);
+       printk("%s: CSR_STR 0x%lx\n", __func__, TSUNAMI_dchip->str.csr);
+       printk("%s: CSR_DREV 0x%lx\n", __func__, TSUNAMI_dchip->drev.csr);
 #endif
        /* With multiple PCI busses, we play with I/O as physical addrs.  */
        ioport_resource.end = ~0UL;
index 78357798b6fd100d3964f20232fa974fc241b26f..baf57563b14c42c54cc433d0bea067c9330871cc 100644 (file)
@@ -208,7 +208,7 @@ pdev_save_srm_config(struct pci_dev *dev)
 
        tmp = kmalloc(sizeof(*tmp), GFP_KERNEL);
        if (!tmp) {
-               printk(KERN_ERR "%s: kmalloc() failed!\n", __FUNCTION__);
+               printk(KERN_ERR "%s: kmalloc() failed!\n", __func__);
                return;
        }
        tmp->next = srm_saved_configs;
index dd6e334ab9e127d61338f27bb28de710689aa6ab..2179c602032a6e5a7a4d55ec59bca02e2a745334 100644 (file)
@@ -79,25 +79,21 @@ iommu_arena_new_node(int nid, struct pci_controller *hose, dma_addr_t base,
 
 #ifdef CONFIG_DISCONTIGMEM
 
-        if (!NODE_DATA(nid) ||
-            (NULL == (arena = alloc_bootmem_node(NODE_DATA(nid),
-                                                 sizeof(*arena))))) {
-                printk("%s: couldn't allocate arena from node %d\n"
-                       "    falling back to system-wide allocation\n",
-                       __FUNCTION__, nid);
-                arena = alloc_bootmem(sizeof(*arena));
-        }
-
-        if (!NODE_DATA(nid) ||
-            (NULL == (arena->ptes = __alloc_bootmem_node(NODE_DATA(nid),
-                                                         mem_size,
-                                                         align,
-                                                         0)))) {
-                printk("%s: couldn't allocate arena ptes from node %d\n"
-                       "    falling back to system-wide allocation\n",
-                       __FUNCTION__, nid);
-                arena->ptes = __alloc_bootmem(mem_size, align, 0);
-        }
+       arena = alloc_bootmem_node(NODE_DATA(nid), sizeof(*arena));
+       if (!NODE_DATA(nid) || !arena) {
+               printk("%s: couldn't allocate arena from node %d\n"
+                      "    falling back to system-wide allocation\n",
+                      __func__, nid);
+               arena = alloc_bootmem(sizeof(*arena));
+       }
+
+       arena->ptes = __alloc_bootmem_node(NODE_DATA(nid), mem_size, align, 0);
+       if (!NODE_DATA(nid) || !arena->ptes) {
+               printk("%s: couldn't allocate arena ptes from node %d\n"
+                      "    falling back to system-wide allocation\n",
+                      __func__, nid);
+               arena->ptes = __alloc_bootmem(mem_size, align, 0);
+       }
 
 #else /* CONFIG_DISCONTIGMEM */
 
index 63c2073401ee5ce9bf75cbe90f28bffb88cc8375..2525692db0abd2608f1acfc78ac351668a57c85e 100644 (file)
@@ -755,7 +755,7 @@ smp_call_function_on_cpu (void (*func) (void *info), void *info, int retry,
        if (atomic_read(&data.unstarted_count) > 0) {
                long start_time = jiffies;
                printk(KERN_ERR "%s: initial timeout -- trying long wait\n",
-                      __FUNCTION__);
+                      __func__);
                timeout = jiffies + 30 * HZ;
                while (atomic_read(&data.unstarted_count) > 0
                       && time_before(jiffies, timeout))
@@ -764,7 +764,7 @@ smp_call_function_on_cpu (void (*func) (void *info), void *info, int retry,
                        long delta = jiffies - start_time;
                        printk(KERN_ERR 
                               "%s: response %ld.%ld seconds into long wait\n",
-                              __FUNCTION__, delta / HZ,
+                              __func__, delta / HZ,
                               (100 * (delta - ((delta / HZ) * HZ))) / HZ);
                }
        }
index f7dd081d57ffa4283bd08917d6965e6181e9ada6..78ad7cd1bbd60326d38bee8f00c8beb6a55f03eb 100644 (file)
@@ -199,7 +199,7 @@ srm_env_init(void)
                printk(KERN_INFO "%s: This Alpha system doesn't "
                                "know about SRM (or you've booted "
                                "SRM->MILO->Linux, which gets "
-                               "misdetected)...\n", __FUNCTION__);
+                               "misdetected)...\n", __func__);
                return -ENODEV;
        }
 
index d187d01d2a17b72dc603241c26c85b6cf426d1ad..e53a1e1c2f217233abfc19ff40249f7bcde269b8 100644 (file)
@@ -259,7 +259,7 @@ alcor_init_pci(void)
        if (dev && dev->devfn == PCI_DEVFN(6,0)) {
                alpha_mv.sys.cia.gru_int_req_bits = XLT_GRU_INT_REQ_BITS; 
                printk(KERN_INFO "%s: Detected AS500 or XLT motherboard.\n",
-                      __FUNCTION__);
+                      __func__);
        }
        pci_dev_put(dev);
 }
index 922143ea1cdbb6d4b6df166f26e22482ef2f871c..828449cd263687c18bc278358a8e8e2c8c8a01be 100644 (file)
@@ -80,7 +80,7 @@ io7_get_irq_ctl(unsigned int irq, struct io7 **pio7)
        if (!(io7 = marvel_find_io7(pid))) {
                printk(KERN_ERR 
                       "%s for nonexistent io7 -- vec %x, pid %d\n",
-                      __FUNCTION__, irq, pid);
+                      __func__, irq, pid);
                return NULL;
        }
 
@@ -90,7 +90,7 @@ io7_get_irq_ctl(unsigned int irq, struct io7 **pio7)
        if (irq >= 0x180) {
                printk(KERN_ERR 
                       "%s for invalid irq -- pid %d adjusted irq %x\n",
-                      __FUNCTION__, pid, irq);
+                      __func__, pid, irq);
                return NULL;
        }
 
@@ -110,8 +110,8 @@ io7_enable_irq(unsigned int irq)
 
        ctl = io7_get_irq_ctl(irq, &io7);
        if (!ctl || !io7) {
-               printk(KERN_ERR "%s: get_ctl failed for irq %x\n", 
-                      __FUNCTION__, irq);
+               printk(KERN_ERR "%s: get_ctl failed for irq %x\n",
+                      __func__, irq);
                return;
        }
                
@@ -130,8 +130,8 @@ io7_disable_irq(unsigned int irq)
 
        ctl = io7_get_irq_ctl(irq, &io7);
        if (!ctl || !io7) {
-               printk(KERN_ERR "%s: get_ctl failed for irq %x\n", 
-                      __FUNCTION__, irq);
+               printk(KERN_ERR "%s: get_ctl failed for irq %x\n",
+                      __func__, irq);
                return;
        }
                
index 906019cfa6815ff8d6c00d6a299313090398b7bc..99a7f19da13aae935ae8b25ca9a590e8d5e02272 100644 (file)
@@ -454,7 +454,7 @@ sable_lynx_enable_irq(unsigned int irq)
        spin_unlock(&sable_lynx_irq_lock);
 #if 0
        printk("%s: mask 0x%lx bit 0x%x irq 0x%x\n",
-              __FUNCTION__, mask, bit, irq);
+              __func__, mask, bit, irq);
 #endif
 }
 
@@ -470,7 +470,7 @@ sable_lynx_disable_irq(unsigned int irq)
        spin_unlock(&sable_lynx_irq_lock);
 #if 0
        printk("%s: mask 0x%lx bit 0x%x irq 0x%x\n",
-              __FUNCTION__, mask, bit, irq);
+              __func__, mask, bit, irq);
 #endif
 }
 
@@ -524,7 +524,7 @@ sable_lynx_srm_device_interrupt(unsigned long vector)
        irq = sable_lynx_irq_swizzle->mask_to_irq[bit];
 #if 0
        printk("%s: vector 0x%lx bit 0x%x irq 0x%x\n",
-              __FUNCTION__, vector, bit, irq);
+              __func__, vector, bit, irq);
 #endif
        handle_irq(irq);
 }
index ee7b9009ebb4f45c19d50fbf93d0a762769e0154..d4327e461c22156543e044eff59abc1ba628e0ad 100644 (file)
@@ -89,7 +89,7 @@ sio_pci_route(void)
        /* First, ALWAYS read and print the original setting. */
        pci_bus_read_config_dword(pci_isa_hose->bus, PCI_DEVFN(7, 0), 0x60,
                                  &orig_route_tab);
-       printk("%s: PIRQ original 0x%x new 0x%x\n", __FUNCTION__,
+       printk("%s: PIRQ original 0x%x new 0x%x\n", __func__,
               orig_route_tab, alpha_mv.sys.sio.route_tab);
 
 #if defined(ALPHA_RESTORE_SRM_SETUP)