]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
ide: replace remaining __FUNCTION__ occurrences
authorHarvey Harrison <harvey.harrison@gmail.com>
Sat, 26 Apr 2008 20:25:20 +0000 (22:25 +0200)
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Sat, 26 Apr 2008 20:25:20 +0000 (22:25 +0200)
__FUNCTION__ is gcc-specific, use __func__

[bart: fix checkpatch.pl errors in ide-lib.c and ppc/mpc8xx.c while at it]

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 files changed:
drivers/ide/ide-acpi.c
drivers/ide/ide-dma.c
drivers/ide/ide-lib.c
drivers/ide/ide-probe.c
drivers/ide/ide-proc.c
drivers/ide/ide-scan-pci.c
drivers/ide/ide-taskfile.c
drivers/ide/legacy/ht6560b.c
drivers/ide/mips/au1xxx-ide.c
drivers/ide/pci/hpt366.c
drivers/ide/pci/pdc202xx_new.c
drivers/ide/pci/scc_pata.c
drivers/ide/pci/sgiioc4.c
drivers/ide/pci/siimage.c
drivers/ide/pci/sl82c105.c
drivers/ide/ppc/mpc8xx.c

index 0f6fb6b72dd91bcbb15de6f237e279df2d60c353..e4ad26e4fce7b4e1742f7e3c70c0c3feccee87cc 100644 (file)
@@ -55,7 +55,7 @@ struct ide_acpi_hwif_link {
 /* note: adds function name and KERN_DEBUG */
 #ifdef DEBUGGING
 #define DEBPRINT(fmt, args...) \
-               printk(KERN_DEBUG "%s: " fmt, __FUNCTION__, ## args)
+               printk(KERN_DEBUG "%s: " fmt, __func__, ## args)
 #else
 #define DEBPRINT(fmt, args...) do {} while (0)
 #endif /* DEBUGGING */
@@ -309,7 +309,7 @@ static int do_drive_get_GTF(ide_drive_t *drive,
        if (ACPI_FAILURE(status)) {
                printk(KERN_DEBUG
                       "%s: Run _GTF error: status = 0x%x\n",
-                      __FUNCTION__, status);
+                      __func__, status);
                goto out;
        }
 
@@ -335,7 +335,7 @@ static int do_drive_get_GTF(ide_drive_t *drive,
            out_obj->buffer.length % REGS_PER_GTF) {
                printk(KERN_ERR
                       "%s: unexpected GTF length (%d) or addr (0x%p)\n",
-                      __FUNCTION__, out_obj->buffer.length,
+                      __func__, out_obj->buffer.length,
                       out_obj->buffer.pointer);
                err = -ENOENT;
                kfree(output.pointer);
@@ -384,7 +384,7 @@ static int taskfile_load_raw(ide_drive_t *drive,
        err = ide_no_data_taskfile(drive, &args);
        if (err)
                printk(KERN_ERR "%s: ide_no_data_taskfile failed: %u\n",
-                      __FUNCTION__, err);
+                      __func__, err);
 
        return err;
 }
@@ -422,7 +422,7 @@ static int do_drive_set_taskfiles(ide_drive_t *drive,
 
        if (gtf_length % REGS_PER_GTF) {
                printk(KERN_ERR "%s: unexpected GTF length (%d)\n",
-                      __FUNCTION__, gtf_length);
+                      __func__, gtf_length);
                goto out;
        }
 
@@ -547,7 +547,7 @@ void ide_acpi_get_timing(ide_hwif_t *hwif)
                printk(KERN_ERR
                        "%s: unexpected _GTM length (0x%x)[should be 0x%zx] or "
                        "addr (0x%p)\n",
-                       __FUNCTION__, out_obj->buffer.length,
+                       __func__, out_obj->buffer.length,
                        sizeof(struct GTM_buffer), out_obj->buffer.pointer);
                return;
        }
index 986ec465cb77bd08f373cd4270ca987e1e133297..3cdb0749ada453fc5120932c7db66e669c4148fb 100644 (file)
@@ -542,7 +542,7 @@ static int __ide_dma_test_irq(ide_drive_t *drive)
                return 1;
        if (!drive->waiting_for_dma)
                printk(KERN_WARNING "%s: (%s) called while not waiting\n",
-                       drive->name, __FUNCTION__);
+                       drive->name, __func__);
        return 0;
 }
 #else
index 46443f16315404af653541e837075730148e7b4f..6f04ea3e93a896ecf7c84954ab5145f63a9bd117 100644 (file)
@@ -85,7 +85,7 @@ static u8 ide_rate_filter(ide_drive_t *drive, u8 speed)
                        mode = XFER_PIO_4;
        }
 
-//     printk("%s: mode 0x%02x, speed 0x%02x\n", __FUNCTION__, mode, speed);
+/*     printk("%s: mode 0x%02x, speed 0x%02x\n", __func__, mode, speed); */
 
        return min(speed, mode);
 }
index c2cdeefb016c471fd6b2b34ed06251dcf3ef9a2e..d2faef17e548bdcd1fbc1f6062700862e14bcf4d 100644 (file)
@@ -644,7 +644,7 @@ static int ide_register_port(ide_hwif_t *hwif)
        ret = device_register(&hwif->gendev);
        if (ret < 0) {
                printk(KERN_WARNING "IDE: %s: device_register error: %d\n",
-                       __FUNCTION__, ret);
+                       __func__, ret);
                goto out;
        }
 
index 5d3562b450390b4f8f2d24f30eb73290fa02dfa7..d9d98ac85b29165f8d4c809c060e8332e9f7e383 100644 (file)
@@ -599,14 +599,14 @@ static int ide_replace_subdriver(ide_drive_t *drive, const char *driver)
        err = device_attach(dev);
        if (err < 0)
                printk(KERN_WARNING "IDE: %s: device_attach error: %d\n",
-                       __FUNCTION__, err);
+                       __func__, err);
        drive->driver_req[0] = 0;
        if (dev->driver == NULL) {
                err = device_attach(dev);
                if (err < 0)
                        printk(KERN_WARNING
                                "IDE: %s: device_attach(2) error: %d\n",
-                               __FUNCTION__, err);
+                               __func__, err);
        }
        if (dev->driver && !strcmp(dev->driver->name, driver))
                ret = 0;
@@ -820,7 +820,7 @@ static int ide_drivers_show(struct seq_file *s, void *p)
        err = bus_for_each_drv(&ide_bus_type, NULL, s, proc_print_driver);
        if (err < 0)
                printk(KERN_WARNING "IDE: %s: bus_for_each_drv error: %d\n",
-                       __FUNCTION__, err);
+                       __func__, err);
        return 0;
 }
 
index 98888da1b600d3a4965e2dbc2d041332e5c5cbbc..0e79efff1debdd5c357c658b77b0ec1a60e735e2 100644 (file)
@@ -102,7 +102,7 @@ static int __init ide_scan_pcibus(void)
                if (__pci_register_driver(d, d->driver.owner,
                                          d->driver.mod_name))
                        printk(KERN_ERR "%s: failed to register %s driver\n",
-                                       __FUNCTION__, d->driver.mod_name);
+                                       __func__, d->driver.mod_name);
        }
 
        return 0;
index 155cc904f4eb056948745060c3e704d6a7698d29..fac6835273a8b5e3a0aead2b72ca8c8d0e80b29c 100644 (file)
@@ -455,7 +455,7 @@ static ide_startstop_t task_in_intr(ide_drive_t *drive)
 
        /* Error? */
        if (stat & ERR_STAT)
-               return task_error(drive, rq, __FUNCTION__, stat);
+               return task_error(drive, rq, __func__, stat);
 
        /* Didn't want any data? Odd. */
        if (!(stat & DRQ_STAT))
@@ -467,7 +467,7 @@ static ide_startstop_t task_in_intr(ide_drive_t *drive)
        if (!hwif->nleft) {
                stat = wait_drive_not_busy(drive);
                if (!OK_STAT(stat, 0, BAD_STAT))
-                       return task_error(drive, rq, __FUNCTION__, stat);
+                       return task_error(drive, rq, __func__, stat);
                task_end_request(drive, rq, stat);
                return ide_stopped;
        }
@@ -488,11 +488,11 @@ static ide_startstop_t task_out_intr (ide_drive_t *drive)
        u8 stat = ide_read_status(drive);
 
        if (!OK_STAT(stat, DRIVE_READY, drive->bad_wstat))
-               return task_error(drive, rq, __FUNCTION__, stat);
+               return task_error(drive, rq, __func__, stat);
 
        /* Deal with unexpected ATA data phase. */
        if (((stat & DRQ_STAT) == 0) ^ !hwif->nleft)
-               return task_error(drive, rq, __FUNCTION__, stat);
+               return task_error(drive, rq, __func__, stat);
 
        if (!hwif->nleft) {
                task_end_request(drive, rq, stat);
@@ -675,7 +675,7 @@ int ide_taskfile_ioctl (ide_drive_t *drive, unsigned int cmd, unsigned long arg)
                                /* (hs): give up if multcount is not set */
                                printk(KERN_ERR "%s: %s Multimode Write " \
                                        "multcount is not set\n",
-                                       drive->name, __FUNCTION__);
+                                       drive->name, __func__);
                                err = -EPERM;
                                goto abort;
                        }
@@ -692,7 +692,7 @@ int ide_taskfile_ioctl (ide_drive_t *drive, unsigned int cmd, unsigned long arg)
                                /* (hs): give up if multcount is not set */
                                printk(KERN_ERR "%s: %s Multimode Read failure " \
                                        "multcount is not set\n",
-                                       drive->name, __FUNCTION__);
+                                       drive->name, __func__);
                                err = -EPERM;
                                goto abort;
                        }
index 971960ee7c036eb7236d218e6c4fa52acd18c874..702d8deb578053033d4aa2deb610384b6876294b 100644 (file)
@@ -352,12 +352,12 @@ static int __init ht6560b_init(void)
 
        if (!request_region(HT_CONFIG_PORT, 1, DRV_NAME)) {
                printk(KERN_NOTICE "%s: HT_CONFIG_PORT not found\n",
-                       __FUNCTION__);
+                       __func__);
                return -ENODEV;
        }
 
        if (!try_to_init_ht6560b()) {
-               printk(KERN_NOTICE "%s: HBA not found\n", __FUNCTION__);
+               printk(KERN_NOTICE "%s: HBA not found\n", __func__);
                goto release_region;
        }
 
index e539977b33489821f695b3f762eb9431c5c5b7e9..7179d4953211616f46e1d8c36ec8c0379dc87f22 100644 (file)
@@ -61,7 +61,7 @@ void auide_insw(unsigned long port, void *addr, u32 count)
 
        if(!put_dest_flags(ahwif->rx_chan, (void*)addr, count << 1, 
                           DDMA_FLAGS_NOIE)) {
-               printk(KERN_ERR "%s failed %d\n", __FUNCTION__, __LINE__);
+               printk(KERN_ERR "%s failed %d\n", __func__, __LINE__);
                return;
        }
        ctp = *((chan_tab_t **)ahwif->rx_chan);
@@ -79,7 +79,7 @@ void auide_outsw(unsigned long port, void *addr, u32 count)
 
        if(!put_source_flags(ahwif->tx_chan, (void*)addr,
                             count << 1, DDMA_FLAGS_NOIE)) {
-               printk(KERN_ERR "%s failed %d\n", __FUNCTION__, __LINE__);
+               printk(KERN_ERR "%s failed %d\n", __func__, __LINE__);
                return;
        }
        ctp = *((chan_tab_t **)ahwif->tx_chan);
@@ -250,7 +250,7 @@ static int auide_build_dmatable(ide_drive_t *drive)
                                                     (void*) sg_virt(sg),
                                                     tc, flags)) { 
                                        printk(KERN_ERR "%s failed %d\n", 
-                                              __FUNCTION__, __LINE__);
+                                              __func__, __LINE__);
                                }
                        } else 
                        {
@@ -258,7 +258,7 @@ static int auide_build_dmatable(ide_drive_t *drive)
                                                   (void*) sg_virt(sg),
                                                   tc, flags)) { 
                                        printk(KERN_ERR "%s failed %d\n", 
-                                              __FUNCTION__, __LINE__);
+                                              __func__, __LINE__);
                                }
                        }
 
index 1592dbf6c5cb997c3bfb2a495e0fa01fb9df8dc8..ec77a7a5c61fb2d22cb5e68de4dffd4e36fedd4d 100644 (file)
@@ -776,7 +776,7 @@ static void hpt366_dma_lost_irq(ide_drive_t *drive)
        pci_read_config_byte(dev, 0x52, &mcr3);
        pci_read_config_byte(dev, 0x5a, &scr1);
        printk("%s: (%s)  mcr1=0x%02x, mcr3=0x%02x, scr1=0x%02x\n",
-               drive->name, __FUNCTION__, mcr1, mcr3, scr1);
+               drive->name, __func__, mcr1, mcr3, scr1);
        if (scr1 & 0x10)
                pci_write_config_byte(dev, 0x5a, scr1 & ~0x10);
        ide_dma_lost_irq(drive);
@@ -858,7 +858,7 @@ static int hpt374_ide_dma_test_irq(ide_drive_t *drive)
 
        if (!drive->waiting_for_dma)
                printk(KERN_WARNING "%s: (%s) called while not waiting\n",
-                               drive->name, __FUNCTION__);
+                               drive->name, __func__);
        return 0;
 }
 
index 35a249cfe03f37c74603a9534e85f16455358efd..ec9bd7b352fc031d1308d493e8da7ca9ad705b06 100644 (file)
@@ -34,7 +34,7 @@
 #undef DEBUG
 
 #ifdef DEBUG
-#define DBG(fmt, args...) printk("%s: " fmt, __FUNCTION__, ## args)
+#define DBG(fmt, args...) printk("%s: " fmt, __func__, ## args)
 #else
 #define DBG(fmt, args...)
 #endif
index 41a993f3ded24ca84f7096ddb67b2fc22d31753c..e7f8ebc94b055e666c8a8c8e416027dc15fc7a95 100644 (file)
@@ -449,7 +449,7 @@ static int scc_dma_test_irq(ide_drive_t *drive)
 
        if (!drive->waiting_for_dma)
                printk(KERN_WARNING "%s: (%s) called while not waiting\n",
-                       drive->name, __FUNCTION__);
+                       drive->name, __func__);
        return 0;
 }
 
index e16597ddbd912d91b96981bb7f95f706fa163bf2..ec48decb17443267b00ce6f7325d1f2e96486577 100644 (file)
@@ -170,10 +170,10 @@ sgiioc4_clearirq(ide_drive_t * drive)
                        printk(KERN_ERR
                               "%s(%s) : PCI Bus Error when doing DMA:"
                                   " status-cmd reg is 0x%x\n",
-                              __FUNCTION__, drive->name, pci_stat_cmd_reg);
+                              __func__, drive->name, pci_stat_cmd_reg);
                        printk(KERN_ERR
                               "%s(%s) : PCI Error Address is 0x%x%x\n",
-                              __FUNCTION__, drive->name,
+                              __func__, drive->name,
                               pci_err_addr_high, pci_err_addr_low);
                        /* Clear the PCI Error indicator */
                        pci_write_config_dword(dev, PCI_COMMAND, 0x00000146);
@@ -232,7 +232,7 @@ sgiioc4_ide_dma_end(ide_drive_t * drive)
                printk(KERN_ERR
                       "%s(%s): IOC4 DMA STOP bit is still 1 :"
                       "ioc4_dma_reg 0x%x\n",
-                      __FUNCTION__, drive->name, ioc4_dma);
+                      __func__, drive->name, ioc4_dma);
                dma_stat = 1;
        }
 
@@ -251,7 +251,7 @@ sgiioc4_ide_dma_end(ide_drive_t * drive)
                udelay(1);
        }
        if (!valid) {
-               printk(KERN_ERR "%s(%s) : DMA incomplete\n", __FUNCTION__,
+               printk(KERN_ERR "%s(%s) : DMA incomplete\n", __func__,
                       drive->name);
                dma_stat = 1;
        }
@@ -264,7 +264,7 @@ sgiioc4_ide_dma_end(ide_drive_t * drive)
                        printk(KERN_ERR
                               "%s(%s): WARNING!! byte_count_dev %d "
                               "!= byte_count_mem %d\n",
-                              __FUNCTION__, drive->name, bc_dev, bc_mem);
+                              __func__, drive->name, bc_dev, bc_mem);
                }
        }
 
@@ -343,7 +343,7 @@ ide_dma_sgiioc4(ide_hwif_t * hwif, unsigned long dma_base)
                printk(KERN_ERR
                       "%s(%s) -- ERROR, Addresses 0x%p to 0x%p "
                       "ALREADY in use\n",
-                      __FUNCTION__, hwif->name, (void *) dma_base,
+                      __func__, hwif->name, (void *) dma_base,
                       (void *) dma_base + num_ports - 1);
                return -1;
        }
@@ -352,7 +352,7 @@ ide_dma_sgiioc4(ide_hwif_t * hwif, unsigned long dma_base)
        if (virt_dma_base == NULL) {
                printk(KERN_ERR
                       "%s(%s) -- ERROR, Unable to map addresses 0x%lx to 0x%lx\n",
-                      __FUNCTION__, hwif->name, dma_base, dma_base + num_ports - 1);
+                      __func__, hwif->name, dma_base, dma_base + num_ports - 1);
                goto dma_remap_failure;
        }
        hwif->dma_base = (unsigned long) virt_dma_base;
@@ -378,7 +378,7 @@ ide_dma_sgiioc4(ide_hwif_t * hwif, unsigned long dma_base)
                            hwif->dmatable_cpu, hwif->dmatable_dma);
        printk(KERN_INFO
               "%s() -- Error! Unable to allocate DMA Maps for drive %s\n",
-              __FUNCTION__, hwif->name);
+              __func__, hwif->name);
        printk(KERN_INFO
               "Changing from DMA to PIO mode for Drive %s\n", hwif->name);
 
@@ -406,14 +406,14 @@ sgiioc4_configure_for_dma(int dma_direction, ide_drive_t * drive)
        if (ioc4_dma & IOC4_S_DMA_ACTIVE) {
                printk(KERN_WARNING
                        "%s(%s):Warning!! DMA from previous transfer was still active\n",
-                      __FUNCTION__, drive->name);
+                      __func__, drive->name);
                writel(IOC4_S_DMA_STOP, (void __iomem *)ioc4_dma_addr);
                ioc4_dma = sgiioc4_ide_dma_stop(hwif, dma_base);
 
                if (ioc4_dma & IOC4_S_DMA_STOP)
                        printk(KERN_ERR
                               "%s(%s) : IOC4 Dma STOP bit is still 1\n",
-                              __FUNCTION__, drive->name);
+                              __func__, drive->name);
        }
 
        ioc4_dma = readl((void __iomem *)ioc4_dma_addr);
@@ -421,14 +421,14 @@ sgiioc4_configure_for_dma(int dma_direction, ide_drive_t * drive)
                printk(KERN_WARNING
                       "%s(%s) : Warning!! - DMA Error during Previous"
                       " transfer | status 0x%x\n",
-                      __FUNCTION__, drive->name, ioc4_dma);
+                      __func__, drive->name, ioc4_dma);
                writel(IOC4_S_DMA_STOP, (void __iomem *)ioc4_dma_addr);
                ioc4_dma = sgiioc4_ide_dma_stop(hwif, dma_base);
 
                if (ioc4_dma & IOC4_S_DMA_STOP)
                        printk(KERN_ERR
                               "%s(%s) : IOC4 DMA STOP bit is still 1\n",
-                              __FUNCTION__, drive->name);
+                              __func__, drive->name);
        }
 
        /* Address of the Scatter Gather List */
@@ -618,7 +618,7 @@ sgiioc4_ide_setup_pci_device(struct pci_dev *dev)
                printk(KERN_ERR
                        "%s : %s -- ERROR, Addresses "
                        "0x%p to 0x%p ALREADY in use\n",
-                      __FUNCTION__, hwif->name, (void *) cmd_phys_base,
+                      __func__, hwif->name, (void *) cmd_phys_base,
                       (void *) cmd_phys_base + IOC4_CMD_CTL_BLK_SIZE);
                return -ENOMEM;
        }
index 3e4b993807097a302b0521460770f91ae51dda6e..faf5c3d6ab7223e5f01d013bd7dfa3004ed55b67 100644 (file)
@@ -347,7 +347,7 @@ static int siimage_mmio_ide_dma_test_irq (ide_drive_t *drive)
                        printk(KERN_WARNING "%s: sata_error = 0x%08x, "
                                "watchdog = %d, %s\n",
                                drive->name, sata_error, watchdog,
-                               __FUNCTION__);
+                               __func__);
 
                } else {
                        watchdog = (ext_stat & 0x8000) ? 1 : 0;
index 66817fe1eeae067a0a0e829a8fb553fa73a7028d..8ac4e62bf1f4b1ade1bac8cbd6afe90daeadd18a 100644 (file)
@@ -179,7 +179,7 @@ static void sl82c105_dma_start(ide_drive_t *drive)
        struct pci_dev *dev     = to_pci_dev(hwif->dev);
        int reg                 = 0x44 + drive->dn * 4;
 
-       DBG(("%s(drive:%s)\n", __FUNCTION__, drive->name));
+       DBG(("%s(drive:%s)\n", __func__, drive->name));
 
        pci_write_config_word(dev, reg, drive->drive_data >> 16);
 
@@ -203,7 +203,7 @@ static int sl82c105_dma_end(ide_drive_t *drive)
        int reg                 = 0x44 + drive->dn * 4;
        int ret;
 
-       DBG(("%s(drive:%s)\n", __FUNCTION__, drive->name));
+       DBG(("%s(drive:%s)\n", __func__, drive->name));
 
        ret = __ide_dma_end(drive);
 
index 6d62adefd97642bacd38edb55705053c3d5209f2..a82f6efb660b09613d05ea267fef9f9201ea4d4a 100644 (file)
@@ -438,7 +438,7 @@ static void m8xx_ide_set_pio_mode(ide_drive_t *drive, const u8 pio)
 #elif defined(CONFIG_IDE_EXT_DIRECT)
 
        printk("%s[%d] %s: not implemented yet!\n",
-               __FILE__,__LINE__,__FUNCTION__);
+               __FILE__, __LINE__, __func__);
 #endif /* defined(CONFIG_IDE_8xx_PCCARD) || defined(CONFIG_IDE_8xx_PCMCIA */
 }