drivers/ide Convert printk(KERN_<foo> to pr_<foo>(
cover drivers/ide Convert printk(KERN_<foo> to pr_<foo>(
Mostly mechanical conversion of printk's
There is a change in drivers/ide/ide-cd_verbose.c that cleans up a printk with pr_cont to use pr_err
Done via:
for file in $(find drivers/ide/ | grep -E "*\.[ch]$") ; do
sed -i -r -e 's/\bprintk\s*\(\s*KERN_<foo>\s*/pr_<foo>\(/g' $file
done
and emacs indent and verification cleanup
_file=
git diff -U1 |
grep -E "^(\+\+\+|\@\@)" |
sed -e 's/^\+\+\+ b\//f:/g' |
sed -r -e 's/^\@\@ \-([0-9]+).*/l:\1/g' |
while read line ; do
if [ $(echo $line | cut -f1 -d":") = "f" ] ; then
_file=$(echo $line | cut -f2- -d":")
else
echo $_file:$(echo $line | cut -f2- -d":")
fi
done |
while read line ; do
emacs \
+$(echo $line | cut -f2 -d":" | awk '{print($0 + 1)}') \
$(echo $line | cut -f1 -d":") \
-f set-mark-command \
-f c-end-of-statement \
-f c-indent-line-or-region \
-f save-bufferdone
Joe Perches (6):
drivers/ide: Convert printk(KERN_DEBUG to pr_debug( drivers/ide: Convert printk(KERN_INFO to pr_info( drivers/ide: Convert printk(KERN_ERR to pr_err( drivers/ide: Convert printk(KERN_WARNING to pr_warning( drivers/ide: Convert printk(KERN_CONT to pr_cont( drivers/ide: Convert printk(KERN_NOTICE to pr_notice(
drivers/ide/aec62xx.c | 4 +- drivers/ide/ali14xx.c | 12 ++-- drivers/ide/alim15x3.c | 4 +- drivers/ide/amd74xx.c | 12 ++-- drivers/ide/au1xxx-ide.c | 18 +++--- drivers/ide/buddha.c | 3 +- drivers/ide/cmd640.c | 21 +++---- drivers/ide/cs5520.c | 7 +- drivers/ide/cs5530.c | 4 +- drivers/ide/cs5536.c | 4 +- drivers/ide/cy82c693.c | 11 ++-- drivers/ide/delkin_cb.c | 4 +- drivers/ide/dtc2278.c | 2 +- drivers/ide/falconide.c | 6 +- drivers/ide/gayle.c | 6 +- drivers/ide/hpt366.c | 38 ++++++------ drivers/ide/ht6560b.c | 5 +- drivers/ide/ide-4drives.c | 7 +- drivers/ide/ide-acpi.c | 26 ++++----- drivers/ide/ide-atapi.c | 66 ++++++++++----------- drivers/ide/ide-cd.c | 71 ++++++++++------------ drivers/ide/ide-cd_ioctl.c | 3 +- drivers/ide/ide-cd_verbose.c | 66 ++++++++++++--------- drivers/ide/ide-cs.c | 15 ++--- drivers/ide/ide-disk.c | 48 +++++++-------- drivers/ide/ide-dma-sff.c | 8 +- drivers/ide/ide-dma.c | 27 ++++----- drivers/ide/ide-eh.c | 26 ++++---- drivers/ide/ide-floppy.c | 61 +++++++++---------- drivers/ide/ide-floppy_ioctl.c | 2 +- drivers/ide/ide-gd.c | 12 ++-- drivers/ide/ide-generic.c | 16 ++--- drivers/ide/ide-h8300.c | 4 +- drivers/ide/ide-io.c | 15 ++--- drivers/ide/ide-ioctls.c | 4 +- drivers/ide/ide-iops.c | 13 ++-- drivers/ide/ide-legacy.c | 8 +- drivers/ide/ide-lib.c | 68 +++++++++++----------- drivers/ide/ide-pci-generic.c | 4 +- drivers/ide/ide-pm.c | 6 +- drivers/ide/ide-pnp.c | 10 ++-- drivers/ide/ide-probe.c | 97 +++++++++++++++--------------- drivers/ide/ide-proc.c | 15 ++--- drivers/ide/ide-scan-pci.c | 4 +- drivers/ide/ide-tape.c | 126 +++++++++++++++++----------------------- drivers/ide/ide-taskfile.c | 26 ++++----- drivers/ide/ide-xfer-mode.c | 12 ++-- drivers/ide/ide.c | 24 +++----- drivers/ide/it821x.c | 19 +++--- drivers/ide/macide.c | 4 +- drivers/ide/opti621.c | 2 +- drivers/ide/palm_bk3710.c | 12 ++-- drivers/ide/pdc202xx_new.c | 25 ++++---- drivers/ide/pdc202xx_old.c | 21 +++---- drivers/ide/piix.c | 4 +- drivers/ide/pmac.c | 71 +++++++++++----------- drivers/ide/q40ide.c | 2 +- drivers/ide/qd65xx.c | 40 ++++++------ drivers/ide/rz1000.c | 8 +- drivers/ide/scc_pata.c | 20 +++--- drivers/ide/serverworks.c | 4 +- drivers/ide/setup-pci.c | 86 +++++++++++++-------------- drivers/ide/sgiioc4.c | 70 +++++++++------------- drivers/ide/siimage.c | 21 +++---- drivers/ide/sis5513.c | 10 ++-- drivers/ide/sl82c105.c | 10 ++-- drivers/ide/tc86c001.c | 6 +- drivers/ide/trm290.c | 12 ++-- drivers/ide/tx4939ide.c | 4 +- drivers/ide/umc8672.c | 6 +- drivers/ide/via82cxxx.c | 13 ++-- 71 files changed, 722 insertions(+), 799 deletions(-)
PATCH 1/6 drivers/ide: Convert printk(KERN_DEBUG to pr_debug(
--- drivers/ide/ali14xx.c | 8 ++++---- drivers/ide/hpt366.c | 2 +- drivers/ide/ide-acpi.c | 9 ++++----- drivers/ide/ide-cs.c | 2 +- drivers/ide/ide-iops.c | 3 +-- drivers/ide/ide-probe.c | 9 +++++---- drivers/ide/ide-xfer-mode.c | 6 +++--- drivers/ide/pdc202xx_old.c | 6 +++--- drivers/ide/pmac.c | 2 +- drivers/ide/qd65xx.c | 11 +++++------ drivers/ide/serverworks.c | 4 ++-- drivers/ide/sl82c105.c | 6 +++--- 12 files changed, 33 insertions(+), 35 deletions(-)
drivers/ide/ali14xx.c +4 -4
@@ -127,8 +127,8 @@ static void ali14xx_set_pio_mode(ide_drive_t *drive, const u8 pio) param3 +=8 ; param4 +=8 ; } -printk (KERN_DEBUG "%s: PIO mode%d, t1=%dns, t2=%dns, cycles = %d+%d, %d+%d\n" , - drive->name, pio, time1, time2, param1, param2, param3, param4); +pr_debug ("%s: PIO mode%d, t1=%dns, t2=%dns, cycles = %d+%d, %d+%d\n" , + drive->name, pio, time1, time2, param1, param2, param3, param4);/* stuff timing parameters into controller registers */ driveNum = (drive->hwif->index <<1 ) + (drive->dn &1 );
@@ -208,8 +208,8 @@ static const struct ide_port_info ali14xx_port_info = {static int __init ali14xx_probe (void ) { -printk (KERN_DEBUG "ali14xx: base=0x%03x, regOn=0x%02x.\n" , - basePort, regOn); +pr_debug ("ali14xx: base=0x%03x, regOn=0x%02x.\n" , + basePort, regOn);/* initialize controller registers */ if (!initRegisters ()) {
drivers/ide/hpt366.c +1 -1
@@ -805,7 +805,7 @@ static void hpt370_irq_timeout(ide_drive_t *drive)u8 dma_cmd;pci_read_config_word (dev, hwif->select_data +2 , &bfifo); -printk (KERN_DEBUG "%s: %d bytes in FIFO\n" , drive->name, bfifo &0x1ff ); +pr_debug ("%s: %d bytes in FIFO\n" , drive->name, bfifo &0x1ff );/* get DMA command mode */ dma_cmd =inb (hwif->dma_base +ATA_DMA_CMD );
drivers/ide/ide-acpi.c +4 -5
@@ -45,8 +45,8 @@ struct ide_acpi_hwif_link {#undef DEBUGGING/* note: adds function name and KERN_DEBUG */ #ifdef DEBUGGING -#define DEBPRINT(fmt, args...) \ - printk(KERN_DEBUG "%s: " fmt, __func__, ## args) +#define DEBPRINT(fmt, args...) \ + pr_debug("%s: " fmt, __func__, ## args)#else #define DEBPRINT(fmt, args...) do {} while (0)#endif /* DEBUGGING */
@@ -236,9 +236,8 @@ static int do_drive_get_GTF(ide_drive_t *drive, status =acpi_evaluate_object (drive->acpidata->obj_handle,"_GTF" ,NULL , &output);if (ACPI_FAILURE (status)) { -printk (KERN_DEBUG -"%s: Run _GTF error: status = 0x%x\n" , - __func__, status); +pr_debug ("%s: Run _GTF error: status = 0x%x\n" , + __func__, status); goto out; }
drivers/ide/ide-cs.c +1 -1
@@ -64,7 +64,7 @@ MODULE_LICENSE("Dual MPL/GPL");#ifdef CONFIG_PCMCIA_DEBUG INT_MODULE_PARM (pc_debug,0 ); -#define DEBUG(n, args...) if (pc_debug>(n)) printk(KERN_DEBUG args) +#define DEBUG(n, args...) if (pc_debug>(n)) pr_debug(args)#else #define DEBUG(n, args...)#endif
drivers/ide/ide-iops.c +1 -2
@@ -236,8 +236,7 @@ u8 eighty_ninty_three(ide_drive_t *drive)return 1 ;if (ivb) -printk (KERN_DEBUG "%s: skipping word 93 validity check\n" , - drive->name); +pr_debug ("%s: skipping word 93 validity check\n" , drive->name);if (ata_id_is_sata (id) && !ivb)return 1 ;
drivers/ide/ide-probe.c +5 -4
@@ -604,7 +604,7 @@ static int ide_port_wait_ready(ide_hwif_t *hwif)ide_drive_t *drive;int i, rc; -printk (KERN_DEBUG "Probing IDE interface %s...\n" , hwif->name); +pr_debug ("Probing IDE interface %s...\n" , hwif->name);/* Let HW settle down a bit from whatever init state we * come from */
@@ -630,8 +630,8 @@ static int ide_port_wait_ready(ide_hwif_t *hwif)if (rc) goto out; }else -printk (KERN_DEBUG "%s: ide_wait_not_busy() skipped\n" , - drive->name); +pr_debug ("%s: ide_wait_not_busy() skipped\n" , + drive->name); } out:/* Exit function with master reselected (let's be sane) */
@@ -700,7 +700,8 @@ static int ide_probe_port(ide_hwif_t *hwif)disable_irq (hwif->irq);if (ide_port_wait_ready (hwif) == -EBUSY ) -printk (KERN_DEBUG "%s: Wait for ready failed before probe !\n" , hwif->name); +pr_debug ("%s: Wait for ready failed before probe !\n" , + hwif->name);/* * Second drive should only exist if first drive was found,
drivers/ide/ide-xfer-mode.c +3 -3
@@ -183,9 +183,9 @@ void ide_set_pio(ide_drive_t *drive, u8 req_pio)* - report device max PIO mode * - check req_pio != 255 against device max PIO mode */ -printk (KERN_DEBUG "%s: host max PIO%d wanted PIO%d%s selected PIO%d\n" , - drive->name, host_pio, req_pio, - req_pio ==255 ?"(auto-tune)" :"" , pio); +pr_debug ("%s: host max PIO%d wanted PIO%d%s selected PIO%d\n" , + drive->name, host_pio, req_pio, + req_pio ==255 ?"(auto-tune)" :"" , pio); (void )ide_set_pio_mode (drive,XFER_PIO_0 + pio); }
drivers/ide/pdc202xx_old.c +3 -3
@@ -103,9 +103,9 @@ static void pdc202xx_set_mode(ide_drive_t *drive, const u8 speed) }#if PDC202XX_DEBUG_DRIVE_INFO -printk (KERN_DEBUG "%s: %s drive%d 0x%08x " , - drive->name,ide_xfer_verbose (speed), - drive->dn, drive_conf); +pr_debug ("%s: %s drive%d 0x%08x " , + drive->name,ide_xfer_verbose (speed), + drive->dn, drive_conf);pci_read_config_dword (dev, drive_pci, &drive_conf);printk ("0x%08x\n" , drive_conf);#endif
drivers/ide/pmac.c +1 -1
@@ -1508,7 +1508,7 @@ static int pmac_ide_build_dmatable(ide_drive_t *drive, struct ide_cmd *cmd)return 1 ; } -printk (KERN_DEBUG "%s: empty DMA table?\n" , drive->name); +pr_debug ("%s: empty DMA table?\n" , drive->name);return 0 ;/* revert to PIO for this request */ }
drivers/ide/qd65xx.c +5 -6
@@ -163,7 +163,7 @@ static int qd_find_disk_type (ide_drive_t *drive,for (p = qd65xx_timing ; p->offset !=-1 ; p++) {if (!strncmp (p->model, model+p->offset,4 )) { -printk (KERN_DEBUG "%s: listed !\n" , drive->name); +pr_debug ("%s: listed !\n" , drive->name); *active_time = p->active; *recovery_time = p->recovery;return 1 ;
@@ -183,7 +183,7 @@ static void qd_set_timing (ide_drive_t *drive, u8 timing) drive->drive_data &=0xff00 ; drive->drive_data |= timing; -printk (KERN_DEBUG "%s: %#x\n" , drive->name, timing); +pr_debug ("%s: %#x\n" , drive->name, timing); }static void qd6500_set_pio_mode (ide_drive_t *drive,const u8 pio)
@@ -378,8 +378,7 @@ static int __init qd_probe(int base) }printk (KERN_NOTICE "qd6500 at %#x\n" , base); -printk (KERN_DEBUG "qd6500: config=%#x, ID3=%u\n" , - config,QD_ID3 ); +pr_debug ("qd6500: config=%#x, ID3=%u\n" , config,QD_ID3 ); d.port_ops = &qd6500_port_ops; d.host_flags |=IDE_HFLAG_SINGLE ;
@@ -392,8 +391,8 @@ static int __init qd_probe(int base) control =inb (QD_CONTROL_PORT );printk (KERN_NOTICE "qd6580 at %#x\n" , base); -printk (KERN_DEBUG "qd6580: config=%#x, control=%#x, ID3=%u\n" , - config, control,QD_ID3 ); +pr_debug ("qd6580: config=%#x, control=%#x, ID3=%u\n" , + config, control,QD_ID3 );outb (QD_DEF_CONTR ,QD_CONTROL_PORT );
drivers/ide/serverworks.c +2 -2
@@ -191,8 +191,8 @@ static int init_chipset_svwks(struct pci_dev *dev)pci_read_config_dword (isa_dev,0x64 , ®); reg &= ~0x00002000 ;/* disable 600ns interrupt mask */ if (!(reg &0x00004000 )) - printk(KERN_DEBUG DRV_NAME " %s: UDMA not BIOS " -"enabled.\n" ,pci_name (dev)); +pr_debug (DRV_NAME " %s: UDMA not BIOS enabled.\n" , +pci_name (dev)); reg |=0x00004000 ;/* enable UDMA/33 support */ pci_write_config_dword (isa_dev,0x64 , reg); }
drivers/ide/sl82c105.c +3 -3
@@ -89,9 +89,9 @@ static void sl82c105_set_pio_mode(ide_drive_t *drive, const u8 pio)pci_write_config_word (dev, reg, drv_ctrl);pci_read_config_word (dev, reg, &drv_ctrl); -printk (KERN_DEBUG "%s: selected %s (%dns) (%04X)\n" , drive->name, -ide_xfer_verbose (pio +XFER_PIO_0 ), -ide_pio_cycle_time (drive, pio), drv_ctrl); +pr_debug ("%s: selected %s (%dns) (%04X)\n" , drive->name, +ide_xfer_verbose (pio +XFER_PIO_0 ), +ide_pio_cycle_time (drive, pio), drv_ctrl); }/*
Signature · 1 line
1.6.3.1.10.g659a0.dirty
Re: [PATCH 1/6] drivers/ide: Convert printk(KERN_DEBUG to pr_debug(
Hello.
Quoted 1 line · Joe Perches
Signed-off-by Joe Perches <[email protected]>
NAK. This will effectively disable the debugging messages.
drivers/ide/ali14xx.c static void ali14xx_set_pio_mode(ide_drive_t *drive, const u8 pio) · line 132
Quoted 13 lines
drivers/ide/ali14xx.c +2
-2@@ -127,8 +127,8 @@ static void ali14xx_set_pio_mode(ide_drive_t *drive, const u8 pio) param3 +=8 ; param4 +=8 ; } -printk (KERN_DEBUG "%s: PIO mode%d, t1=%dns, t2=%dns, cycles = %d+%d, %d+%d\n" , - drive->name, pio, time1, time2, param1, param2, param3, param4); +pr_debug ("%s: PIO mode%d, t1=%dns, t2=%dns, cycles = %d+%d, %d+%d\n" , + drive->name, pio, time1, time2, param1, param2, param3, param4);
This is not an equivalent conversion. If you look at how pr_debug()
is defined, you'll see that it only prints something if DEBUG is defined.
drivers/ide/ali14xx.c static const struct ide_port_info ali14xx_port_info = { · line 213
Quoted 9 lines
drivers/ide/ali14xx.c +2
-2@@ -208,8 +208,8 @@ static const struct ide_port_info ali14xx_port_info = {static int __init ali14xx_probe (void ) { -printk (KERN_DEBUG "ali14xx: base=0x%03x, regOn=0x%02x.\n" , - basePort, regOn); +pr_debug ("ali14xx: base=0x%03x, regOn=0x%02x.\n" , + basePort, regOn);
Not equivalent.
drivers/ide/hpt366.c static void hpt370_irq_timeout(ide_drive_t *drive) · line 809
Quoted 11 lines
drivers/ide/hpt366.c +1
-1@@ -805,7 +805,7 @@ static void hpt370_irq_timeout(ide_drive_t *drive)u8 dma_cmd;pci_read_config_word (dev, hwif->select_data +2 , &bfifo); -printk (KERN_DEBUG "%s: %d bytes in FIFO\n" , drive->name, bfifo &0x1ff ); +pr_debug ("%s: %d bytes in FIFO\n" , drive->name, bfifo &0x1ff );
Not equivalent.
Quoted 6 lines
drivers/ide/ide-acpi.c +0
-0
drivers/ide/ide-acpi.c struct ide_acpi_hwif_link { · line 52
Quoted 10 lines
drivers/ide/ide-acpi.c +2
-2@@ -45,8 +45,8 @@ struct ide_acpi_hwif_link {#undef DEBUGGING/* note: adds function name and KERN_DEBUG */ #ifdef DEBUGGING -#define DEBPRINT(fmt, args...) \ - printk(KERN_DEBUG "%s: " fmt, __func__, ## args) +#define DEBPRINT(fmt, args...) \ + pr_debug("%s: " fmt, __func__, ## args)#else #define DEBPRINT(fmt, args...) do {} while (0)#endif /* DEBUGGING */
Not equivalent.
drivers/ide/ide-acpi.c static int do_drive_get_GTF(ide_drive_t *drive, · line 243
Quoted 13 lines
drivers/ide/ide-acpi.c +2
-3@@ -236,9 +236,8 @@ static int do_drive_get_GTF(ide_drive_t *drive, status =acpi_evaluate_object (drive->acpidata->obj_handle,"_GTF" ,NULL , &output);if (ACPI_FAILURE (status)) { -printk (KERN_DEBUG -"%s: Run _GTF error: status = 0x%x\n" , - __func__, status); +pr_debug ("%s: Run _GTF error: status = 0x%x\n" , + __func__, status); goto out; }
Not equivalent.
drivers/ide/ide-cs.c MODULE_LICENSE("Dual MPL/GPL"); · line 68
Quoted 11 lines
drivers/ide/ide-cs.c +1
-1@@ -64,7 +64,7 @@ MODULE_LICENSE("Dual MPL/GPL");#ifdef CONFIG_PCMCIA_DEBUG INT_MODULE_PARM (pc_debug,0 ); -#define DEBUG(n, args...) if (pc_debug>(n)) printk(KERN_DEBUG args) +#define DEBUG(n, args...) if (pc_debug>(n)) pr_debug(args)
Not equivalent.
Quoted 19 lines
drivers/ide/ide-iops.c +1
-2@@ -236,8 +236,7 @@ u8 eighty_ninty_three(ide_drive_t *drive)return 1 ;if (ivb) -printk (KERN_DEBUG "%s: skipping word 93 validity check\n" , - drive->name); +pr_debug ("%s: skipping word 93 validity check\n" , drive->name);if (ata_id_is_sata (id) && !ivb)return 1 ;drivers/ide/ide-probe.c +0
-0
drivers/ide/ide-probe.c static int ide_port_wait_ready(ide_hwif_t *hwif) · line 608
Quoted 6 lines
drivers/ide/ide-probe.c +1
-1@@ -604,7 +604,7 @@ static int ide_port_wait_ready(ide_hwif_t *hwif)ide_drive_t *drive;int i, rc; -printk (KERN_DEBUG "Probing IDE interface %s...\n" , hwif->name); +pr_debug ("Probing IDE interface %s...\n" , hwif->name);
Not equivalent.
Quoted 12 lines
drivers/ide/ide-probe.c +2
-2@@ -630,8 +630,8 @@ static int ide_port_wait_ready(ide_hwif_t *hwif)if (rc) goto out; }else -printk (KERN_DEBUG "%s: ide_wait_not_busy() skipped\n" , - drive->name); +pr_debug ("%s: ide_wait_not_busy() skipped\n" , + drive->name); } out:/* Exit function with master reselected (let's be sane) */
drivers/ide/ide-probe.c static int ide_probe_port(ide_hwif_t *hwif) · line 705
Quoted 7 lines
drivers/ide/ide-probe.c +2
-1@@ -700,7 +700,8 @@ static int ide_probe_port(ide_hwif_t *hwif)disable_irq (hwif->irq);if (ide_port_wait_ready (hwif) == -EBUSY ) -printk (KERN_DEBUG "%s: Wait for ready failed before probe !\n" , hwif->name); +pr_debug ("%s: Wait for ready failed before probe !\n" , + hwif->name);
Not equivalent.
Quoted 5 lines
drivers/ide/ide-xfer-mode.c +0
-0
drivers/ide/ide-xfer-mode.c void ide_set_pio(ide_drive_t *drive, u8 req_pio) · line 189
Quoted 10 lines
drivers/ide/ide-xfer-mode.c +3
-3@@ -183,9 +183,9 @@ void ide_set_pio(ide_drive_t *drive, u8 req_pio)* - report device max PIO mode * - check req_pio != 255 against device max PIO mode */ -printk (KERN_DEBUG "%s: host max PIO%d wanted PIO%d%s selected PIO%d\n" , - drive->name, host_pio, req_pio, - req_pio ==255 ?"(auto-tune)" :"" , pio); +pr_debug ("%s: host max PIO%d wanted PIO%d%s selected PIO%d\n" , + drive->name, host_pio, req_pio, + req_pio ==255 ?"(auto-tune)" :"" , pio);
Not equivalent.
Quoted 8 lines
drivers/ide/pdc202xx_old.c +0
-0@@ -103,9 +103,9 @@ static void pdc202xx_set_mode(ide_drive_t *drive, const u8 speed) }
drivers/ide/pdc202xx_old.c static void pdc202xx_set_mode(ide_drive_t *drive, const u8 speed) · line 111
Quoted 10 lines
drivers/ide/pdc202xx_old.c +3
-3#if PDC202XX_DEBUG_DRIVE_INFO -printk (KERN_DEBUG "%s: %s drive%d 0x%08x " , - drive->name,ide_xfer_verbose (speed), - drive->dn, drive_conf); +pr_debug ("%s: %s drive%d 0x%08x " , + drive->name,ide_xfer_verbose (speed), + drive->dn, drive_conf);pci_read_config_dword (dev, drive_pci, &drive_conf);printk ("0x%08x\n" , drive_conf);#endif
Not equivalent.
Quoted 33 lines
drivers/ide/qd65xx.c +3
-4@@ -163,7 +163,7 @@ static int qd_find_disk_type (ide_drive_t *drive,for (p = qd65xx_timing ; p->offset !=-1 ; p++) {if (!strncmp (p->model, model+p->offset,4 )) { -printk (KERN_DEBUG "%s: listed !\n" , drive->name); +pr_debug ("%s: listed !\n" , drive->name); *active_time = p->active; *recovery_time = p->recovery;return 1 ;@@ -183,7 +183,7 @@ static void qd_set_timing (ide_drive_t *drive, u8 timing) drive->drive_data &=0xff00 ; drive->drive_data |= timing; -printk (KERN_DEBUG "%s: %#x\n" , drive->name, timing); +pr_debug ("%s: %#x\n" , drive->name, timing); }static void qd6500_set_pio_mode (ide_drive_t *drive,const u8 pio)@@ -378,8 +378,7 @@ static int __init qd_probe(int base) }printk (KERN_NOTICE "qd6500 at %#x\n" , base); -printk (KERN_DEBUG "qd6500: config=%#x, ID3=%u\n" , - config,QD_ID3 ); +pr_debug ("qd6500: config=%#x, ID3=%u\n" , config,QD_ID3 ); d.port_ops = &qd6500_port_ops; d.host_flags |=IDE_HFLAG_SINGLE ;
drivers/ide/qd65xx.c static int __init qd_probe(int base) · line 396
Quoted 8 lines
drivers/ide/qd65xx.c +2
-2@@ -392,8 +391,8 @@ static int __init qd_probe(int base) control =inb (QD_CONTROL_PORT );printk (KERN_NOTICE "qd6580 at %#x\n" , base); -printk (KERN_DEBUG "qd6580: config=%#x, control=%#x, ID3=%u\n" , - config, control,QD_ID3 ); +pr_debug ("qd6580: config=%#x, control=%#x, ID3=%u\n" , + config, control,QD_ID3 );
Not equivalent.
drivers/ide/serverworks.c static int init_chipset_svwks(struct pci_dev *dev) · line 196
Quoted 13 lines
drivers/ide/serverworks.c +2
-2@@ -191,8 +191,8 @@ static int init_chipset_svwks(struct pci_dev *dev)pci_read_config_dword (isa_dev,0x64 , ®); reg &= ~0x00002000 ;/* disable 600ns interrupt mask */ if (!(reg &0x00004000 )) - printk(KERN_DEBUG DRV_NAME " %s: UDMA not BIOS " -"enabled.\n" ,pci_name (dev)); +pr_debug (DRV_NAME " %s: UDMA not BIOS enabled.\n" , +pci_name (dev));
Not equivalent.
Quoted 5 lines
drivers/ide/sl82c105.c +0
-0
drivers/ide/sl82c105.c static void sl82c105_set_pio_mode(ide_drive_t *drive, const u8 pio) · line 95
Quoted 10 lines
drivers/ide/sl82c105.c +3
-3@@ -89,9 +89,9 @@ static void sl82c105_set_pio_mode(ide_drive_t *drive, const u8 pio)pci_write_config_word (dev, reg, drv_ctrl);pci_read_config_word (dev, reg, &drv_ctrl); -printk (KERN_DEBUG "%s: selected %s (%dns) (%04X)\n" , drive->name, -ide_xfer_verbose (pio +XFER_PIO_0 ), -ide_pio_cycle_time (drive, pio), drv_ctrl); +pr_debug ("%s: selected %s (%dns) (%04X)\n" , drive->name, +ide_xfer_verbose (pio +XFER_PIO_0 ), +ide_pio_cycle_time (drive, pio), drv_ctrl);
Not equivalent.
I have an impression that you've missed all the places that really
need to be converted and only converted those that don't. :-/
MBR, Sergei
PATCH 2/6 drivers/ide: Convert printk(KERN_INFO to pr_info(
In reply to Joe Perches--- drivers/ide/aec62xx.c | 4 ++-- drivers/ide/alim15x3.c | 4 ++-- drivers/ide/amd74xx.c | 2 +- drivers/ide/au1xxx-ide.c | 2 +- drivers/ide/buddha.c | 3 +-- drivers/ide/cmd640.c | 12 ++++++------ drivers/ide/cs5536.c | 2 +- drivers/ide/cy82c693.c | 6 +++--- drivers/ide/falconide.c | 2 +- drivers/ide/gayle.c | 6 +++--- drivers/ide/hpt366.c | 20 ++++++++++---------- drivers/ide/ide-atapi.c | 5 ++--- drivers/ide/ide-cd.c | 4 ++-- drivers/ide/ide-cs.c | 4 ++-- drivers/ide/ide-disk.c | 33 ++++++++++++++++----------------- drivers/ide/ide-dma.c | 6 +++--- drivers/ide/ide-eh.c | 4 ++-- drivers/ide/ide-floppy.c | 15 +++++++-------- drivers/ide/ide-gd.c | 4 ++-- drivers/ide/ide-generic.c | 6 +++--- drivers/ide/ide-h8300.c | 2 +- drivers/ide/ide-pci-generic.c | 4 ++-- drivers/ide/ide-pm.c | 2 +- drivers/ide/ide-pnp.c | 2 +- drivers/ide/ide-probe.c | 30 +++++++++++++++--------------- drivers/ide/ide-tape.c | 30 +++++++++++++----------------- drivers/ide/ide-xfer-mode.c | 6 +++--- drivers/ide/ide.c | 22 +++++++++------------- drivers/ide/it821x.c | 9 ++++----- drivers/ide/macide.c | 4 ++-- drivers/ide/opti621.c | 2 +- drivers/ide/palm_bk3710.c | 2 +- drivers/ide/pdc202xx_new.c | 10 +++++----- drivers/ide/pdc202xx_old.c | 11 +++++------ drivers/ide/pmac.c | 8 ++++---- drivers/ide/q40ide.c | 2 +- drivers/ide/qd65xx.c | 6 +++--- drivers/ide/rz1000.c | 8 ++++---- drivers/ide/scc_pata.c | 3 +-- drivers/ide/setup-pci.c | 32 ++++++++++++++++---------------- drivers/ide/sgiioc4.c | 8 ++++---- drivers/ide/siimage.c | 8 ++++---- drivers/ide/sis5513.c | 10 +++++----- drivers/ide/sl82c105.c | 4 ++-- drivers/ide/trm290.c | 10 +++++----- drivers/ide/via82cxxx.c | 2 +- 46 files changed, 183 insertions(+), 198 deletions(-)
drivers/ide/aec62xx.c +2 -2
@@ -273,8 +273,8 @@ static int __devinit aec62xx_init_one(struct pci_dev *dev, const struct pci_deviunsigned long dma_base =pci_resource_start (dev,4 );if (inb (dma_base +2 ) &0x10 ) { - printk(KERN_INFO DRV_NAME " %s: AEC6880%s card detected" - "\n", pci_name(dev), (idx == 4) ? "R" : ""); +pr_info (DRV_NAME " %s: AEC6880%s card detected\n" , +pci_name (dev), (idx ==4 ) ?"R" :"" ); d.udma_mask =ATA_UDMA6 ; } }
drivers/ide/alim15x3.c +2 -2
@@ -485,8 +485,8 @@ static int __devinit init_dma_ali15x3(ide_hwif_t *hwif,if (!hwif->channel)outb (inb (base +2 ) &0x60 , base +2 ); -printk (KERN_INFO " %s: BM-DMA at 0x%04lx-0x%04lx\n" , - hwif->name, base, base +7 ); +pr_info (" %s: BM-DMA at 0x%04lx-0x%04lx\n" , + hwif->name, base, base +7 );if (ide_allocate_dma_engine (hwif))return -1 ;
drivers/ide/amd74xx.c +1 -1
@@ -262,7 +262,7 @@ static int __devinit amd74xx_probe(struct pci_dev *dev, const struct pci_device_ ide_pci_is_in_compatibility_mode(dev)) d.host_flags |= IDE_HFLAG_BROKEN_ALTSTATUS; -printk (KERN_INFO "%s %s: UDMA%s controller\n" , +pr_info ("%s %s: UDMA%s controller\n" , d.name,pci_name (dev), amd_dma[fls (d.udma_mask) -1 ]);/*
drivers/ide/au1xxx-ide.c +1 -1
@@ -558,7 +558,7 @@ static int au_ide_probe(struct platform_device *dev)platform_set_drvdata (dev, host); -printk (KERN_INFO "Au1xxx IDE(builtin) configured for %s\n" , mode ); +pr_info ("Au1xxx IDE(builtin) configured for %s\n" , mode); out:return ret;
drivers/ide/buddha.c +1 -2
@@ -199,8 +199,7 @@ fail_base2:if (type !=BOARD_XSURF )z_writeb (0 , buddha_board+BUDDHA_IRQ_MR ); -printk (KERN_INFO "ide: %s IDE controller\n" , - buddha_board_name[type]); +pr_info ("ide: %s IDE controller\n" , buddha_board_name[type]);for (i =0 ; i < buddha_num_hwifs; i++) {unsigned long base, ctl, irq_port;
drivers/ide/cmd640.c +6 -6
@@ -618,13 +618,13 @@ static void cmd640_init_dev(ide_drive_t *drive) recovery_counts[i] =16 ;/* max possible */ program_drive_counts (drive, i);set_prefetch_mode (drive, i,0 ); - printk(KERN_INFO DRV_NAME ": drive%d timings/prefetch cleared\n", i); +pr_info (DRV_NAME ": drive%d timings/prefetch cleared\n" , i);#else /* * Set the drive unmask flags to match the prefetch setting. */ check_prefetch (drive, i); - printk(KERN_INFO DRV_NAME ": drive%d timings/prefetch(%s) preserved\n", +pr_info (DRV_NAME ": drive%d timings/prefetch(%s) preserved\n" , i, (drive->dev_flags &IDE_DFLAG_NO_IO_32BIT ) ?"off" :"on" );#endif /* CONFIG_BLK_DEV_CMD640_ENHANCED */ }
@@ -768,8 +768,8 @@ static int __init cmd640x_init(void) hw[1 ].irq =15 ; hw[1 ].chipset = ide_cmd640; -printk (KERN_INFO "cmd640: buggy cmd640%c interface on %s, config=0x%02x" -"\n" ,'a' + cmd640_chip_version -1 , bus_type, cfr); +pr_info ("cmd640: buggy cmd640%c interface on %s, config=0x%02x\n" , +'a' + cmd640_chip_version -1 , bus_type, cfr);/* * Initialize data for primary port
@@ -817,8 +817,8 @@ static int __init cmd640x_init(void)if (second_port_cmd640) hws[1 ] = &hw[1 ]; -printk (KERN_INFO "cmd640: %sserialized, secondary interface %s\n" , - second_port_cmd640 ?"" :"not " , port2); +pr_info ("cmd640: %sserialized, secondary interface %s\n" , + second_port_cmd640 ?"" :"not " , port2);#ifdef CMD640_DUMP_REGS cmd640_dump_regs ();
drivers/ide/cs5536.c +1 -1
@@ -260,7 +260,7 @@ static int cs5536_init_one(struct pci_dev *dev, const struct pci_device_id *id)u32 cfg;if (use_msr) - printk(KERN_INFO DRV_NAME ": Using MSR regs instead of PCI\n"); +pr_info (DRV_NAME ": Using MSR regs instead of PCI\n" );cs5536_read (dev,CFG , &cfg);
drivers/ide/cy82c693.c +3 -3
@@ -177,7 +177,7 @@ static void cy82c693_set_dma_mode(ide_drive_t *drive, const u8 mode)outb (data,CY82_DATA_PORT );#if CY82C693_DEBUG_INFO -printk (KERN_INFO "%s (ch=%d, dev=%d): set DMA mode to %d (single=%d)\n" , +pr_info ("%s (ch=%d, dev=%d): set DMA mode to %d (single=%d)\n" , drive->name, hwif->channel, drive->dn &1 , mode &3 , single);#endif /* CY82C693_DEBUG_INFO */
@@ -196,7 +196,7 @@ static void cy82c693_set_dma_mode(ide_drive_t *drive, const u8 mode)outb (data,CY82_DATA_PORT );#if CY82C693_DEBUG_INFO -printk (KERN_INFO "%s: Set IDE Bus Master TimeOut Register to 0x%X\n" , +pr_info ("%s: Set IDE Bus Master TimeOut Register to 0x%X\n" , drive->name, data);#endif /* CY82C693_DEBUG_INFO */ }
@@ -263,7 +263,7 @@ static void cy82c693_set_pio_mode(ide_drive_t *drive, const u8 pio) }#if CY82C693_DEBUG_INFO -printk (KERN_INFO "%s (ch=%d, dev=%d): set PIO timing to " +pr_info ("%s (ch=%d, dev=%d): set PIO timing to " "(addr=0x%X, ior=0x%X, iow=0x%X, 8bit=0x%X)\n" , drive->name, hwif->channel, drive->dn &1 , addrCtrl, pclk.time_16r, pclk.time_16w, pclk.time_8);
drivers/ide/falconide.c +1 -1
@@ -145,7 +145,7 @@ static int __init falconide_init(void)if (!MACH_IS_ATARI || !ATARIHW_PRESENT (IDE ))return -ENODEV ; -printk (KERN_INFO "ide: Falcon IDE controller\n" ); +pr_info ("ide: Falcon IDE controller\n" );if (!request_mem_region (ATA_HD_BASE ,0x40 ,DRV_NAME )) {printk (KERN_ERR "%s: resources busy\n" ,DRV_NAME );
drivers/ide/gayle.c +3 -3
@@ -142,9 +142,9 @@ static int __init gayle_init(void)return -ENODEV ; found: -printk (KERN_INFO "ide: Gayle IDE controller (A%d style%s)\n" , - a4000 ?4000 :1200 , - ide_doubler ?", IDE doubler" :"" ); +pr_info ("ide: Gayle IDE controller (A%d style%s)\n" , + a4000 ?4000 :1200 , + ide_doubler ?", IDE doubler" :"" );if (a4000) { phys_base =GAYLE_BASE_4000 ;
drivers/ide/hpt366.c +10 -10
@@ -1093,7 +1093,7 @@ static int init_chipset_hpt366(struct pci_dev *dev)else pci_clk =66 ; -printk (KERN_INFO "%s %s: DPLL base: %d MHz, f_CNT: %d, " +pr_info ("%s %s: DPLL base: %d MHz, f_CNT: %d, " "assuming %d MHz PCI\n" , name,pci_name (dev), dpll_clk, f_cnt, pci_clk); }else {
@@ -1193,13 +1193,13 @@ static int init_chipset_hpt366(struct pci_dev *dev)return -EIO ; } -printk (KERN_INFO "%s %s: using %d MHz DPLL clock\n" , +pr_info ("%s %s: using %d MHz DPLL clock\n" , name,pci_name (dev), dpll_clk); }else {/* Mark the fact that we're not using the DPLL. */ dpll_clk =0 ; -printk (KERN_INFO "%s %s: using %d MHz PCI clock\n" , +pr_info ("%s %s: using %d MHz PCI clock\n" , name,pci_name (dev), pci_clk); }
@@ -1337,8 +1337,8 @@ static int __devinit init_dma_hpt366(ide_hwif_t *hwif,local_irq_restore (flags); -printk (KERN_INFO " %s: BM-DMA at 0x%04lx-0x%04lx\n" , - hwif->name, base, base +7 ); +pr_info (" %s: BM-DMA at 0x%04lx-0x%04lx\n" , + hwif->name, base, base +7 ); hwif->extra_base = base + (hwif->channel ?8 :16 );
@@ -1353,8 +1353,8 @@ static void __devinit hpt374_init(struct pci_dev *dev, struct pci_dev *dev2)if (dev2->irq != dev->irq) {/* FIXME: we need a core pci_set_interrupt() */ dev2->irq = dev->irq; - printk(KERN_INFO DRV_NAME " %s: PCI config space interrupt " - "fixed\n", pci_name(dev2)); +pr_info (DRV_NAME " %s: PCI config space interrupt fixed\n" , +pci_name (dev2)); } }
@@ -1389,8 +1389,8 @@ static int __devinit hpt36x_init(struct pci_dev *dev, struct pci_dev *dev2)pci_read_config_byte (dev2,PCI_INTERRUPT_PIN , &pin2);if (pin1 != pin2 && dev->irq == dev2->irq) { - printk(KERN_INFO DRV_NAME " %s: onboard version of chipset, " - "pin1=%d pin2=%d\n", pci_name(dev), pin1, pin2); +pr_info (DRV_NAME " %s: onboard version of chipset, pin1=%d pin2=%d\n" , +pci_name (dev), pin1, pin2);return 1 ; }
@@ -1531,7 +1531,7 @@ static int __devinit hpt366_init_one(struct pci_dev *dev, const struct pci_devicbreak ; } - printk(KERN_INFO DRV_NAME ": %s chipset detected\n", info->chip_name); +pr_info (DRV_NAME ": %s chipset detected\n" , info->chip_name); d = hpt366_chipsets[min_t (u8, idx,1 )];
drivers/ide/ide-atapi.c +2 -3
@@ -12,7 +12,7 @@#ifdef DEBUG #define debug_log(fmt, args...) \ - printk(KERN_INFO "ide: " fmt, ## args) + pr_info("ide: " fmt, ## args)#else #define debug_log(fmt, args...) do {} while (0)#endif
@@ -231,8 +231,7 @@ int ide_cd_expiry(ide_drive_t *drive)break ;default :if (!(rq->cmd_flags &REQ_QUIET )) -printk (KERN_INFO "cmd 0x%x timed out\n" , - rq->cmd[0 ]); +pr_info ("cmd 0x%x timed out\n" , rq->cmd[0 ]); wait =0 ;break ; }
drivers/ide/ide-cd.c +2 -2
@@ -1362,7 +1362,7 @@ static int ide_cdrom_probe_capabilities(ide_drive_t *drive)ide_cdrom_update_speed (drive, buf); - printk(KERN_INFO PFX "%s: ATAPI", drive->name); +pr_info (PFX "%s: ATAPI" , drive->name);/* don't print speed if the drive reported 0 */ if (cd->max_speed)
@@ -1858,7 +1858,7 @@ static void __exit ide_cdrom_exit(void)static int __init ide_cdrom_init (void ) { - printk(KERN_INFO DRV_NAME " driver " IDECD_VERSION "\n"); +pr_info (DRV_NAME " driver " IDECD_VERSION "\n" );return driver_register (&ide_cdrom_driver.gen_driver); }
drivers/ide/ide-cs.c +2 -2
@@ -332,8 +332,8 @@ static int ide_config(struct pcmcia_device *link) info->node.minor =0 ; info->host = host; link->dev_node = &info->node; -printk (KERN_INFO "ide-cs: %s: Vpp = %d.%d\n" , - info->node.dev_name, link->conf.Vpp /10 , link->conf.Vpp %10 ); +pr_info ("ide-cs: %s: Vpp = %d.%d\n" , + info->node.dev_name, link->conf.Vpp /10 , link->conf.Vpp %10 );kfree (stk);return 0 ;
drivers/ide/ide-disk.c +16 -17
@@ -323,19 +323,18 @@ static void idedisk_check_hpa(ide_drive_t *drive)if (set_max <= capacity)return ; -printk (KERN_INFO "%s: Host Protected Area detected.\n" -"\tcurrent capacity is %llu sectors (%llu MB)\n" -"\tnative capacity is %llu sectors (%llu MB)\n" , - drive->name, - capacity,sectors_to_MB (capacity), - set_max,sectors_to_MB (set_max)); +pr_info ("%s: Host Protected Area detected.\n" +"\tcurrent capacity is %llu sectors (%llu MB)\n" +"\tnative capacity is %llu sectors (%llu MB)\n" , + drive->name, + capacity,sectors_to_MB (capacity), + set_max,sectors_to_MB (set_max)); set_max =idedisk_set_max_address (drive, set_max, lba48);if (set_max) { drive->capacity64 = set_max; -printk (KERN_INFO "%s: Host Protected Area disabled.\n" , - drive->name); +pr_info ("%s: Host Protected Area disabled.\n" , drive->name); } }
@@ -382,9 +381,9 @@ static int ide_disk_get_capacity(ide_drive_t *drive)if ((drive->hwif->host_flags &IDE_HFLAG_NO_LBA48_DMA ) && (drive->dev_flags &IDE_DFLAG_LBA48 )) {if (drive->capacity64 >1ULL <<28 ) { -printk (KERN_INFO "%s: cannot use LBA48 DMA - PIO mode" -" will be used for accessing sectors " -"> %u\n" , drive->name,1 <<28 ); +pr_info ("%s: cannot use LBA48 DMA - PIO mode" +" will be used for accessing sectors > %u\n" , + drive->name,1 <<28 ); }else drive->dev_flags &= ~IDE_DFLAG_LBA48 ; }
@@ -498,8 +497,8 @@ static void update_ordered(ide_drive_t *drive) capacity <= (1ULL <<28 ) || ata_id_flush_ext_enabled(id)); -printk (KERN_INFO "%s: cache flushes %ssupported\n" , - drive->name, barrier ?"" :"not " ); +pr_info ("%s: cache flushes %ssupported\n" , + drive->name, barrier ?"" :"not " );if (barrier) { ordered =QUEUE_ORDERED_DRAIN_FLUSH ;
@@ -639,7 +638,7 @@ static void ide_disk_setup(ide_drive_t *drive)blk_queue_max_sectors (q, max_s); } -printk (KERN_INFO "%s: max request size: %dKiB\n" , drive->name, +pr_info ("%s: max request size: %dKiB\n" , drive->name, q->max_sectors /2 );if (ata_id_is_ssd (id))
@@ -677,8 +676,8 @@ static void ide_disk_setup(ide_drive_t *drive) } } } -printk (KERN_INFO "%s: %llu sectors (%llu MB)" , - drive->name, capacity,sectors_to_MB (capacity)); +pr_info ("%s: %llu sectors (%llu MB)" , + drive->name, capacity,sectors_to_MB (capacity));/* Only print cache size when it was specified */ if (id[ATA_ID_BUF_SIZE ])
@@ -709,7 +708,7 @@ static void ide_disk_flush(ide_drive_t *drive)return ;if (do_idedisk_flushcache (drive)) -printk (KERN_INFO "%s: wcache flush failed!\n" , drive->name); +pr_info ("%s: wcache flush failed!\n" , drive->name); }static int ide_disk_init_media (ide_drive_t *drive,struct gendisk *disk)
drivers/ide/ide-dma.c +3 -3
@@ -194,7 +194,7 @@ EXPORT_SYMBOL(ide_dma_off_quietly);void ide_dma_off (ide_drive_t *drive) { -printk (KERN_INFO "%s: DMA disabled\n" , drive->name); +pr_info ("%s: DMA disabled\n" , drive->name);ide_dma_off_quietly (drive); }EXPORT_SYMBOL (ide_dma_off);
@@ -342,8 +342,8 @@ u8 ide_find_dma_mode(ide_drive_t *drive, u8 req_mode) mode =min (mode, req_mode); -printk (KERN_INFO "%s: %s mode selected\n" , drive->name, - mode ?ide_xfer_verbose (mode) :"no DMA" ); +pr_info ("%s: %s mode selected\n" , drive->name, + mode ?ide_xfer_verbose (mode) :"no DMA" );return mode; }
drivers/ide/ide-eh.c +2 -2
@@ -173,7 +173,7 @@ static ide_startstop_t atapi_reset_pollfunc(ide_drive_t *drive) stat = tp_ops->read_status (hwif);if (OK_STAT (stat,0 ,ATA_BUSY )) -printk (KERN_INFO "%s: ATAPI reset complete\n" , drive->name); +pr_info ("%s: ATAPI reset complete\n" , drive->name);else {if (time_before (jiffies, hwif->poll_timeout)) {ide_set_handler (drive, &atapi_reset_pollfunc,HZ /20 );
@@ -250,7 +250,7 @@ static ide_startstop_t reset_pollfunc(ide_drive_t *drive) tmp =ide_read_error (drive);if (tmp ==1 ) { -printk (KERN_INFO "%s: reset: success\n" , hwif->name); +pr_info ("%s: reset: success\n" , hwif->name); drive->failures =0 ; }else {ide_reset_report_error (hwif, tmp);
drivers/ide/ide-floppy.c +7 -8
@@ -338,10 +338,10 @@ static int ide_floppy_get_flexible_disk_page(ide_drive_t *drive, capacity = cyls * heads * sectors * sector_size;if (memcmp (page, &floppy->flexible_disk_page,32 )) - printk(KERN_INFO PFX "%s: %dkB, %d/%d/%d CHS, %d kBps, " -"%d sector size, %d rpm\n" , - drive->name, capacity /1024 , cyls, heads, - sectors, transfer_rate /8 , sector_size, rpm); +pr_info (PFX "%s: %dkB, %d/%d/%d CHS, %d kBps, " +"%d sector size, %d rpm\n" , + drive->name, capacity /1024 , cyls, heads, + sectors, transfer_rate /8 , sector_size, rpm);memcpy (&floppy->flexible_disk_page, page,32 ); drive->bios_cyl = cyls;
@@ -423,10 +423,9 @@ static int ide_floppy_get_capacity(ide_drive_t *drive)case CAPACITY_CURRENT :/* Normal Zip/LS-120 disks */ if (memcmp (cap_desc, &floppy->cap_desc,8 )) - printk(KERN_INFO PFX "%s: %dkB, %d blocks, %d " -"sector size\n" , - drive->name, blocks * length /1024 , - blocks, length); +pr_info (PFX "%s: %dkB, %d blocks, %d sector size\n" , + drive->name, blocks * length /1024 , + blocks, length);memcpy (&floppy->cap_desc, cap_desc,8 );if (!length || length %512 ) {
drivers/ide/ide-gd.c +2 -2
@@ -136,7 +136,7 @@ static void ide_gd_shutdown(ide_drive_t *drive)return ; } -printk (KERN_INFO "Shutdown: %s\n" , drive->name); +pr_info ("Shutdown: %s\n" , drive->name); drive->gendev.bus->suspend (&drive->gendev,PMSG_SUSPEND ); }
@@ -398,7 +398,7 @@ failed:static int __init ide_gd_init (void ) { - printk(KERN_INFO DRV_NAME " driver " IDE_GD_VERSION "\n"); +pr_info (DRV_NAME " driver " IDE_GD_VERSION "\n" );return driver_register (&ide_gd_driver.gen_driver); }
drivers/ide/ide-generic.c +3 -3
@@ -92,8 +92,8 @@ static int __init ide_generic_init(void)ide_generic_check_pci_legacy_iobases (&primary, &secondary);if (!probe_mask) { - printk(KERN_INFO DRV_NAME ": please use \"probe_mask=0x3f\" " - "module parameter for probing all legacy ISA IDE ports\n"); +pr_info (DRV_NAME ": please use \"probe_mask=0x3f\" " +"module parameter for probing all legacy ISA IDE ports\n" );if (primary ==0 ) probe_mask |=0x1 ;
@@ -101,7 +101,7 @@ static int __init ide_generic_init(void)if (secondary ==0 ) probe_mask |=0x2 ; }else - printk(KERN_INFO DRV_NAME ": enforcing probing of I/O ports " +pr_info (DRV_NAME ": enforcing probing of I/O ports " "upon user request\n" );for (i =0 ; i <ARRAY_SIZE (legacy_bases); i++) {
drivers/ide/ide-h8300.c +1 -1
@@ -85,7 +85,7 @@ static int __init h8300_ide_init(void) {hw_regs_t hw, *hws[] = { &hw,NULL ,NULL ,NULL }; - printk(KERN_INFO DRV_NAME ": H8/300 generic IDE interface\n"); +pr_info (DRV_NAME ": H8/300 generic IDE interface\n" );if (!request_region (CONFIG_H8300_IDE_BASE ,H8300_IDE_GAP *8 ,"ide-h8300" )) goto out_busy;
drivers/ide/ide-pci-generic.c +2 -2
@@ -128,8 +128,8 @@ static int __devinit generic_init_one(struct pci_dev *dev, const struct pci_deviu16 command;pci_read_config_word (dev,PCI_COMMAND , &command);if (!(command &PCI_COMMAND_IO )) { -printk (KERN_INFO "%s %s: skipping disabled " -"controller\n" , d->name,pci_name (dev)); +pr_info ("%s %s: skipping disabled controller\n" , + d->name,pci_name (dev)); goto out; } }
drivers/ide/ide-pm.c +1 -1
@@ -80,7 +80,7 @@ void ide_complete_power_step(ide_drive_t *drive, struct request *rq)struct request_pm_state *pm = rq->data;#ifdef DEBUG_PM -printk (KERN_INFO "%s: complete_power_step(step: %d)\n" , +pr_info ("%s: complete_power_step(step: %d)\n" , drive->name, pm->pm_step);#endif if (drive->media != ide_disk)
drivers/ide/ide-pnp.c +1 -1
@@ -38,7 +38,7 @@ static int idepnp_probe(struct pnp_dev *dev, const struct pnp_device_id *dev_id)int rc;hw_regs_t hw, *hws[] = { &hw,NULL ,NULL ,NULL }; - printk(KERN_INFO DRV_NAME ": generic PnP IDE interface\n"); +pr_info (DRV_NAME ": generic PnP IDE interface\n" );if (!(pnp_port_valid (dev,0 ) &&pnp_port_valid (dev,1 ) &&pnp_irq_valid (dev,0 )))return -1 ;
drivers/ide/ide-probe.c +15 -15
@@ -116,7 +116,7 @@ static void ide_classify_ata_dev(ide_drive_t *drive)if (!ata_id_has_unload (drive->id)) drive->dev_flags |=IDE_DFLAG_NO_UNLOAD ; -printk (KERN_INFO "%s: %s, %s DISK drive\n" , drive->name, m, +pr_info ("%s: %s, %s DISK drive\n" , drive->name, m, is_cfa ?"CFA" :"ATA" ); }
@@ -126,7 +126,7 @@ static void ide_classify_atapi_dev(ide_drive_t *drive)char *m = (char *)&id[ATA_ID_PROD ];u8 type = (id[ATA_ID_CONFIG ] >>8 ) &0x1f ; -printk (KERN_INFO "%s: %s, ATAPI " , drive->name, m); +pr_info ("%s: %s, ATAPI " , drive->name, m);switch (type) {case ide_floppy:if (!strstr (m,"CD-ROM" )) {
@@ -203,7 +203,7 @@ static void do_identify(ide_drive_t *drive, u8 cmd, u16 *id) drive->dev_flags |=IDE_DFLAG_ID_READ ;#ifdef DEBUG -printk (KERN_INFO "%s: dumping identify data\n" , drive->name); +pr_info ("%s: dumping identify data\n" , drive->name);ide_dump_identify ((u8 *)id);#endif ide_fix_driveid (id);
@@ -271,9 +271,9 @@ int ide_dev_read_id(ide_drive_t *drive, u8 cmd, u16 *id) s = tp_ops->read_status (hwif);if ((a ^ s) & ~ATA_IDX )/* ancient Seagate drives, broken interfaces */ -printk (KERN_INFO "%s: probing with STATUS(0x%02x) " -"instead of ALTSTATUS(0x%02x)\n" , - drive->name, s, a); +pr_info ("%s: probing with STATUS(0x%02x) " +"instead of ALTSTATUS(0x%02x)\n" , + drive->name, s, a);else /* use non-intrusive polling */ use_altstatus =1 ;
@@ -376,7 +376,7 @@ static int do_probe (ide_drive_t *drive, u8 cmd)return 4 ;#ifdef DEBUG -printk (KERN_INFO "probing for %s: present=%d, media=%d, probetype=%s\n" , +pr_info ("probing for %s: present=%d, media=%d, probetype=%s\n" , drive->name, present, drive->media, (cmd ==ATA_CMD_ID_ATA ) ?"ATA" :"ATAPI" );#endif
@@ -499,11 +499,11 @@ static u8 probe_for_drive(ide_drive_t *drive)/* identification failed? */ if ((drive->dev_flags &IDE_DFLAG_ID_READ ) ==0 ) {if (drive->media == ide_disk) { -printk (KERN_INFO "%s: non-IDE drive, CHS=%d/%d/%d\n" , +pr_info ("%s: non-IDE drive, CHS=%d/%d/%d\n" , drive->name, drive->cyl, drive->head, drive->sect); }else if (drive->media == ide_cdrom) { -printk (KERN_INFO "%s: ATAPI cdrom (?)\n" , drive->name); +pr_info ("%s: ATAPI cdrom (?)\n" , drive->name); }else {/* nuke it */ printk (KERN_WARNING "%s: Unknown device on bus refused identification. Ignoring.\n" , drive->name);
@@ -848,11 +848,11 @@ static int init_irq (ide_hwif_t *hwif) goto out_up;#if !defined(__mc68000__) -printk (KERN_INFO "%s at 0x%03lx-0x%03lx,0x%03lx on irq %d" , hwif->name, +pr_info ("%s at 0x%03lx-0x%03lx,0x%03lx on irq %d" , hwif->name, io_ports->data_addr, io_ports->status_addr, io_ports->ctl_addr, hwif->irq);#else -printk (KERN_INFO "%s at 0x%08lx on irq %d" , hwif->name, +pr_info ("%s at 0x%08lx on irq %d" , hwif->name, io_ports->data_addr, hwif->irq);#endif /* __mc68000__ */ if (hwif->host->host_flags &IDE_HFLAG_SERIALIZE )
@@ -1072,7 +1072,7 @@ static void ide_init_port(ide_hwif_t *hwif, unsigned int port, rc =ide_hwif_setup_dma (hwif, d);if (rc <0 ) { -printk (KERN_INFO "%s: DMA disabled\n" , hwif->name); +pr_info ("%s: DMA disabled\n" , hwif->name); hwif->dma_ops =NULL ; hwif->dma_base =0 ;
@@ -1329,7 +1329,7 @@ static void ide_disable_port(ide_hwif_t *hwif)struct ide_host *host = hwif->host;int i; -printk (KERN_INFO "%s: disabling port\n" , hwif->name); +pr_info ("%s: disabling port\n" , hwif->name);for (i =0 ; i <MAX_HOST_PORTS ; i++) {if (host->ports[i] == hwif) {
@@ -1392,8 +1392,8 @@ int ide_host_register(struct ide_host *host, const struct ide_port_info *d,continue ;if (hwif_init (hwif) ==0 ) { -printk (KERN_INFO "%s: failed to initialize IDE " -"interface\n" , hwif->name); +pr_info ("%s: failed to initialize IDE interface\n" , + hwif->name);device_unregister (&hwif->gendev);ide_disable_port (hwif);continue ;
drivers/ide/ide-tape.c +13 -17
@@ -65,7 +65,7 @@ enum { #define debug_log(lvl, fmt, args...) \ { \ if (tape->debug_mask & lvl) \ - printk(KERN_INFO "ide-tape: " fmt, ## args); \ + pr_info("ide-tape: " fmt, ## args); \ }#else #define debug_log(lvl, fmt, args...) do {} while (0)
@@ -511,8 +511,7 @@ static int ide_tape_callback(ide_drive_t *drive, int dsc) (readpos[0] & 0x40) ? "Yes" : "No");if (readpos[0 ] &0x4 ) { -printk (KERN_INFO "ide-tape: Block location is unknown" -"to the tape\n" ); +pr_info ("ide-tape: Block location is unknown to the tape\n" );clear_bit (IDE_AFLAG_ADDRESS_VALID , &drive->atapi_flags); uptodate =0 ; err =IDE_DRV_ERROR_GENERAL ;
@@ -1159,8 +1158,8 @@ static void ide_tape_discard_merge_buffer(ide_drive_t *drive, position =idetape_read_position (drive); seek = position >0 ? position :0 ;if (idetape_position_tape (drive, seek,0 ,0 )) { -printk (KERN_INFO "ide-tape: %s: position_tape failed in" -" %s\n" , tape->name, __func__); +pr_info ("ide-tape: %s: position_tape failed in %s\n" , + tape->name, __func__);return ; } }
@@ -1278,8 +1277,7 @@ static void ide_tape_flush_merge_buffer(ide_drive_t *drive) bh = tape->bh;while (i) {if (bh ==NULL ) { -printk (KERN_INFO "ide-tape: bug," -" bh NULL\n" ); +pr_info ("ide-tape: bug, bh NULL\n" );break ; } min = min(i, (unsigned int)(bh->b_size -
@@ -2034,8 +2032,8 @@ static void idetape_get_inquiry_results(ide_drive_t *drive)ide_fixstring (product_id,16 ,0 );ide_fixstring (fw_rev,4 ,0 ); -printk (KERN_INFO "ide-tape: %s <-> %s: %.8s %.16s rev %.4s\n" , - drive->name, tape->name, vendor_id, product_id, fw_rev); +pr_info ("ide-tape: %s <-> %s: %.8s %.16s rev %.4s\n" , + drive->name, tape->name, vendor_id, product_id, fw_rev); }/*
@@ -2071,13 +2069,13 @@ static void idetape_get_mode_sense_results(ide_drive_t *drive) *(u16 *)&caps[16 ] =be16_to_cpup ((__be16 *)&caps[16 ]);if (!speed) { -printk (KERN_INFO "ide-tape: %s: invalid tape speed " -"(assuming 650KB/sec)\n" , drive->name); +pr_info ("ide-tape: %s: invalid tape speed (assuming 650KB/sec)\n" , + drive->name); *(u16 *)&caps[14 ] =650 ; }if (!max_speed) { -printk (KERN_INFO "ide-tape: %s: invalid max_speed " -"(assuming 650KB/sec)\n" , drive->name); +pr_info ("ide-tape: %s: invalid max_speed (assuming 650KB/sec)\n" , + drive->name); *(u16 *)&caps[8 ] =650 ; }
@@ -2171,8 +2169,7 @@ static void idetape_setup(ide_drive_t *drive, idetape_tape_t *tape, int minor) drive->dev_flags |=IDE_DFLAG_DSC_OVERLAP ;if (drive->hwif->host_flags &IDE_HFLAG_NO_DSC ) { -printk (KERN_INFO "ide-tape: %s: disabling DSC overlap\n" , - tape->name); +pr_info ("ide-tape: %s: disabling DSC overlap\n" , tape->name); drive->dev_flags &= ~IDE_DFLAG_DSC_OVERLAP ; }
@@ -2214,8 +2211,7 @@ static void idetape_setup(ide_drive_t *drive, idetape_tape_t *tape, int minor)*/ tape->best_dsc_rw_freq = clamp_t(unsigned long, t, IDETAPE_DSC_RW_MIN,IDETAPE_DSC_RW_MAX ); - printk(KERN_INFO "ide-tape: %s <-> %s: %dKBps, %d*%dkB buffer, " - "%lums tDSC%s\n", + pr_info("ide-tape: %s <-> %s: %dKBps, %d*%dkB buffer, %lums tDSC%s\n", drive->name, tape->name, *(u16 *)&tape->caps[14], (*(u16 *)&tape->caps[16] * 512) / tape->buffer_size, tape->buffer_size / 1024,
drivers/ide/ide-xfer-mode.c +3 -3
@@ -70,7 +70,7 @@ u8 ide_get_best_pio_mode(ide_drive_t *drive, u8 mode_wanted, u8 max_mode) pio_mode =ide_scan_pio_blacklist ((char *)&id[ATA_ID_PROD ]);if (pio_mode !=-1 ) { -printk (KERN_INFO "%s: is on PIO blacklist\n" , drive->name); +pr_info ("%s: is on PIO blacklist\n" , drive->name); }else { pio_mode = id[ATA_ID_OLD_PIO_MODES ] >>8 ;if (pio_mode >2 ) {/* 2 is maximum allowed tPIO value */
@@ -96,8 +96,8 @@ u8 ide_get_best_pio_mode(ide_drive_t *drive, u8 mode_wanted, u8 max_mode) }if (overridden) -printk (KERN_INFO "%s: tPIO > 2, assuming tPIO = 2\n" , - drive->name); +pr_info ("%s: tPIO > 2, assuming tPIO = 2\n" , + drive->name); }if (pio_mode > max_mode)
drivers/ide/ide.c +9 -13
@@ -273,25 +273,23 @@ static void ide_dev_apply_params(ide_drive_t *drive, u8 unit)int i = drive->hwif->index *MAX_DRIVES + unit;if (ide_nodma & (1 << i)) { -printk (KERN_INFO "ide: disallowing DMA for %s\n" , drive->name); +pr_info ("ide: disallowing DMA for %s\n" , drive->name); drive->dev_flags |=IDE_DFLAG_NODMA ; }if (ide_noflush & (1 << i)) { -printk (KERN_INFO "ide: disabling flush requests for %s\n" , - drive->name); +pr_info ("ide: disabling flush requests for %s\n" , drive->name); drive->dev_flags |=IDE_DFLAG_NOFLUSH ; }if (ide_noprobe & (1 << i)) { -printk (KERN_INFO "ide: skipping probe for %s\n" , drive->name); +pr_info ("ide: skipping probe for %s\n" , drive->name); drive->dev_flags |=IDE_DFLAG_NOPROBE ; }if (ide_nowerr & (1 << i)) { -printk (KERN_INFO "ide: ignoring the ATA_DF bit for %s\n" , - drive->name); +pr_info ("ide: ignoring the ATA_DF bit for %s\n" , drive->name); drive->bad_wstat =BAD_R_STAT ; }if (ide_cdroms & (1 << i)) { -printk (KERN_INFO "ide: forcing %s as a CD-ROM\n" , drive->name); +pr_info ("ide: forcing %s as a CD-ROM\n" , drive->name); drive->dev_flags |=IDE_DFLAG_PRESENT ; drive->media = ide_cdrom;/* an ATAPI device ignores DRDY */
@@ -302,9 +300,8 @@ static void ide_dev_apply_params(ide_drive_t *drive, u8 unit) drive->head = drive->bios_head = ide_disks_chs[i].head; drive->sect = drive->bios_sect = ide_disks_chs[i].sect; -printk (KERN_INFO "ide: forcing %s as a disk (%d/%d/%d)\n" , - drive->name, - drive->cyl, drive->head, drive->sect); +pr_info ("ide: forcing %s as a disk (%d/%d/%d)\n" , + drive->name, drive->cyl, drive->head, drive->sect); drive->dev_flags |=IDE_DFLAG_FORCED_GEOM |IDE_DFLAG_PRESENT ; drive->media = ide_disk;
@@ -343,8 +340,7 @@ void ide_port_apply_params(ide_hwif_t *hwif)int i;if (ide_ignore_cable & (1 << hwif->index)) { -printk (KERN_INFO "ide: ignoring cable detection for %s\n" , - hwif->name); +pr_info ("ide: ignoring cable detection for %s\n" , hwif->name); hwif->cbl =ATA_CBL_PATA40_SHORT ; }
@@ -359,7 +355,7 @@ static int __init ide_init(void) {int ret; -printk (KERN_INFO "Uniform Multi-Platform E-IDE driver\n" ); +pr_info ("Uniform Multi-Platform E-IDE driver\n" ); ret =bus_register (&ide_bus_type);if (ret <0 ) {
drivers/ide/it821x.c +4 -5
@@ -467,7 +467,7 @@ static void it821x_quirkproc(ide_drive_t *drive) id[ATA_ID_COMMAND_SET_2 ] |=0x0400 ;/* LBA48 valid */ id[ATA_ID_CFS_ENABLE_2 ] |=0x0400 ;/* LBA48 on */ /* Reporting logic */ -printk (KERN_INFO "%s: IT8212 %sRAID %d volume" , +pr_info ("%s: IT8212 %sRAID %d volume" , drive->name, id[147 ] ?"Bootable " :"" , id[ATA_ID_CSFO ]);if (id[ATA_ID_CSFO ] !=1 )
@@ -488,7 +488,7 @@ static void it821x_quirkproc(ide_drive_t *drive) id[ATA_ID_DLF ] =0 ; id[ATA_ID_CSFO ] =0 ; id[ATA_ID_CFA_POWER ] =0 ; -printk (KERN_INFO "%s: Performing identify fixups.\n" , +pr_info ("%s: Performing identify fixups.\n" , drive->name); }
@@ -609,12 +609,11 @@ static int init_chipset_it821x(struct pci_dev *dev)/* Force the card into bypass mode if so requested */ if (it8212_noraid) { - printk(KERN_INFO DRV_NAME " %s: forcing bypass mode\n", - pci_name(dev)); +pr_info (DRV_NAME " %s: forcing bypass mode\n" ,pci_name (dev));it8212_disable_raid (dev); }pci_read_config_byte (dev,0x50 , &conf); - printk(KERN_INFO DRV_NAME " %s: controller in %s mode\n", +pr_info (DRV_NAME " %s: controller in %s mode\n" ,pci_name (dev), mode[conf &1 ]);return 0 ; }
drivers/ide/macide.c +2 -2
@@ -122,8 +122,8 @@ static int __init macide_init(void)return -ENODEV ; } -printk (KERN_INFO "ide: Macintosh %s IDE controller\n" , - mac_ide_name[macintosh_config->ide_type -1 ]); +pr_info ("ide: Macintosh %s IDE controller\n" , + mac_ide_name[macintosh_config->ide_type -1 ]);macide_setup_ports (&hw, base, irq, ack_intr);
drivers/ide/opti621.c +1 -1
@@ -173,7 +173,7 @@ static void opti621_set_pio_mode(ide_drive_t *drive, const u8 pio)/* check CLK speed */ clk =read_reg (STRAP_REG ) &1 ; -printk (KERN_INFO "%s: CLK = %d MHz\n" , hwif->name, clk ?25 :33 ); +pr_info ("%s: CLK = %d MHz\n" , hwif->name, clk ?25 :33 ); tim = data_rec_timings[clk][pio]; misc = addr_timings[clk][addr_pio];
drivers/ide/palm_bk3710.c +1 -1
@@ -283,7 +283,7 @@ static u8 palm_bk3710_cable_detect(ide_hwif_t *hwif)static int __devinit palm_bk3710_init_dma (ide_hwif_t *hwif,const struct ide_port_info *d) { -printk (KERN_INFO " %s: MMIO-DMA\n" , hwif->name); +pr_info (" %s: MMIO-DMA\n" , hwif->name);if (ide_allocate_dma_engine (hwif))return -1 ;
drivers/ide/pdc202xx_new.c +5 -5
@@ -360,7 +360,7 @@ static int init_chipset_pdcnew(struct pci_dev *dev)* registers setting. */ pll_input =detect_pll_input_clock (dma_base); -printk (KERN_INFO "%s %s: PLL input clock is %ld kHz\n" , +pr_info ("%s %s: PLL input clock is %ld kHz\n" , name,pci_name (dev), pll_input /1000 );/* Sanity check */
@@ -460,8 +460,8 @@ static struct pci_dev * __devinit pdc20270_get_dev2(struct pci_dev *dev)if (dev2->irq != dev->irq) { dev2->irq = dev->irq; - printk(KERN_INFO DRV_NAME " %s: PCI config space " - "interrupt fixed\n", pci_name(dev)); +pr_info (DRV_NAME " %s: PCI config space interrupt fixed\n" , +pci_name (dev)); }return dev2;
@@ -532,8 +532,8 @@ static int __devinit pdc202new_init_one(struct pci_dev *dev, const struct pci_de bridge->vendor == PCI_VENDOR_ID_INTEL && (bridge->device == PCI_DEVICE_ID_INTEL_I960 || bridge->device == PCI_DEVICE_ID_INTEL_I960RM)) { - printk(KERN_INFO DRV_NAME " %s: attached to I2O RAID controller," - " skipping\n", pci_name(dev)); +pr_info (DRV_NAME " %s: attached to I2O RAID controller, skipping\n" , +pci_name (dev));return -ENODEV ; }
drivers/ide/pdc202xx_old.c +5 -6
@@ -269,7 +269,7 @@ static int init_chipset_pdc202xx(struct pci_dev *dev) udma_speed_flag =inb (dmabase |0x1f ); primary_mode =inb (dmabase |0x1a ); secondary_mode =inb (dmabase |0x1b ); - printk(KERN_INFO "%s: (U)DMA Burst Bit %sABLED " \ + pr_info("%s: (U)DMA Burst Bit %sABLED " \ "Primary %s Mode " \ "Secondary %s Mode.\n", pci_name(dev), (udma_speed_flag & 1) ? "EN" : "DIS",
@@ -277,7 +277,7 @@ static int init_chipset_pdc202xx(struct pci_dev *dev) (secondary_mode & 1) ? "MASTER" : "PCI" );if (!(udma_speed_flag &1 )) { -printk (KERN_INFO "%s: FORCING BURST BIT 0x%02x->0x%02x " , +pr_info ("%s: FORCING BURST BIT 0x%02x->0x%02x " ,pci_name (dev), udma_speed_flag, (udma_speed_flag|1 ));outb (udma_speed_flag |1 , dmabase |0x1f );
@@ -298,8 +298,8 @@ static void __devinit pdc202ata4_fixup_irq(struct pci_dev *dev,if (irq != irq2) {pci_write_config_byte (dev, (PCI_INTERRUPT_LINE )|0x80 , irq);/* 0xbc */ -printk (KERN_INFO "%s %s: PCI config space interrupt " -"mirror fixed\n" , name,pci_name (dev)); +pr_info ("%s %s: PCI config space interrupt mirror fixed\n" , + name,pci_name (dev)); } } }
@@ -403,8 +403,7 @@ static int __devinit pdc202xx_init_one(struct pci_dev *dev, const struct pci_dev bridge->vendor == PCI_VENDOR_ID_INTEL && (bridge->device == PCI_DEVICE_ID_INTEL_I960 || bridge->device == PCI_DEVICE_ID_INTEL_I960RM)) { - printk(KERN_INFO DRV_NAME " %s: skipping Promise " -"PDC20265 attached to I2O RAID controller\n" , +pr_info (DRV_NAME " %s: skipping Promise PDC20265 attached to I2O RAID controller\n" ,pci_name (dev));return -ENODEV ; }
drivers/ide/pmac.c +4 -4
@@ -1110,10 +1110,10 @@ static int __devinit pmac_ide_setup_device(pmac_ide_hwif_t *pmif, hw_regs_t *hw)msleep (jiffies_to_msecs (IDE_WAKEUP_DELAY )); } - printk(KERN_INFO DRV_NAME ": Found Apple %s controller (%s), " -"bus ID %d%s, irq %d\n" , model_name[pmif->kind], - pmif->mdev ?"macio" :"PCI" , pmif->aapl_bus_id, - pmif->mediabay ? " (mediabay)" : "", hw->irq); +pr_info (DRV_NAME ": Found Apple %s controller (%s), bus ID %d%s, irq %d\n" , + model_name[pmif->kind], + pmif->mdev ?"macio" :"PCI" , pmif->aapl_bus_id, + pmif->mediabay ?" (mediabay)" :"" , hw->irq); rc =ide_host_register (host, &d, hws);if (rc) {
drivers/ide/q40ide.c +1 -1
@@ -141,7 +141,7 @@ static int __init q40ide_init(void)if (!MACH_IS_Q40 )return -ENODEV ; -printk (KERN_INFO "ide: Q40 IDE controller\n" ); +pr_info ("ide: Q40 IDE controller\n" );for (i =0 ; i <Q40IDE_NUM_HWIFS ; i++) {const char *name = q40_ide_names[i];
drivers/ide/qd65xx.c +3 -3
@@ -198,7 +198,7 @@ static void qd6500_set_pio_mode(ide_drive_t *drive, const u8 pio)if (!qd_find_disk_type (drive, &active_time, &recovery_time) && (id[ATA_ID_OLD_PIO_MODES ] &0xff ) && (id[ATA_ID_FIELD_VALID ] &2 ) && id[ATA_ID_EIDE_PIO ] >=240 ) { -printk (KERN_INFO "%s: PIO mode%d\n" , drive->name, +pr_info ("%s: PIO mode%d\n" , drive->name, id[ATA_ID_OLD_PIO_MODES ] &0xff ); active_time =110 ; recovery_time = drive->id[ATA_ID_EIDE_PIO ] -120 ;
@@ -245,7 +245,7 @@ static void qd6580_set_pio_mode(ide_drive_t *drive, const u8 pio) recovery_time = cycle_time - active_time; } } -printk (KERN_INFO "%s: PIO mode%d\n" , drive->name,pio); +pr_info ("%s: PIO mode%d\n" , drive->name, pio); }if (!hwif->channel && drive->media != ide_disk) {
@@ -400,7 +400,7 @@ static int __init qd_probe(int base)if (control &QD_CONTR_SEC_DISABLED ) d.host_flags |=IDE_HFLAG_SINGLE ; -printk (KERN_INFO "qd6580: %s IDE board\n" , +pr_info ("qd6580: %s IDE board\n" , (control &QD_CONTR_SEC_DISABLED ) ?"single" :"dual" );break ;default :
drivers/ide/rz1000.c +4 -4
@@ -28,12 +28,12 @@ static int __devinit rz1000_disable_readahead(struct pci_dev *dev)if (!pci_read_config_word (dev,0x40 , ®) && !pci_write_config_word (dev,0x40 , reg &0xdfff )) { -printk (KERN_INFO "%s: disabled chipset read-ahead " -"(buggy RZ1000/RZ1001)\n" ,pci_name (dev)); +pr_info ("%s: disabled chipset read-ahead (buggy RZ1000/RZ1001)\n" , +pci_name (dev));return 0 ; }else { -printk (KERN_INFO "%s: serialized, disabled unmasking " -"(buggy RZ1000/RZ1001)\n" ,pci_name (dev)); +pr_info ("%s: serialized, disabled unmasking (buggy RZ1000/RZ1001)\n" , +pci_name (dev));return 1 ; } }
drivers/ide/scc_pata.c +1 -2
@@ -499,8 +499,7 @@ static u8 scc_udma_filter(ide_drive_t *drive)/* errata A308 workaround: limit non ide_disk drive to UDMA4 */ if ((drive->media != ide_disk) && (mask &0xE0 )) { -printk (KERN_INFO "%s: limit %s to UDMA4\n" , -SCC_PATA_NAME , drive->name); +pr_info ("%s: limit %s to UDMA4\n" ,SCC_PATA_NAME , drive->name); mask =ATA_UDMA4 ; }
drivers/ide/setup-pci.c +16 -16
@@ -39,12 +39,12 @@ static int ide_setup_pci_baseregs(struct pci_dev *dev, const char *name)if (pci_read_config_byte (dev,PCI_CLASS_PROG , &progif) || (progif &5 ) !=5 ) {if ((progif &0xa ) !=0xa ) { -printk (KERN_INFO "%s %s: device not capable of full " -"native PCI mode\n" , name,pci_name (dev)); +pr_info ("%s %s: device not capable of full native PCI mode\n" , + name,pci_name (dev));return -EOPNOTSUPP ; } -printk (KERN_INFO "%s %s: placing both ports into native PCI " -"mode\n" , name,pci_name (dev)); +pr_info ("%s %s: placing both ports into native PCI mode\n" , + name,pci_name (dev)); (void )pci_write_config_byte (dev,PCI_CLASS_PROG , progif|5 );if (pci_read_config_byte (dev,PCI_CLASS_PROG , &progif) || (progif &5 ) !=5 ) {
@@ -115,7 +115,7 @@ int ide_pci_check_simplex(ide_hwif_t *hwif, const struct ide_port_info *d)if (d->host_flags &IDE_HFLAG_CLEAR_SIMPLEX ) {if (ide_pci_clear_simplex (hwif->dma_base, d->name)) -printk (KERN_INFO "%s %s: simplex device: DMA forced\n" , +pr_info ("%s %s: simplex device: DMA forced\n" , d->name,pci_name (dev)); goto out; }
@@ -132,7 +132,7 @@ int ide_pci_check_simplex(ide_hwif_t *hwif, const struct ide_port_info *d)*/ dma_stat = hwif->dma_ops->dma_sff_read_status (hwif);if ((dma_stat &0x80 ) && hwif->mate && hwif->mate->dma_base) { -printk (KERN_INFO "%s %s: simplex device: DMA disabled\n" , +pr_info ("%s %s: simplex device: DMA disabled\n" , d->name,pci_name (dev));return -1 ; }
@@ -168,7 +168,7 @@ EXPORT_SYMBOL_GPL(ide_pci_set_master);void ide_setup_pci_noise (struct pci_dev *dev,const struct ide_port_info *d) { -printk (KERN_INFO "%s %s: IDE controller (0x%04x:0x%04x rev 0x%02x)\n" , +pr_info ("%s %s: IDE controller (0x%04x:0x%04x rev 0x%02x)\n" , d->name,pci_name (dev), dev->vendor, dev->device, dev->revision); }
@@ -256,7 +256,7 @@ static int ide_pci_configure(struct pci_dev *dev, const struct ide_port_info *d)*/ if (ide_setup_pci_baseregs (dev, d->name) ||pci_write_config_word (dev,PCI_COMMAND , pcicmd |PCI_COMMAND_IO )) { -printk (KERN_INFO "%s %s: device disabled (BIOS)\n" , +pr_info ("%s %s: device disabled (BIOS)\n" , d->name,pci_name (dev));return -ENODEV ; }
@@ -385,10 +385,10 @@ int ide_hwif_setup_dma(ide_hwif_t *hwif, const struct ide_port_info *d)return -1 ;if (hwif->host_flags &IDE_HFLAG_MMIO ) -printk (KERN_INFO " %s: MMIO-DMA\n" , hwif->name); +pr_info (" %s: MMIO-DMA\n" , hwif->name);else -printk (KERN_INFO " %s: BM-DMA at 0x%04lx-0x%04lx\n" , - hwif->name, base, base +7 ); +pr_info (" %s: BM-DMA at 0x%04lx-0x%04lx\n" , + hwif->name, base, base +7 ); hwif->extra_base = base + (hwif->channel ?8 :16 );
@@ -434,7 +434,7 @@ static int ide_setup_pci_controller(struct pci_dev *dev, ret =ide_pci_configure (dev, d);if (ret <0 ) goto out; -printk (KERN_INFO "%s %s: device enabled (Linux)\n" , +pr_info ("%s %s: device enabled (Linux)\n" , d->name,pci_name (dev)); }
@@ -473,7 +473,7 @@ void ide_pci_setup_ports(struct pci_dev *dev, const struct ide_port_info *d,if (e->reg && (pci_read_config_byte (dev, e->reg, &tmp) || (tmp & e->mask) != e->val)) { -printk (KERN_INFO "%s %s: IDE port disabled\n" , +pr_info ("%s %s: IDE port disabled\n" , d->name,pci_name (dev));continue ;/* port not enabled */ }
@@ -519,14 +519,14 @@ static int do_ide_setup_pci_device(struct pci_dev *dev,if (ide_pci_is_in_compatibility_mode (dev)) {if (noisy) -printk (KERN_INFO "%s %s: not 100%% native mode: will " -"probe irqs later\n" , d->name,pci_name (dev)); +pr_info ("%s %s: not 100%% native mode: will probe irqs later\n" , + d->name,pci_name (dev)); pciirq =0 ; }else if (!pciirq && noisy) {printk (KERN_WARNING "%s %s: bad irq (%d): will probe later\n" , d->name,pci_name (dev), pciirq); }else if (noisy) { -printk (KERN_INFO "%s %s: 100%% native mode on irq %d\n" , +pr_info ("%s %s: 100%% native mode on irq %d\n" , d->name,pci_name (dev), pciirq); }
drivers/ide/sgiioc4.c +4 -4
@@ -322,7 +322,7 @@ ide_dma_sgiioc4(ide_hwif_t *hwif, const struct ide_port_info *d)int num_ports =sizeof (ioc4_dma_regs_t);void *pad; -printk (KERN_INFO " %s: MMIO-DMA\n" , hwif->name); +pr_info (" %s: MMIO-DMA\n" , hwif->name);if (request_mem_region (dma_base, num_ports, hwif->name) ==NULL ) { printk(KERN_ERR "%s(%s) -- ERROR: addresses 0x%08lx to 0x%08lx "
@@ -353,7 +353,7 @@ ide_dma_sgiioc4(ide_hwif_t *hwif, const struct ide_port_info *d)printk (KERN_ERR "%s(%s) -- ERROR: Unable to allocate DMA maps\n" , __func__, hwif->name); -printk (KERN_INFO "%s: changing from DMA to PIO mode" , hwif->name); +pr_info ("%s: changing from DMA to PIO mode\n" , hwif->name); dma_pci_alloc_failure:release_mem_region (dma_base, num_ports);
@@ -596,8 +596,8 @@ pci_init_sgiioc4(struct pci_dev *dev) {int ret; -printk (KERN_INFO "%s: IDE controller at PCI slot %s, revision %d\n" , -DRV_NAME ,pci_name (dev), dev->revision); +pr_info ("%s: IDE controller at PCI slot %s, revision %d\n" , +DRV_NAME ,pci_name (dev), dev->revision);if (dev->revision <IOC4_SUPPORTED_FIRMWARE_REV ) { printk(KERN_ERR "Skipping %s IDE controller in slot %s: "
drivers/ide/siimage.c +4 -4
@@ -541,7 +541,7 @@ static int init_chipset_siimage(struct pci_dev *dev) { "== 100", "== 133", "== 2X PCI", "DISABLED!" }; tmp >>=4 ; - printk(KERN_INFO DRV_NAME " %s: BASE CLOCK %s\n", +pr_info (DRV_NAME " %s: BASE CLOCK %s\n" ,pci_name (dev), clk_str[tmp &3 ]); }
@@ -624,8 +624,8 @@ static int is_dev_seagate_sata(ide_drive_t *drive)if ((len >4 ) && (!memcmp (s,"ST" ,2 )))if ((!memcmp (s + len -2 ,"AS" ,2 )) || (!memcmp (s + len -3 ,"ASL" ,3 ))) { -printk (KERN_INFO "%s: applying pessimistic Seagate " -"errata fix\n" , drive->name); +pr_info ("%s: applying pessimistic Seagate errata fix\n" , + drive->name);return 1 ; }
@@ -762,7 +762,7 @@ static int __devinit siimage_init_one(struct pci_dev *dev,static int first =1 ;if (first) { - printk(KERN_INFO DRV_NAME ": For full SATA support you " +pr_info (DRV_NAME ": For full SATA support you " "should use the libata sata_sil module.\n" ); first =0 ; }
drivers/ide/sis5513.c +5 -5
@@ -381,7 +381,7 @@ static int __devinit sis_find_family(struct pci_dev *dev) }pci_dev_put (host); - printk(KERN_INFO DRV_NAME " %s: %s %s controller\n", +pr_info (DRV_NAME " %s: %s %s controller\n" ,pci_name (dev), SiSHostChipInfo[i].name, chipset_capability[chipset_family]); }
@@ -398,7 +398,7 @@ static int __devinit sis_find_family(struct pci_dev *dev)pci_write_config_dword (dev,0x54 , idemisc);if (trueid ==0x5518 ) { - printk(KERN_INFO DRV_NAME " %s: SiS 962/963 MuTIOL IDE UDMA133 controller\n", +pr_info (DRV_NAME " %s: SiS 962/963 MuTIOL IDE UDMA133 controller\n" ,pci_name (dev)); chipset_family =ATA_133 ;
@@ -408,7 +408,7 @@ static int __devinit sis_find_family(struct pci_dev *dev)*/ if ((idemisc &0x40000000 ) ==0 ) {pci_write_config_dword (dev,0x54 , idemisc |0x40000000 ); - printk(KERN_INFO DRV_NAME " %s: Switching to 5513 register mapping\n", +pr_info (DRV_NAME " %s: Switching to 5513 register mapping\n" ,pci_name (dev)); } }
@@ -433,11 +433,11 @@ static int __devinit sis_find_family(struct pci_dev *dev)pci_dev_put (lpc_bridge);if (lpc_bridge->revision ==0x10 && (prefctl &0x80 )) { - printk(KERN_INFO DRV_NAME " %s: SiS 961B MuTIOL IDE UDMA133 controller\n", +pr_info (DRV_NAME " %s: SiS 961B MuTIOL IDE UDMA133 controller\n" ,pci_name (dev)); chipset_family = ATA_133a; }else { - printk(KERN_INFO DRV_NAME " %s: SiS 961 MuTIOL IDE UDMA100 controller\n", +pr_info (DRV_NAME " %s: SiS 961 MuTIOL IDE UDMA100 controller\n" ,pci_name (dev)); chipset_family =ATA_100 ; }
drivers/ide/sl82c105.c +2 -2
@@ -326,8 +326,8 @@ static int __devinit sl82c105_init_one(struct pci_dev *dev, const struct pci_dev* Never ever EVER under any circumstances enable * DMA when the bridge is this old. */ - printk(KERN_INFO DRV_NAME ": Winbond W83C553 bridge " - "revision %d, BM-DMA disabled\n", rev); +pr_info (DRV_NAME ": Winbond W83C553 bridge revision %d, BM-DMA disabled\n" , + rev); d.dma_ops =NULL ; d.mwdma_mask =0 ; d.host_flags &= ~IDE_HFLAG_SERIALIZE_DMA ;
drivers/ide/trm290.c +5 -5
@@ -239,17 +239,17 @@ static void __devinit init_hwif_trm290(ide_hwif_t *hwif)u8 reg =0 ;if ((dev->class &5 ) && cfg_base) - printk(KERN_INFO DRV_NAME " %s: chip", pci_name(dev)); +pr_info (DRV_NAME " %s: chip" ,pci_name (dev));else { cfg_base =0x3df0 ; - printk(KERN_INFO DRV_NAME " %s: using default", pci_name(dev)); +pr_info (DRV_NAME " %s: using default" ,pci_name (dev)); }printk (KERN_CONT " config base at 0x%04x\n" , cfg_base); hwif->config_data = cfg_base; hwif->dma_base = (cfg_base +4 ) ^ (hwif->channel ?0x80 :0 ); -printk (KERN_INFO " %s: BM-DMA at 0x%04lx-0x%04lx\n" , - hwif->name, hwif->dma_base, hwif->dma_base +3 ); +pr_info (" %s: BM-DMA at 0x%04lx-0x%04lx\n" , + hwif->name, hwif->dma_base, hwif->dma_base +3 );if (ide_allocate_dma_engine (hwif))return ;
@@ -292,7 +292,7 @@ static void __devinit init_hwif_trm290(ide_hwif_t *hwif) hwif->io_ports.ctl_addr = compat +2 ;outw (compat |1 , hwif->config_data); new =inw (hwif->config_data); -printk (KERN_INFO "%s: control basereg workaround: " +pr_info ("%s: control basereg workaround: " "old=0x%04x, new=0x%04x\n" , hwif->name, old, new & ~1 ); }
drivers/ide/via82cxxx.c +1 -1
@@ -410,7 +410,7 @@ static int __devinit via_init_one(struct pci_dev *dev, const struct pci_device_i/* * Print the boot message. */ - printk(KERN_INFO DRV_NAME " %s: VIA %s (rev %02x) IDE %sDMA%s\n", + pr_info(DRV_NAME " %s: VIA %s (rev %02x) IDE %sDMA%s\n", pci_name(dev), via_config->name, isa->revision, via_config->udma_mask ? "U" : "MW", via_dma[via_config->udma_mask ?
Signature · 1 line
1.6.3.1.10.g659a0.dirty
Re: [PATCH 2/6] drivers/ide: Convert printk(KERN_INFO to pr_info(
Quoted 5 lines · Joe Perches
drivers/ide/aec62xx.c +0
-0
drivers/ide/aec62xx.c static int __devinit aec62xx_init_one(struct pci_dev *dev, const struct pci_devi · line 280
Quoted 10 lines
drivers/ide/aec62xx.c +2
-2@@ -273,8 +273,8 @@ static int __devinit aec62xx_init_one(struct pci_dev *dev, const struct pci_deviunsigned long dma_base =pci_resource_start (dev,4 );if (inb (dma_base +2 ) &0x10 ) { - printk(KERN_INFO DRV_NAME " %s: AEC6880%s card detected" - "\n", pci_name(dev), (idx == 4) ? "R" : ""); +pr_info (DRV_NAME " %s: AEC6880%s card detected\n" + pci_name(dev), (idx ==4 ) ?"R" :"" ); d.udma_mask =ATA_UDMA6 ; } }
Sorry, this one is bad. It's missing a comma between the end of the format string and pci_name.
I edited it in-place and neglected to remove the backup file. git send-email sent the corrected patch and the backup file.
The other [patch 2/6] is correct.
PATCH 3/6 drivers/ide: Convert printk(KERN_ERR to pr_err(
In reply to Joe Perches--- drivers/ide/ali14xx.c | 4 +- drivers/ide/au1xxx-ide.c | 8 ++-- drivers/ide/cmd640.c | 9 ++-- drivers/ide/cs5520.c | 2 +- drivers/ide/cs5530.c | 4 +- drivers/ide/cs5536.c | 2 +- drivers/ide/cy82c693.c | 5 +- drivers/ide/delkin_cb.c | 4 +- drivers/ide/dtc2278.c | 2 +- drivers/ide/falconide.c | 4 +- drivers/ide/hpt366.c | 12 +++--- drivers/ide/ide-4drives.c | 7 +-- drivers/ide/ide-acpi.c | 15 +++---- drivers/ide/ide-atapi.c | 61 ++++++++++++++-------------- drivers/ide/ide-cd.c | 43 ++++++++------------ drivers/ide/ide-cd_ioctl.c | 3 +- drivers/ide/ide-cd_verbose.c | 28 ++++++------- drivers/ide/ide-cs.c | 7 +-- drivers/ide/ide-disk.c | 4 +- drivers/ide/ide-dma-sff.c | 4 +- drivers/ide/ide-dma.c | 13 +++--- drivers/ide/ide-eh.c | 14 +++--- drivers/ide/ide-floppy.c | 30 ++++++------- drivers/ide/ide-floppy_ioctl.c | 2 +- drivers/ide/ide-gd.c | 8 ++-- drivers/ide/ide-generic.c | 10 ++--- drivers/ide/ide-h8300.c | 2 +- drivers/ide/ide-io.c | 12 ++--- drivers/ide/ide-iops.c | 2 +- drivers/ide/ide-legacy.c | 8 ++-- drivers/ide/ide-lib.c | 10 ++-- drivers/ide/ide-pnp.c | 8 ++-- drivers/ide/ide-probe.c | 25 ++++++------ drivers/ide/ide-scan-pci.c | 4 +- drivers/ide/ide-tape.c | 86 +++++++++++++++++----------------------- drivers/ide/ide-taskfile.c | 26 ++++++------ drivers/ide/it821x.c | 2 +- drivers/ide/palm_bk3710.c | 8 ++-- drivers/ide/pdc202xx_new.c | 11 ++--- drivers/ide/pmac.c | 31 +++++++------- drivers/ide/qd65xx.c | 6 +- drivers/ide/scc_pata.c | 2 +- drivers/ide/setup-pci.c | 42 +++++++++---------- drivers/ide/sgiioc4.c | 46 ++++++++------------- drivers/ide/tc86c001.c | 2 +- drivers/ide/tx4939ide.c | 4 +- drivers/ide/umc8672.c | 6 +- drivers/ide/via82cxxx.c | 3 +- 48 files changed, 297 insertions(+), 354 deletions(-)
drivers/ide/ali14xx.c +2 -2
@@ -213,7 +213,7 @@ static int __init ali14xx_probe(void)/* initialize controller registers */ if (!initRegisters ()) { -printk (KERN_ERR "ali14xx: Chip initialization failed.\n" ); +pr_err ("ali14xx: Chip initialization failed.\n" );return 1 ; }
@@ -236,7 +236,7 @@ static int __init ali14xx_init(void)return -ENODEV ;return 0 ; } -printk (KERN_ERR "ali14xx: not found.\n" ); +pr_err ("ali14xx: not found.\n" ); out:return -ENODEV ; }
drivers/ide/au1xxx-ide.c +4 -4
@@ -58,7 +58,7 @@ static inline 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" , __func__, __LINE__); +pr_err ("%s failed %d\n" , __func__, __LINE__);return ; } ctp = *((chan_tab_t **)ahwif->rx_chan);
@@ -76,7 +76,7 @@ static inline 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" , __func__, __LINE__); +pr_err ("%s failed %d\n" , __func__, __LINE__);return ; } ctp = *((chan_tab_t **)ahwif->tx_chan);
@@ -249,7 +249,7 @@ static int auide_build_dmatable(ide_drive_t *drive, struct ide_cmd *cmd)if (!put_source_flags (ahwif->tx_chan, (void *)sg_virt (sg), tc, flags)) { -printk (KERN_ERR "%s failed %d\n" , +pr_err ("%s failed %d\n" , __func__, __LINE__); } }else
@@ -257,7 +257,7 @@ static int auide_build_dmatable(ide_drive_t *drive, struct ide_cmd *cmd)if (!put_dest_flags (ahwif->rx_chan, (void *)sg_virt (sg), tc, flags)) { -printk (KERN_ERR "%s failed %d\n" , +pr_err ("%s failed %d\n" , __func__, __LINE__); } }
drivers/ide/cmd640.c +4 -5
@@ -685,14 +685,13 @@ static const struct ide_port_info cmd640_port_info __initdata = {static int cmd640x_init_one (unsigned long base,unsigned long ctl) {if (!request_region (base,8 ,DRV_NAME )) { -printk (KERN_ERR "%s: I/O resource 0x%lX-0x%lX not free.\n" , -DRV_NAME , base, base +7 ); +pr_err ("%s: I/O resource 0x%lX-0x%lX not free.\n" , +DRV_NAME , base, base +7 );return -EBUSY ; }if (!request_region (ctl,1 ,DRV_NAME )) { -printk (KERN_ERR "%s: I/O resource 0x%lX not free.\n" , -DRV_NAME , ctl); +pr_err ("%s: I/O resource 0x%lX not free.\n" ,DRV_NAME , ctl);release_region (base,8 );return -EBUSY ; }
@@ -728,7 +727,7 @@ static int __init cmd640x_init(void)*/ put_cmd640_reg (0x5b ,0xbd );if (get_cmd640_reg (0x5b ) !=0xbd ) { -printk (KERN_ERR "ide: cmd640 init failed: wrong value in reg 0x5b\n" ); +pr_err ("ide: cmd640 init failed: wrong value in reg 0x5b\n" );return 0 ; }put_cmd640_reg (0x5b ,0 );
drivers/ide/cs5520.c +1 -1
@@ -83,7 +83,7 @@ static void cs5520_set_pio_mode(ide_drive_t *drive, const u8 pio)static void cs5520_set_dma_mode (ide_drive_t *drive,const u8 speed) { -printk (KERN_ERR "cs55x0: bad ide timing.\n" ); +pr_err ("cs55x0: bad ide timing.\n" );cs5520_set_pio_mode (drive,0 ); }
drivers/ide/cs5530.c +2 -2
@@ -153,11 +153,11 @@ static int init_chipset_cs5530(struct pci_dev *dev) } }if (!master_0) { - printk(KERN_ERR DRV_NAME ": unable to locate PCI MASTER function\n"); +pr_err (DRV_NAME ": unable to locate PCI MASTER function\n" ); goto out; }if (!cs5530_0) { - printk(KERN_ERR DRV_NAME ": unable to locate CS5530 LEGACY function\n"); +pr_err (DRV_NAME ": unable to locate CS5530 LEGACY function\n" ); goto out; }
drivers/ide/cs5536.c +1 -1
@@ -265,7 +265,7 @@ static int cs5536_init_one(struct pci_dev *dev, const struct pci_device_id *id)cs5536_read (dev,CFG , &cfg);if ((cfg &IDE_CFG_CHANEN ) ==0 ) { - printk(KERN_ERR DRV_NAME ": disabled by BIOS\n"); +pr_err (DRV_NAME ": disabled by BIOS\n" );return -ENODEV ; }
drivers/ide/cy82c693.c +2 -3
@@ -212,9 +212,8 @@ static void cy82c693_set_pio_mode(ide_drive_t *drive, const u8 pio)if (hwif->index >0 ) {/* drive is on the secondary channel */ dev =pci_get_slot (dev->bus, dev->devfn+1 );if (!dev) { -printk (KERN_ERR "%s: tune_drive: " -"Cannot find secondary interface!\n" , - drive->name); +pr_err ("%s: tune_drive: Cannot find secondary interface!\n" , + drive->name);return ; } }
drivers/ide/delkin_cb.c +2 -2
@@ -80,12 +80,12 @@ delkin_cb_probe (struct pci_dev *dev, const struct pci_device_id *id) rc =pci_enable_device (dev);if (rc) { -printk (KERN_ERR "delkin_cb: pci_enable_device failed (%d)\n" , rc); +pr_err ("delkin_cb: pci_enable_device failed (%d)\n" , rc);return rc; } rc =pci_request_regions (dev,"delkin_cb" );if (rc) { -printk (KERN_ERR "delkin_cb: pci_request_regions failed (%d)\n" , rc); +pr_err ("delkin_cb: pci_request_regions failed (%d)\n" , rc);pci_disable_device (dev);return rc; }
drivers/ide/dtc2278.c +1 -1
@@ -141,7 +141,7 @@ static int __init dtc2278_init(void)return -ENODEV ;if (dtc2278_probe ()) { -printk (KERN_ERR "dtc2278: ide interfaces already in use!\n" ); +pr_err ("dtc2278: ide interfaces already in use!\n" );return -EBUSY ; }return 0 ;
drivers/ide/falconide.c +2 -2
@@ -46,7 +46,7 @@ static int falconide_intr_lock;static void falconide_release_lock (void ) {if (falconide_intr_lock ==0 ) { -printk (KERN_ERR "%s: bug\n" , __func__); +pr_err ("%s: bug\n" , __func__);return ; } falconide_intr_lock =0 ;
@@ -148,7 +148,7 @@ static int __init falconide_init(void)pr_info ("ide: Falcon IDE controller\n" );if (!request_mem_region (ATA_HD_BASE ,0x40 ,DRV_NAME )) { -printk (KERN_ERR "%s: resources busy\n" ,DRV_NAME ); +pr_err ("%s: resources busy\n" ,DRV_NAME );return -EBUSY ; }
drivers/ide/hpt366.c +6 -6
@@ -1161,8 +1161,8 @@ static int init_chipset_hpt366(struct pci_dev *dev) }if (info->timings->clock_table[clock] ==NULL ) { -printk (KERN_ERR "%s %s: unknown bus timing!\n" , - name,pci_name (dev)); +pr_err ("%s %s: unknown bus timing!\n" , + name,pci_name (dev));return -EIO ; }
@@ -1188,8 +1188,8 @@ static int init_chipset_hpt366(struct pci_dev *dev) f_low += adjust >>1 ; }if (adjust ==8 ) { -printk (KERN_ERR "%s %s: DPLL did not stabilize!\n" , - name,pci_name (dev)); +pr_err ("%s %s: DPLL did not stabilize!\n" , + name,pci_name (dev));return -EIO ; }
@@ -1546,8 +1546,8 @@ static int __devinit hpt366_init_one(struct pci_dev *dev, const struct pci_devic dyn_info =kzalloc (sizeof (*dyn_info) * (dev2 ?2 :1 ),GFP_KERNEL );if (dyn_info ==NULL ) { -printk (KERN_ERR "%s %s: out of memory!\n" , - d.name,pci_name (dev)); +pr_err ("%s %s: out of memory!\n" , + d.name,pci_name (dev));pci_dev_put (dev2);return -ENOMEM ; }
drivers/ide/ide-4drives.c +3 -4
@@ -36,14 +36,13 @@ static int __init ide_4drives_init(void)return -ENODEV ;if (!request_region (base,8 ,DRV_NAME )) { -printk (KERN_ERR "%s: I/O resource 0x%lX-0x%lX not free.\n" , -DRV_NAME , base, base +7 ); +pr_err ("%s: I/O resource 0x%lX-0x%lX not free.\n" , +DRV_NAME , base, base +7 );return -EBUSY ; }if (!request_region (ctl,1 ,DRV_NAME )) { -printk (KERN_ERR "%s: I/O resource 0x%lX not free.\n" , -DRV_NAME , ctl); +pr_err ("%s: I/O resource 0x%lX not free.\n" ,DRV_NAME , ctl);release_region (base,8 );return -EBUSY ; }
drivers/ide/ide-acpi.c +6 -9
@@ -261,8 +261,7 @@ static int do_drive_get_GTF(ide_drive_t *drive,if (!out_obj->buffer.length || !out_obj->buffer.pointer || out_obj->buffer.length %REGS_PER_GTF ) { -printk (KERN_ERR -"%s: unexpected GTF length (%d) or addr (0x%p)\n" , +pr_err ("%s: unexpected GTF length (%d) or addr (0x%p)\n" , __func__, out_obj->buffer.length, out_obj->buffer.pointer); err = -ENOENT ;
@@ -323,8 +322,8 @@ static int do_drive_set_taskfiles(ide_drive_t *drive, err =ide_no_data_taskfile (drive, &cmd);if (err) { -printk (KERN_ERR "%s: ide_no_data_taskfile failed: %u\n" , - __func__, err); +pr_err ("%s: ide_no_data_taskfile failed: %u\n" , + __func__, err); rc = err; } }
@@ -435,11 +434,9 @@ void ide_acpi_get_timing(ide_hwif_t *hwif)if (!out_obj->buffer.length || !out_obj->buffer.pointer || out_obj->buffer.length !=sizeof (struct GTM_buffer )) {kfree (output.pointer); -printk (KERN_ERR -"%s: unexpected _GTM length (0x%x)[should be 0x%zx] or " -"addr (0x%p)\n" , - __func__, out_obj->buffer.length, -sizeof (struct GTM_buffer ), out_obj->buffer.pointer); +pr_err ("%s: unexpected _GTM length (0x%x)[should be 0x%zx] or addr (0x%p)\n" , + __func__, out_obj->buffer.length, +sizeof (struct GTM_buffer ), out_obj->buffer.pointer);return ; }
drivers/ide/ide-atapi.c +30 -31
122 lines not on this page · raw message
drivers/ide/ide-cd.c +18 -25
109 lines not on this page · raw message
drivers/ide/ide-cd_ioctl.c +1 -2
@@ -155,8 +155,7 @@ int ide_cd_lockdoor(ide_drive_t *drive, int lockflag,if (stat !=0 && sense->sense_key ==ILLEGAL_REQUEST && (sense->asc ==0x24 || sense->asc ==0x20 )) { -printk (KERN_ERR "%s: door locking not supported\n" , - drive->name); +pr_err ("%s: door locking not supported\n" , drive->name); drive->dev_flags &= ~IDE_DFLAG_DOORLOCKING ; stat =0 ; }
drivers/ide/ide-cd_verbose.c +13 -15
@@ -22,10 +22,10 @@ void ide_cd_log_error(const char *name, struct request *failed_command, sense->asc == 0x3a)))return ; -printk (KERN_ERR "%s: error code: 0x%02x sense_key: 0x%02x " -"asc: 0x%02x ascq: 0x%02x\n" , - name, sense->error_code, sense->sense_key, - sense->asc, sense->ascq); +pr_err ("%s: error code: 0x%02x sense_key: 0x%02x " +"asc: 0x%02x ascq: 0x%02x\n" , + name, sense->error_code, sense->sense_key, + sense->asc, sense->ascq); }#else /* The generic packet command opcodes for CD/DVD Logical Units,
@@ -255,7 +255,7 @@ void ide_cd_log_error(const char *name, struct request *failed_command,const char *s ="bad sense key!" ;char buf[80 ]; -printk (KERN_ERR "ATAPI device %s:\n" , name); +pr_err ("ATAPI device %s:\n" , name);if (sense->error_code ==0x70 )printk (KERN_CONT " Error: " );else if (sense->error_code ==0x71 )
@@ -303,8 +303,8 @@ void ide_cd_log_error(const char *name, struct request *failed_command, s ="(reserved error code)" ; } -printk (KERN_ERR " %s -- (asc=0x%02x, ascq=0x%02x)\n" , - s, sense->asc, sense->ascq); +pr_err (" %s -- (asc=0x%02x, ascq=0x%02x)\n" , + s, sense->asc, sense->ascq);if (failed_command !=NULL ) {int lo =0 , mid, hi =ARRAY_SIZE (packet_command_texts);
@@ -324,8 +324,7 @@ void ide_cd_log_error(const char *name, struct request *failed_command, lo = mid +1 ; } -printk (KERN_ERR " The failed \"%s\" packet command " -"was: \n \"" , s); +pr_err (" The failed \"%s\" packet command was: \n \"" , s);for (i =0 ; i <BLK_MAX_CDB ; i++)printk (KERN_CONT "%02x " , failed_command->cmd[i]);printk (KERN_CONT "\"\n" );
@@ -339,16 +338,15 @@ void ide_cd_log_error(const char *name, struct request *failed_command,if (sense->sense_key ==NOT_READY && (sense->sks[0 ] &0x80 )) {int progress = (sense->sks[1 ] <<8 | sense->sks[2 ]) *100 ; -printk (KERN_ERR " Command is %02d%% complete\n" , - progress /0xffff ); +pr_err (" Command is %02d%% complete\n" , progress /0xffff ); }if (sense->sense_key ==ILLEGAL_REQUEST && (sense->sks[0 ] &0x80 ) !=0 ) { -printk (KERN_ERR " Error in %s byte %d" , - (sense->sks[0 ] &0x40 ) !=0 ? -"command packet" :"command data" , - (sense->sks[1 ] <<8 ) + sense->sks[2 ]); +pr_err (" Error in %s byte %d" , + (sense->sks[0 ] &0x40 ) !=0 ? +"command packet" :"command data" , + (sense->sks[1 ] <<8 ) + sense->sks[2 ]);if ((sense->sks[0 ] &0x40 ) !=0 )printk (KERN_CONT " bit %d" , sense->sks[0 ] &0x07 );
drivers/ide/ide-cs.c +3 -4
@@ -166,14 +166,13 @@ static struct ide_host *idecs_register(unsigned long io, unsigned long ctl,hw_regs_t hw, *hws[] = { &hw,NULL ,NULL ,NULL };if (!request_region (io,8 ,DRV_NAME )) { -printk (KERN_ERR "%s: I/O resource 0x%lX-0x%lX not free.\n" , -DRV_NAME , io, io +7 ); +pr_err ("%s: I/O resource 0x%lX-0x%lX not free.\n" , +DRV_NAME , io, io +7 );return NULL ; }if (!request_region (ctl,1 ,DRV_NAME )) { -printk (KERN_ERR "%s: I/O resource 0x%lX not free.\n" , -DRV_NAME , ctl); +pr_err ("%s: I/O resource 0x%lX not free.\n" ,DRV_NAME , ctl);release_region (io,8 );return NULL ; }
drivers/ide/ide-disk.c +2 -2
@@ -694,8 +694,8 @@ static void ide_disk_setup(ide_drive_t *drive)if ((drive->dev_flags &IDE_DFLAG_LBA ) ==0 && (drive->head ==0 || drive->head >16 )) { -printk (KERN_ERR "%s: invalid geometry: %d physical heads?\n" , - drive->name, drive->head); +pr_err ("%s: invalid geometry: %d physical heads?\n" , + drive->name, drive->head); drive->dev_flags &= ~IDE_DFLAG_ATTACH ; }else drive->dev_flags |=IDE_DFLAG_ATTACH ;
drivers/ide/ide-dma-sff.c +2 -2
@@ -162,8 +162,8 @@ int ide_build_dmatable(ide_drive_t *drive, struct ide_cmd *cmd) } use_pio_instead: -printk (KERN_ERR "%s: %s\n" , drive->name, - count ?"DMA table too small" :"empty DMA table?" ); +pr_err ("%s: %s\n" , drive->name, + count ?"DMA table too small" :"empty DMA table?" );return 0 ;/* revert to PIO for this request */ }
drivers/ide/ide-dma.c +6 -7
@@ -106,8 +106,8 @@ ide_startstop_t ide_dma_intr(ide_drive_t *drive) cmd->rq->nr_sectors << 9);return ide_stopped; } -printk (KERN_ERR "%s: %s: bad DMA status (0x%02x)\n" , - drive->name, __func__, dma_stat); +pr_err ("%s: %s: bad DMA status (0x%02x)\n" , + drive->name, __func__, dma_stat); }return ide_error (drive,"dma_intr" , stat); }
@@ -409,7 +409,7 @@ int ide_id_dma_bug(ide_drive_t *drive)return 0 ; err_out: -printk (KERN_ERR "%s: bad DMA info in identify block\n" , drive->name); +pr_err ("%s: bad DMA info in identify block\n" , drive->name);return 1 ; }
@@ -456,7 +456,7 @@ void ide_check_dma_crc(ide_drive_t *drive)void ide_dma_lost_irq (ide_drive_t *drive) { -printk (KERN_ERR "%s: DMA interrupt recovery\n" , drive->name); +pr_err ("%s: DMA interrupt recovery\n" , drive->name); }EXPORT_SYMBOL_GPL (ide_dma_lost_irq);
@@ -488,7 +488,7 @@ ide_startstop_t ide_dma_timeout_retry(ide_drive_t *drive, int error)printk (KERN_WARNING "%s: DMA timeout retry\n" , drive->name);if (dma_ops->dma_clear) dma_ops->dma_clear (drive); -printk (KERN_ERR "%s: timeout waiting for DMA\n" , drive->name); +pr_err ("%s: timeout waiting for DMA\n" , drive->name);if (dma_ops->dma_test_irq (drive) ==0 ) {ide_dump_status (drive,"DMA timeout" , hwif->tp_ops->read_status (hwif));
@@ -557,8 +557,7 @@ int ide_allocate_dma_engine(ide_hwif_t *hwif) &hwif->dmatable_dma, GFP_ATOMIC);if (hwif->dmatable_cpu ==NULL ) { -printk (KERN_ERR "%s: unable to allocate PRD table\n" , - hwif->name); +pr_err ("%s: unable to allocate PRD table\n" , hwif->name);return -ENOMEM ; }
drivers/ide/ide-eh.c +7 -7
@@ -182,8 +182,8 @@ static ide_startstop_t atapi_reset_pollfunc(ide_drive_t *drive) }/* end of polling */ hwif->polling =0 ; -printk (KERN_ERR "%s: ATAPI reset timed-out, status=0x%02x\n" , - drive->name, stat); +pr_err ("%s: ATAPI reset timed-out, status=0x%02x\n" , + drive->name, stat);/* do it the old fashioned way */ return do_reset1 (drive,1 ); }
@@ -202,7 +202,7 @@ static void ide_reset_report_error(ide_hwif_t *hwif, u8 err)u8 err_master = err &0x7f ; -printk (KERN_ERR "%s: reset: master: " , hwif->name); +pr_err ("%s: reset: master: " , hwif->name);if (err_master && err_master <6 )printk (KERN_CONT "%s" , err_master_vals[err_master]);else
@@ -228,8 +228,8 @@ static ide_startstop_t reset_pollfunc(ide_drive_t *drive)if (port_ops && port_ops->reset_poll) { err = port_ops->reset_poll (drive);if (err) { -printk (KERN_ERR "%s: host reset_poll failure for %s.\n" , - hwif->name, drive->name); +pr_err ("%s: host reset_poll failure for %s.\n" , + hwif->name, drive->name); goto out; } }
@@ -242,8 +242,8 @@ static ide_startstop_t reset_pollfunc(ide_drive_t *drive)/* continue polling */ return ide_started; } -printk (KERN_ERR "%s: reset timed-out, status=0x%02x\n" , - hwif->name, tmp); +pr_err ("%s: reset timed-out, status=0x%02x\n" , + hwif->name, tmp); drive->failures++; err = -EIO ; }else {
drivers/ide/ide-floppy.c +14 -16
@@ -94,8 +94,7 @@ static int ide_floppy_callback(ide_drive_t *drive, int dsc)"ascq = %x" , floppy->sense_key, floppy->asc, floppy->ascq); }else - printk(KERN_ERR PFX "Error in REQUEST SENSE itself - " -"Aborting request!\n" ); +pr_err (PFX "Error in REQUEST SENSE itself - Aborting request!\n" ); }if (blk_special_request (rq))
@@ -113,10 +112,10 @@ static void ide_floppy_report_error(struct ide_disk_obj *floppy, floppy->ascq == 0x00)return ; - printk(KERN_ERR PFX "%s: I/O error, pc = %2x, key = %2x, " -"asc = %2x, ascq = %2x\n" , - floppy->drive->name, pc->c[0 ], floppy->sense_key, - floppy->asc, floppy->ascq); +pr_err (PFX "%s: I/O error, pc = %2x, key = %2x, " +"asc = %2x, ascq = %2x\n" , + floppy->drive->name, pc->c[0 ], floppy->sense_key, + floppy->asc, floppy->ascq); }
@@ -178,7 +177,7 @@ void ide_floppy_create_mode_sense_cmd(struct ide_atapi_pc *pc, u8 page_code) length +=32 ;break ;default : - printk(KERN_ERR PFX "unsupported page code in %s\n", __func__); +pr_err (PFX "unsupported page code in %s\n" , __func__); }put_unaligned (cpu_to_be16 (length), (u16 *) &pc->c[7 ]); pc->req_xfer = length;
@@ -247,7 +246,7 @@ static ide_startstop_t ide_floppy_do_request(ide_drive_t *drive,ide_floppy_report_error (floppy, drive->failed_pc); drive->failed_pc =NULL ; }else - printk(KERN_ERR PFX "%s: I/O error\n", drive->name); +pr_err (PFX "%s: I/O error\n" , drive->name);if (blk_special_request (rq)) { rq->errors =0 ;
@@ -259,8 +258,8 @@ static ide_startstop_t ide_floppy_do_request(ide_drive_t *drive,if (blk_fs_request (rq)) {if (((long )rq->sector % floppy->bs_factor) || (rq->nr_sectors % floppy->bs_factor)) { - printk(KERN_ERR PFX "%s: unsupported r/w rq size\n", - drive->name); +pr_err (PFX "%s: unsupported r/w rq size\n" , + drive->name); goto out_end; } pc = &floppy->queued_pc;
@@ -315,7 +314,7 @@ static int ide_floppy_get_flexible_disk_page(ide_drive_t *drive,ide_floppy_create_mode_sense_cmd (pc,IDEFLOPPY_FLEXIBLE_DISK_PAGE );if (ide_queue_pc_tail (drive, disk, pc)) { - printk(KERN_ERR PFX "Can't get flexible disk page params\n"); +pr_err (PFX "Can't get flexible disk page params\n" );return 1 ; }
@@ -387,7 +386,7 @@ static int ide_floppy_get_capacity(ide_drive_t *drive) pc.buf_size =sizeof (pc_buf);if (ide_queue_pc_tail (drive, disk, &pc)) { - printk(KERN_ERR PFX "Can't get floppy parameters\n"); +pr_err (PFX "Can't get floppy parameters\n" );return 1 ; } header_len = pc.buf[3 ];
@@ -450,12 +449,11 @@ static int ide_floppy_get_capacity(ide_drive_t *drive)* This is a KERN_ERR so it appears on screen * for the user to see */ - printk(KERN_ERR PFX "%s: No disk in drive\n", - drive->name); +pr_err (PFX "%s: No disk in drive\n" , drive->name);break ;case CAPACITY_INVALID : - printk(KERN_ERR PFX "%s: Invalid capacity for disk " - "in drive\n", drive->name); +pr_err (PFX "%s: Invalid capacity for disk in drive\n" , + drive->name);break ; } ide_debug_log(IDE_DBG_PROBE, "Descriptor 0 Code: %d",
drivers/ide/ide-floppy_ioctl.c +1 -1
@@ -51,7 +51,7 @@ static int ide_floppy_get_format_capacities(ide_drive_t *drive, pc->buf_size =sizeof (pc_buf);if (ide_queue_pc_tail (drive, floppy->disk, pc)) { -printk (KERN_ERR "ide-floppy: Can't get floppy parameters\n" ); +pr_err ("ide-floppy: Can't get floppy parameters\n" );return -EIO ; }
drivers/ide/ide-gd.c +4 -4
@@ -340,15 +340,15 @@ static int ide_gd_probe(ide_drive_t *drive) goto failed;if (disk_ops->check (drive,DRV_NAME ) ==0 ) { - printk(KERN_ERR PFX "%s: not supported by this driver\n", - drive->name); +pr_err (PFX "%s: not supported by this driver\n" , + drive->name); goto failed; } idkp =kzalloc (sizeof (*idkp),GFP_KERNEL );if (!idkp) { - printk(KERN_ERR PFX "%s: can't allocate a disk structure\n", - drive->name); +pr_err (PFX "%s: can't allocate a disk structure\n" , + drive->name); goto failed; }
drivers/ide/ide-generic.c +4 -6
@@ -109,17 +109,15 @@ static int __init ide_generic_init(void)if ((probe_mask & (1 << i)) && io_addr) {if (!request_region (io_addr,8 ,DRV_NAME )) { -printk (KERN_ERR "%s: I/O resource 0x%lX-0x%lX " -"not free.\n" , -DRV_NAME , io_addr, io_addr +7 ); +pr_err ("%s: I/O resource 0x%lX-0x%lX not free.\n" , +DRV_NAME , io_addr, io_addr +7 ); rc = -EBUSY ;continue ; }if (!request_region (io_addr +0x206 ,1 ,DRV_NAME )) { -printk (KERN_ERR "%s: I/O resource 0x%lX " -"not free.\n" , -DRV_NAME , io_addr +0x206 ); +pr_err ("%s: I/O resource 0x%lX not free.\n" , +DRV_NAME , io_addr +0x206 );release_region (io_addr,8 ); rc = -EBUSY ;continue ;
drivers/ide/ide-h8300.c +1 -1
@@ -99,7 +99,7 @@ static int __init h8300_ide_init(void)return ide_host_add (&h8300_port_info, hws,NULL ); out_busy: -printk (KERN_ERR "ide-h8300: IDE I/F resource already used.\n" ); +pr_err ("ide-h8300: IDE I/F resource already used.\n" );return -EBUSY ; }
drivers/ide/ide-io.c +5 -7
@@ -95,8 +95,7 @@ void ide_complete_cmd(ide_drive_t *drive, struct ide_cmd *cmd, u8 stat, u8 err)if ((cmd->tf_flags &IDE_TFLAG_CUSTOM_HANDLER ) && tf_cmd ==ATA_CMD_IDLEIMMEDIATE ) {if (tf->lbal !=0xc4 ) { -printk (KERN_ERR "%s: head unload failed!\n" , - drive->name); +pr_err ("%s: head unload failed!\n" , drive->name);ide_tf_dump (drive->name, cmd); }else drive->dev_flags |=IDE_DFLAG_PARKED ;
@@ -204,7 +203,7 @@ static ide_startstop_t ide_disk_special(ide_drive_t *drive) }else if (s->all) {int special = s->all; s->all =0 ; -printk (KERN_ERR "%s: bad special flag: 0x%02x\n" , drive->name, special); +pr_err ("%s: bad special flag: 0x%02x\n" , drive->name, special);return ide_stopped; }
@@ -355,7 +354,7 @@ static ide_startstop_t start_request (ide_drive_t *drive, struct request *rq) drive->hwif->tp_ops->dev_select (drive);if (ide_wait_stat (&startstop, drive, drive->ready_stat,ATA_BUSY |ATA_DRQ ,WAIT_READY )) { -printk (KERN_ERR "%s: drive not ready for command\n" , drive->name); +pr_err ("%s: drive not ready for command\n" , drive->name);return startstop; }if (!drive->special.all) {
@@ -749,9 +748,8 @@ static void unexpected_intr(int irq, ide_hwif_t *hwif)if (time_after (jiffies, last_msgtime +HZ )) { last_msgtime = jiffies; -printk (KERN_ERR "%s: unexpected interrupt, " -"status=0x%02x, count=%ld\n" , - hwif->name, stat, count); +pr_err ("%s: unexpected interrupt, status=0x%02x, count=%ld\n" , + hwif->name, stat, count); } } }
drivers/ide/ide-iops.c +1 -1
@@ -299,7 +299,7 @@ int ide_driveid_update(ide_drive_t *drive) out_err:SELECT_MASK (drive,0 );if (rc ==2 ) -printk (KERN_ERR "%s: %s: bad status\n" , drive->name, __func__); +pr_err ("%s: %s: bad status\n" , drive->name, __func__);kfree (id);return 0 ; }
drivers/ide/ide-legacy.c +4 -4
@@ -19,14 +19,14 @@ static void ide_legacy_init_one(hw_regs_t **hws, hw_regs_t *hw, }if (!request_region (base,8 , d->name)) { -printk (KERN_ERR "%s: I/O resource 0x%lX-0x%lX not free.\n" , - d->name, base, base +7 ); +pr_err ("%s: I/O resource 0x%lX-0x%lX not free.\n" , + d->name, base, base +7 );return ; }if (!request_region (ctl,1 , d->name)) { -printk (KERN_ERR "%s: I/O resource 0x%lX not free.\n" , - d->name, ctl); +pr_err ("%s: I/O resource 0x%lX not free.\n" , + d->name, ctl);release_region (base,8 );return ; }
drivers/ide/ide-lib.c +5 -5
@@ -42,7 +42,7 @@ static void ide_dump_opcode(ide_drive_t *drive)if (rq->cmd_type ==REQ_TYPE_ATA_TASKFILE ) cmd = rq->special; -printk (KERN_ERR "ide: failed opcode was: " ); +pr_err ("ide: failed opcode was: " );if (cmd ==NULL )printk (KERN_CONT "unknown\n" );else
@@ -91,7 +91,7 @@ static void ide_dump_sector(ide_drive_t *drive)static void ide_dump_ata_error (ide_drive_t *drive,u8 err) { -printk (KERN_ERR "{ " ); +pr_err ("{ " );if (err &ATA_ABORTED )printk (KERN_CONT "DriveStatusError " );if (err &ATA_ICRC )
@@ -121,7 +121,7 @@ static void ide_dump_ata_error(ide_drive_t *drive, u8 err)static void ide_dump_atapi_error (ide_drive_t *drive,u8 err) { -printk (KERN_ERR "{ " ); +pr_err ("{ " );if (err &ATAPI_ILI )printk (KERN_CONT "IllegalLengthIndication " );if (err &ATAPI_EOM )
@@ -151,7 +151,7 @@ u8 ide_dump_status(ide_drive_t *drive, const char *msg, u8 stat) {u8 err =0 ; -printk (KERN_ERR "%s: %s: status=0x%02x { " , drive->name, msg, stat); +pr_err ("%s: %s: status=0x%02x { " , drive->name, msg, stat);if (stat &ATA_BUSY )printk (KERN_CONT "Busy " );else {
@@ -173,7 +173,7 @@ u8 ide_dump_status(ide_drive_t *drive, const char *msg, u8 stat)printk (KERN_CONT "}\n" );if ((stat & (ATA_BUSY |ATA_ERR )) ==ATA_ERR ) { err =ide_read_error (drive); -printk (KERN_ERR "%s: %s: error=0x%02x " , drive->name, msg, err); +pr_err ("%s: %s: error=0x%02x " , drive->name, msg, err);if (drive->media == ide_disk)ide_dump_ata_error (drive, err);else
drivers/ide/ide-pnp.c +4 -4
@@ -47,14 +47,14 @@ static int idepnp_probe(struct pnp_dev *dev, const struct pnp_device_id *dev_id) ctl =pnp_port_start (dev,1 );if (!request_region (base,8 ,DRV_NAME )) { -printk (KERN_ERR "%s: I/O resource 0x%lX-0x%lX not free.\n" , -DRV_NAME , base, base +7 ); +pr_err ("%s: I/O resource 0x%lX-0x%lX not free.\n" , +DRV_NAME , base, base +7 );return -EBUSY ; }if (!request_region (ctl,1 ,DRV_NAME )) { -printk (KERN_ERR "%s: I/O resource 0x%lX not free.\n" , -DRV_NAME , ctl); +pr_err ("%s: I/O resource 0x%lX not free.\n" , +DRV_NAME , ctl);release_region (base,8 );return -EBUSY ; }
drivers/ide/ide-probe.c +12 -13
@@ -414,8 +414,8 @@ static int do_probe (ide_drive_t *drive, u8 cmd)return 4 ;if (rc ==1 && cmd ==ATA_CMD_ID_ATAPI ) { -printk (KERN_ERR "%s: no response (status = 0x%02x), " -"resetting drive\n" , drive->name, stat); +pr_err ("%s: no response (status = 0x%02x), resetting drive\n" , + drive->name, stat);msleep (50 ); tp_ops->dev_select (drive);msleep (50 );
@@ -428,8 +428,8 @@ static int do_probe (ide_drive_t *drive, u8 cmd) stat = tp_ops->read_status (hwif);if (rc ==1 ) -printk (KERN_ERR "%s: no response (status = 0x%02x)\n" , - drive->name, stat); +pr_err ("%s: no response (status = 0x%02x)\n" , + drive->name, stat); }else {/* not present or maybe ATAPI */ rc =3 ;
@@ -475,7 +475,7 @@ static u8 probe_for_drive(ide_drive_t *drive) drive->id =kzalloc (SECTOR_SIZE ,GFP_KERNEL );if (drive->id ==NULL ) { -printk (KERN_ERR "ide: out of memory for id data.\n" ); +pr_err ("ide: out of memory for id data.\n" );return 0 ; }
@@ -813,8 +813,7 @@ static int ide_port_setup_devices(ide_hwif_t *hwif)mutex_lock (&ide_cfg_mtx);ide_port_for_each_present_dev (i, drive, hwif) {if (ide_init_queue (drive)) { -printk (KERN_ERR "ide: failed to init %s\n" , - drive->name); +pr_err ("ide: failed to init %s\n" , drive->name);kfree (drive->id); drive->id =NULL ; drive->dev_flags &= ~IDE_DFLAG_PRESENT ;
@@ -956,7 +955,7 @@ static void drive_release_dev (struct device *dev)static int hwif_init (ide_hwif_t *hwif) {if (!hwif->irq) { -printk (KERN_ERR "%s: disabled, no IRQ\n" , hwif->name); +pr_err ("%s: disabled, no IRQ\n" , hwif->name);return 0 ; }
@@ -969,15 +968,15 @@ static int hwif_init(ide_hwif_t *hwif) hwif->sg_table =kmalloc (sizeof (struct scatterlist )*hwif->sg_max_nents,GFP_KERNEL );if (!hwif->sg_table) { -printk (KERN_ERR "%s: unable to allocate SG table.\n" , hwif->name); +pr_err ("%s: unable to allocate SG table.\n" , hwif->name); goto out; }sg_init_table (hwif->sg_table, hwif->sg_max_nents);if (init_irq (hwif)) { -printk (KERN_ERR "%s: disabled, unable to get IRQ %d\n" , - hwif->name, hwif->irq); +pr_err ("%s: disabled, unable to get IRQ %d\n" , + hwif->name, hwif->irq); goto out; }
@@ -1284,8 +1283,8 @@ struct ide_host *ide_host_alloc(const struct ide_port_info *d, hw_regs_t **hws) idx =ide_find_port_slot (d);if (idx <0 ) { -printk (KERN_ERR "%s: no free slot for interface\n" , - d ? d->name :"ide" ); +pr_err ("%s: no free slot for interface\n" , + d ? d->name :"ide" );kfree (hwif);continue ; }
drivers/ide/ide-scan-pci.c +2 -2
@@ -101,8 +101,8 @@ static int __init ide_scan_pcibus(void) d = list_entry(l, struct pci_driver, node);if (__pci_register_driver (d, d->driver.owner, d->driver.mod_name)) -printk (KERN_ERR "%s: failed to register %s driver\n" , - __func__, d->driver.mod_name); +pr_err ("%s: failed to register %s driver\n" , + __func__, d->driver.mod_name); }return 0 ;
drivers/ide/ide-tape.c +36 -50
233 lines not on this page · raw message
drivers/ide/ide-taskfile.c +12 -14
@@ -86,7 +86,7 @@ ide_startstop_t do_rw_taskfile(ide_drive_t *drive, struct ide_cmd *orig_cmd)if (orig_cmd->protocol ==ATA_PROT_PIO && (orig_cmd->tf_flags &IDE_TFLAG_MULTI_PIO ) && drive->mult_count ==0 ) { -printk (KERN_ERR "%s: multimode not set!\n" , drive->name); +pr_err ("%s: multimode not set!\n" , drive->name);return ide_stopped; }
@@ -215,7 +215,7 @@ static u8 wait_drive_not_busy(ide_drive_t *drive) }if (stat &ATA_BUSY ) -printk (KERN_ERR "%s: drive still BUSY!\n" , drive->name); +pr_err ("%s: drive still BUSY!\n" , drive->name);return stat; }
@@ -399,10 +399,10 @@ static ide_startstop_t pre_task_out_intr(ide_drive_t *drive,if (ide_wait_stat (&startstop, drive,ATA_DRQ , drive->bad_wstat,WAIT_DRQ )) { -printk (KERN_ERR "%s: no DRQ after issuing %sWRITE%s\n" , - drive->name, - (cmd->tf_flags &IDE_TFLAG_MULTI_PIO ) ?"MULT" :"" , - (drive->dev_flags &IDE_DFLAG_LBA48 ) ?"_EXT" :"" ); +pr_err ("%s: no DRQ after issuing %sWRITE%s\n" , + drive->name, + (cmd->tf_flags &IDE_TFLAG_MULTI_PIO ) ?"MULT" :"" , + (drive->dev_flags &IDE_DFLAG_LBA48 ) ?"_EXT" :"" );return startstop; }
@@ -576,9 +576,8 @@ int ide_taskfile_ioctl(ide_drive_t *drive, unsigned long arg)case TASKFILE_MULTI_OUT :if (!drive->mult_count) {/* (hs): give up if multcount is not set */ -printk (KERN_ERR "%s: %s Multimode Write " \ -"multcount is not set\n" , - drive->name, __func__); +pr_err ("%s: %s Multimode Write multcount is not set\n" , + drive->name, __func__); err = -EPERM ; goto abort; }
@@ -596,9 +595,8 @@ int ide_taskfile_ioctl(ide_drive_t *drive, unsigned long arg)case TASKFILE_MULTI_IN :if (!drive->mult_count) {/* (hs): give up if multcount is not set */ -printk (KERN_ERR "%s: %s Multimode Read failure " \ -"multcount is not set\n" , - drive->name, __func__); +pr_err ("%s: %s Multimode Read failure multcount is not set\n" , + drive->name, __func__); err = -EPERM ; goto abort; }
@@ -626,8 +624,8 @@ int ide_taskfile_ioctl(ide_drive_t *drive, unsigned long arg) nsect = (cmd.hob.nsect <<8 ) | cmd.tf.nsect;if (!nsect) { -printk (KERN_ERR "%s: in/out command without data\n" , - drive->name); +pr_err ("%s: in/out command without data\n" , + drive->name); err = -EFAULT ; goto abort; }
drivers/ide/it821x.c +1 -1
@@ -650,7 +650,7 @@ static int __devinit it821x_init_one(struct pci_dev *dev, const struct pci_devic itdevs =kzalloc (2 *sizeof (*itdevs),GFP_KERNEL );if (itdevs ==NULL ) { - printk(KERN_ERR DRV_NAME " %s: out of memory\n", pci_name(dev)); +pr_err (DRV_NAME " %s: out of memory\n" ,pci_name (dev));return -ENOMEM ; }
drivers/ide/palm_bk3710.c +4 -4
@@ -329,25 +329,25 @@ static int __init palm_bk3710_probe(struct platform_device *pdev) mem =platform_get_resource (pdev,IORESOURCE_MEM ,0 );if (mem ==NULL ) { -printk (KERN_ERR "failed to get memory region resource\n" ); +pr_err ("failed to get memory region resource\n" );return -ENODEV ; } irq =platform_get_resource (pdev,IORESOURCE_IRQ ,0 );if (irq ==NULL ) { -printk (KERN_ERR "failed to get IRQ resource\n" ); +pr_err ("failed to get IRQ resource\n" );return -ENODEV ; } mem_size = mem->end - mem->start +1 ;if (request_mem_region (mem->start, mem_size,"palm_bk3710" ) ==NULL ) { -printk (KERN_ERR "failed to request memory region\n" ); +pr_err ("failed to request memory region\n" );return -EBUSY ; } base =ioremap (mem->start, mem_size);if (!base) { -printk (KERN_ERR "failed to map IO memory\n" ); +pr_err ("failed to map IO memory\n" );release_mem_region (mem->start, mem_size);return -ENOMEM ; }
drivers/ide/pdc202xx_new.c +5 -6
@@ -365,8 +365,8 @@ static int init_chipset_pdcnew(struct pci_dev *dev)/* Sanity check */ if (unlikely (pll_input <5000000L || pll_input >70000000L )) { -printk (KERN_ERR "%s %s: Bad PLL input clock %ld Hz, giving up!" -"\n" , name,pci_name (dev), pll_input); +pr_err ("%s %s: Bad PLL input clock %ld Hz, giving up!\n" , + name,pci_name (dev), pll_input); goto out; }
@@ -402,8 +402,8 @@ static int init_chipset_pdcnew(struct pci_dev *dev) r =0x00 ; }else {/* Invalid ratio */ -printk (KERN_ERR "%s %s: Bad ratio %ld, giving up!\n" , - name,pci_name (dev), ratio); +pr_err ("%s %s: Bad ratio %ld, giving up!\n" , + name,pci_name (dev), ratio); goto out; }
@@ -413,8 +413,7 @@ static int init_chipset_pdcnew(struct pci_dev *dev)if (unlikely (f <0 || f >127 )) {/* Invalid F */ -printk (KERN_ERR "%s %s: F[%d] invalid!\n" , - name,pci_name (dev), f); +pr_err ("%s %s: F[%d] invalid!\n" , name,pci_name (dev), f); goto out; }
drivers/ide/pmac.c +15 -16
@@ -571,8 +571,8 @@ pmac_ide_set_pio_mode(ide_drive_t *drive, const u8 pio) }#ifdef IDE_PMAC_DEBUG -printk (KERN_ERR "%s: Set PIO timing for mode %d, reg: 0x%08x\n" , - drive->name, pio, *timings); +pr_err ("%s: Set PIO timing for mode %d, reg: 0x%08x\n" , + drive->name, pio, *timings);#endif *timings = t;
@@ -600,8 +600,8 @@ set_timings_udma_ata4(u32 *timings, u8 speed) (addrTicks <<TR_66_UDMA_ADDRSETUP_SHIFT ) |TR_66_UDMA_EN ;#ifdef IDE_PMAC_DEBUG -printk (KERN_ERR "ide_pmac: Set UDMA timing for mode %d, reg: 0x%08x\n" , - speed &0xf , *timings); +pr_err ("ide_pmac: Set UDMA timing for mode %d, reg: 0x%08x\n" , + speed &0xf , *timings);#endif return 0 ;
@@ -702,8 +702,8 @@ set_timings_mdma(ide_drive_t *drive, int intf_type, u32 *timings, u32 *timings2, recTime = tm[i].recoveryTime;#ifdef IDE_PMAC_DEBUG -printk (KERN_ERR "%s: MDMA, cycleTime: %d, accessTime: %d, recTime: %d\n" , - drive->name, cycleTime, accessTime, recTime); +pr_err ("%s: MDMA, cycleTime: %d, accessTime: %d, recTime: %d\n" , + drive->name, cycleTime, accessTime, recTime);#endif }switch (intf_type) {
@@ -775,8 +775,8 @@ set_timings_mdma(ide_drive_t *drive, int intf_type, u32 *timings, u32 *timings2, } }#ifdef IDE_PMAC_DEBUG -printk (KERN_ERR "%s: Set MDMA timing for mode %d, reg: 0x%08x\n" , - drive->name, speed &0xf , *timings); +pr_err ("%s: Set MDMA timing for mode %d, reg: 0x%08x\n" , + drive->name, speed &0xf , *timings);#endif }
@@ -1159,8 +1159,8 @@ pmac_ide_macio_attach(struct macio_dev *mdev, const struct of_device_id *match)/* Request memory resource for IO ports */ if (macio_request_resource (mdev,0 ,"ide-pmac (ports)" )) { -printk (KERN_ERR "ide-pmac: can't request MMIO resource for " -"%s!\n" , mdev->ofdev.node->full_name); +pr_err ("ide-pmac: can't request MMIO resource for %s!\n" , + mdev->ofdev.node->full_name); rc = -EBUSY ; goto out_free_pmif; }
@@ -1272,7 +1272,7 @@ pmac_ide_pci_attach(struct pci_dev *pdev, const struct pci_device_id *id) np =pci_device_to_OF_node (pdev);if (np ==NULL ) { -printk (KERN_ERR "ide-pmac: cannot find MacIO node for Kauai ATA interface\n" ); +pr_err ("ide-pmac: cannot find MacIO node for Kauai ATA interface\n" );return -ENODEV ; }
@@ -1289,8 +1289,8 @@ pmac_ide_pci_attach(struct pci_dev *pdev, const struct pci_device_id *id)pci_set_master (pdev);if (pci_request_regions (pdev,"Kauai ATA" )) { -printk (KERN_ERR "ide-pmac: Cannot obtain PCI resources for " -"%s\n" , np->full_name); +pr_err ("ide-pmac: Cannot obtain PCI resources for %s\n" , + np->full_name); rc = -ENXIO ; goto out_free_pmif; }
@@ -1649,7 +1649,7 @@ pmac_ide_dma_lost_irq (ide_drive_t *drive)volatile struct dbdma_regs __iomem *dma = pmif->dma_regs;unsigned long status =readl (&dma->status); -printk (KERN_ERR "ide-pmac lost interrupt, dma status: %lx\n" , status); +pr_err ("ide-pmac lost interrupt, dma status: %lx\n" , status); }static const struct ide_dma_ops pmac_dma_ops = {
@@ -1687,8 +1687,7 @@ static int __devinit pmac_ide_init_dma(ide_hwif_t *hwif, (MAX_DCMDS +2 ) *sizeof (struct dbdma_cmd ), &hwif->dmatable_dma);if (pmif->dma_table_cpu ==NULL ) { -printk (KERN_ERR "%s: unable to allocate DMA command list\n" , - hwif->name); +pr_err ("%s: unable to allocate DMA command list\n" , hwif->name);return -ENOMEM ; }
drivers/ide/qd65xx.c +3 -3
@@ -277,9 +277,9 @@ static int __init qd_testreg(int port)local_irq_restore (flags);if (savereg ==QD_TESTVAL ) { -printk (KERN_ERR "Outch ! the probe for qd65xx isn't reliable !\n" ); -printk (KERN_ERR "Please contact maintainers to tell about your hardware\n" ); -printk (KERN_ERR "Assuming qd65xx is not present.\n" ); +pr_err ("Outch ! the probe for qd65xx isn't reliable !\n" ); +pr_err ("Please contact maintainers to tell about your hardware\n" ); +pr_err ("Assuming qd65xx is not present.\n" );return 1 ; }
drivers/ide/scc_pata.c +1 -1
@@ -528,7 +528,7 @@ static int setup_mmio_scc (struct pci_dev *dev, const char *name) ret =pci_request_selected_regions (dev, (1 <<2 ) -1 , name);if (ret <0 ) { -printk (KERN_ERR "%s: can't reserve resources\n" , name); +pr_err ("%s: can't reserve resources\n" , name);return ret; }
drivers/ide/setup-pci.c +20 -22
99 lines not on this page · raw message
drivers/ide/sgiioc4.c +18 -28
113 lines not on this page · raw message
drivers/ide/tc86c001.c +1 -1
@@ -212,7 +212,7 @@ static int __devinit tc86c001_init_one(struct pci_dev *dev, rc =pci_request_region (dev,5 ,DRV_NAME );if (rc) { - printk(KERN_ERR DRV_NAME ": system control regs already in use"); +pr_err (DRV_NAME ": system control regs already in use\n" ); goto out_disable; }
drivers/ide/tx4939ide.c +2 -2
@@ -276,8 +276,8 @@ static int tx4939ide_build_dmatable(ide_drive_t *drive, struct ide_cmd *cmd) } use_pio_instead: -printk (KERN_ERR "%s: %s\n" , drive->name, - count ?"DMA table too small" :"empty DMA table?" ); +pr_err ("%s: %s\n" , drive->name, + count ?"DMA table too small" :"empty DMA table?" );return 0 ;/* revert to PIO for this request */ }
drivers/ide/umc8672.c +3 -3
@@ -114,7 +114,7 @@ static void umc_set_pio_mode(ide_drive_t *drive, const u8 pio)if (mate)spin_lock_irqsave (&mate->lock, flags);if (mate && mate->handler) { -printk (KERN_ERR "umc8672: other interface is busy: exiting tune_umc()\n" ); +pr_err ("umc8672: other interface is busy: exiting tune_umc()\n" ); }else { current_speeds[drive->name[2 ] -'a' ] = pio_to_umc[pio];umc_set_speeds (current_speeds);
@@ -140,14 +140,14 @@ static int __init umc8672_probe(void)unsigned long flags;if (!request_region (0x108 ,2 ,"umc8672" )) { -printk (KERN_ERR "umc8672: ports 0x108-0x109 already in use.\n" ); +pr_err ("umc8672: ports 0x108-0x109 already in use.\n" );return 1 ; }local_irq_save (flags);outb_p (0x5A ,0x108 );/* enable umc */ if (in_umc (0xd5 ) !=0xa0 ) {local_irq_restore (flags); -printk (KERN_ERR "umc8672: not found\n" ); +pr_err ("umc8672: not found\n" );release_region (0x108 ,2 );return 1 ; }
drivers/ide/via82cxxx.c +1 -2
@@ -447,8 +447,7 @@ static int __devinit via_init_one(struct pci_dev *dev, const struct pci_device_i vdev =kzalloc (sizeof (*vdev),GFP_KERNEL );if (!vdev) { - printk(KERN_ERR DRV_NAME " %s: out of memory :(\n", - pci_name(dev)); +pr_err (DRV_NAME " %s: out of memory :(\n" ,pci_name (dev));return -ENOMEM ; }
Signature · 1 line
1.6.3.1.10.g659a0.dirty
PATCH 4/6 drivers/ide: Convert printk(KERN_WARNING to pr_warning(
In reply to Joe Perches--- drivers/ide/amd74xx.c | 10 ++++------ drivers/ide/au1xxx-ide.c | 8 ++++---- drivers/ide/cs5520.c | 5 ++--- drivers/ide/hpt366.c | 4 ++-- drivers/ide/ide-disk.c | 7 +++---- drivers/ide/ide-dma-sff.c | 4 ++-- drivers/ide/ide-dma.c | 8 ++++---- drivers/ide/ide-io.c | 3 +-- drivers/ide/ide-ioctls.c | 4 ++-- drivers/ide/ide-iops.c | 8 ++++---- drivers/ide/ide-pm.c | 4 ++-- drivers/ide/ide-probe.c | 13 +++++++------ drivers/ide/ide-proc.c | 15 ++++++--------- drivers/ide/ide-tape.c | 4 ++-- drivers/ide/ide.c | 2 +- drivers/ide/it821x.c | 4 ++-- drivers/ide/palm_bk3710.c | 2 +- drivers/ide/pdc202xx_new.c | 4 ++-- drivers/ide/pdc202xx_old.c | 4 ++-- drivers/ide/piix.c | 4 ++-- drivers/ide/pmac.c | 30 +++++++++++++++--------------- drivers/ide/qd65xx.c | 13 +++++++------ drivers/ide/scc_pata.c | 15 ++++++++------- drivers/ide/setup-pci.c | 12 ++++++------ drivers/ide/sgiioc4.c | 16 ++++++---------- drivers/ide/siimage.c | 13 ++++++------- drivers/ide/tc86c001.c | 4 ++-- drivers/ide/via82cxxx.c | 8 ++++---- 28 files changed, 109 insertions(+), 119 deletions(-)
drivers/ide/amd74xx.c +4 -6
@@ -129,9 +129,8 @@ static void amd7411_cable_detect(struct pci_dev *dev) amd_80w = ((t &0x3 ) ?1 :0 ) | ((t &0xc ) ?2 :0 );for (i =24 ; i >=0 ; i -=8 )if (((u >> i) &4 ) && !(amd_80w & (1 << (1 - (i >>4 ))))) { - printk(KERN_WARNING DRV_NAME " %s: BIOS didn't set " -"cable bits correctly. Enabling workaround.\n" , - pci_name(dev)); +pr_warning (DRV_NAME " %s: BIOS didn't set cable bits correctly. Enabling workaround.\n" , +pci_name (dev)); amd_80w |= (1 << (1 - (i >>4 ))); } }
@@ -277,9 +276,8 @@ static int __devinit amd74xx_probe(struct pci_dev *dev, const struct pci_device_ }if (amd_clock <20000 || amd_clock >50000 ) { -printk (KERN_WARNING "%s: User given PCI clock speed impossible" -" (%d), using 33 MHz instead.\n" , - d.name, amd_clock); +pr_warning ("%s: User given PCI clock speed impossible (%d), using 33 MHz instead.\n" , + d.name, amd_clock); amd_clock =33333 ; }
drivers/ide/au1xxx-ide.c +4 -4
@@ -234,8 +234,8 @@ static int auide_build_dmatable(ide_drive_t *drive, struct ide_cmd *cmd)unsigned int tc = (cur_len <0xfe00 )? cur_len:0xfe00 ;if (++count >=PRD_ENTRIES ) { -printk (KERN_WARNING "%s: DMA table too small\n" , - drive->name); +pr_warning ("%s: DMA table too small\n" , + drive->name);return 0 ; }
@@ -300,8 +300,8 @@ static int auide_dma_test_irq(ide_drive_t *drive)*/ drive->waiting_for_dma++;if (drive->waiting_for_dma >=DMA_WAIT_TIMEOUT ) { -printk (KERN_WARNING "%s: timeout waiting for ddma to \ -complete\n" , drive->name); +pr_warning ("%s: timeout waiting for ddma to complete\n" , + drive->name);return 1 ; }udelay (10 );
drivers/ide/cs5520.c +2 -3
@@ -118,13 +118,12 @@ static int __devinit cs5520_init_one(struct pci_dev *dev, const struct pci_devic* BARS too and we will freak out other bits of the kernel */ if (pci_enable_device_io (dev)) { -printk (KERN_WARNING "%s: Unable to enable 55x0.\n" , d->name); +pr_warning ("%s: Unable to enable 55x0.\n" , d->name);return -ENODEV ; }pci_set_master (dev);if (pci_set_dma_mask (dev,DMA_BIT_MASK (32 ))) { -printk (KERN_WARNING "%s: No suitable DMA available.\n" , - d->name); +pr_warning ("%s: No suitable DMA available.\n" , d->name);return -ENODEV ; }
drivers/ide/hpt366.c +2 -2
@@ -1067,8 +1067,8 @@ static int init_chipset_hpt366(struct pci_dev *dev)if ((temp &0xFFFFF000 ) !=0xABCDE000 ) {int i; -printk (KERN_WARNING "%s %s: no clock data saved by " -"BIOS\n" , name,pci_name (dev)); +pr_warning ("%s %s: no clock data saved by BIOS\n" , + name,pci_name (dev));/* Calculate the average value of f_CNT. */ for (temp = i =0 ; i <128 ; i++) {
drivers/ide/ide-disk.c +3 -4
@@ -371,10 +371,9 @@ static int ide_disk_get_capacity(ide_drive_t *drive)/* limit drive capacity to 137GB if LBA48 cannot be used */ if ((drive->dev_flags &IDE_DFLAG_LBA48 ) ==0 && drive->capacity64 >1ULL <<28 ) { -printk (KERN_WARNING "%s: cannot use LBA48 - full capacity " -"%llu sectors (%llu MB)\n" , - drive->name, (unsigned long long )drive->capacity64, -sectors_to_MB (drive->capacity64)); +pr_warning ("%s: cannot use LBA48 - full capacity %llu sectors (%llu MB)\n" , + drive->name, (unsigned long long )drive->capacity64, +sectors_to_MB (drive->capacity64)); drive->capacity64 =1ULL <<28 ; }
drivers/ide/ide-dma-sff.c +2 -2
@@ -238,8 +238,8 @@ int ide_dma_sff_timer_expiry(ide_drive_t *drive)ide_hwif_t *hwif = drive->hwif;u8 dma_stat = hwif->dma_ops->dma_sff_read_status (hwif); -printk (KERN_WARNING "%s: %s: DMA status (0x%02x)\n" , - drive->name, __func__, dma_stat); +pr_warning ("%s: %s: DMA status (0x%02x)\n" , + drive->name, __func__, dma_stat);if ((dma_stat &0x18 ) ==0x18 )/* BUSY Stupid Early Timer !! */ return WAIT_CMD ;
drivers/ide/ide-dma.c +4 -4
@@ -220,8 +220,8 @@ int __ide_dma_bad_drive(ide_drive_t *drive)int blacklist =ide_in_drive_list (id, drive_blacklist);if (blacklist) { -printk (KERN_WARNING "%s: Disabling (U)DMA for %s (blacklisted)\n" , - drive->name, (char *)&id[ATA_ID_PROD ]); +pr_warning ("%s: Disabling (U)DMA for %s (blacklisted)\n" , + drive->name, (char *)&id[ATA_ID_PROD ]);return blacklist; }return 0 ;
@@ -478,14 +478,14 @@ ide_startstop_t ide_dma_timeout_retry(ide_drive_t *drive, int error)*/ if (error <0 ) { -printk (KERN_WARNING "%s: DMA timeout error\n" , drive->name); +pr_warning ("%s: DMA timeout error\n" , drive->name); drive->waiting_for_dma =0 ; (void )dma_ops->dma_end (drive);ide_dma_unmap_sg (drive, cmd); ret =ide_error (drive,"dma timeout error" , hwif->tp_ops->read_status (hwif)); }else { -printk (KERN_WARNING "%s: DMA timeout retry\n" , drive->name); +pr_warning ("%s: DMA timeout retry\n" , drive->name);if (dma_ops->dma_clear) dma_ops->dma_clear (drive);pr_err ("%s: timeout waiting for DMA\n" , drive->name);
drivers/ide/ide-io.c +1 -2
@@ -683,8 +683,7 @@ void ide_timer_expiry (unsigned long data) hwif->dma_ops->dma_lost_irq (drive);if (hwif->ack_intr) hwif->ack_intr (hwif); -printk (KERN_WARNING "%s: lost interrupt\n" , - drive->name); +pr_warning ("%s: lost interrupt\n" , drive->name); startstop =handler (drive); }else {if (drive->waiting_for_dma)
drivers/ide/ide-ioctls.c +2 -2
@@ -167,8 +167,8 @@ static int ide_cmd_ioctl(ide_drive_t *drive, unsigned long arg) id[ATA_ID_SWDMA_MODES])) { xfer_rate = args[1 ];if (tf->nsect >XFER_UDMA_2 && !eighty_ninty_three (drive)) { -printk (KERN_WARNING "%s: UDMA speeds >UDMA33 cannot " -"be set\n" , drive->name); +pr_warning ("%s: UDMA speeds >UDMA33 cannot be set\n" , + drive->name); goto abort; } }
drivers/ide/ide-iops.c +4 -4
@@ -258,10 +258,10 @@ no_80w:if (drive->dev_flags &IDE_DFLAG_UDMA33_WARNED )return 0 ; -printk (KERN_WARNING "%s: %s side 80-wire cable detection failed, " -"limiting max speed to UDMA33\n" , - drive->name, - hwif->cbl ==ATA_CBL_PATA80 ?"drive" :"host" ); +pr_warning ("%s: %s side 80-wire cable detection failed, " +"limiting max speed to UDMA33\n" , + drive->name, + hwif->cbl ==ATA_CBL_PATA80 ?"drive" :"host" ); drive->dev_flags |=IDE_DFLAG_UDMA33_WARNED ;
drivers/ide/ide-pm.c +2 -2
@@ -233,12 +233,12 @@ void ide_check_pm_state(ide_drive_t *drive, struct request *rq)#endif rc =ide_wait_not_busy (hwif,35000 );if (rc) -printk (KERN_WARNING "%s: bus not ready on wakeup\n" , drive->name); +pr_warning ("%s: bus not ready on wakeup\n" , drive->name); tp_ops->dev_select (drive); tp_ops->write_devctl (hwif,ATA_DEVCTL_OBS ); rc =ide_wait_not_busy (hwif,100000 );if (rc) -printk (KERN_WARNING "%s: drive not ready on wakeup\n" , drive->name); +pr_warning ("%s: drive not ready on wakeup\n" , drive->name);spin_lock_irqsave (q->queue_lock, flags);blk_start_queue (q);
drivers/ide/ide-probe.c +7 -6
@@ -506,7 +506,8 @@ static u8 probe_for_drive(ide_drive_t *drive)pr_info ("%s: ATAPI cdrom (?)\n" , drive->name); }else {/* nuke it */ -printk (KERN_WARNING "%s: Unknown device on bus refused identification. Ignoring.\n" , drive->name); +pr_warning ("%s: Unknown device on bus refused identification. Ignoring.\n" , + drive->name); drive->dev_flags &= ~IDE_DFLAG_PRESENT ; } }else {
@@ -557,8 +558,8 @@ 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" , - __func__, ret); +pr_warning ("IDE: %s: device_register error: %d\n" , + __func__, ret); goto out; }
@@ -672,7 +673,7 @@ void ide_undecoded_slave(ide_drive_t *dev1)return ;/* Appears to be an IDE flash adapter with decode bugs */ -printk (KERN_WARNING "ide-probe: ignoring undecoded slave\n" ); +pr_warning ("ide-probe: ignoring undecoded slave\n" ); dev1->dev_flags &= ~IDE_DFLAG_PRESENT ; }
@@ -1006,8 +1007,8 @@ static void hwif_register_devices(ide_hwif_t *hwif) ret =device_register (dev);if (ret <0 ) -printk (KERN_WARNING "IDE: %s: device_register error: " -"%d\n" , __func__, ret); +pr_warning ("IDE: %s: device_register error: %d\n" , + __func__, ret); } }
drivers/ide/ide-proc.c +6 -9
@@ -241,8 +241,7 @@ static void proc_ide_settings_warn(void)if (warned)return ; -printk (KERN_WARNING "Warning: /proc/ide/hd?/settings interface is " -"obsolete, and will be removed soon!\n" ); +pr_warning ("Warning: /proc/ide/hd?/settings interface is obsolete, and will be removed soon!\n" ); warned =1 ; }
@@ -464,15 +463,13 @@ static int ide_replace_subdriver(ide_drive_t *drive, const char *driver)strlcpy (drive->driver_req, driver,sizeof (drive->driver_req)); err =device_attach (dev);if (err <0 ) -printk (KERN_WARNING "IDE: %s: device_attach error: %d\n" , - __func__, err); +pr_warning ("IDE: %s: device_attach error: %d\n" , __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" , - __func__, err); +pr_warning ("IDE: %s: device_attach(2) error: %d\n" , + __func__, err); }if (dev->driver && !strcmp (dev->driver->name, driver)) ret =0 ;
@@ -666,8 +663,8 @@ 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" , - __func__, err); +pr_warning ("IDE: %s: bus_for_each_drv error: %d\n" , + __func__, err);return 0 ; }
drivers/ide/ide-tape.c +2 -2
@@ -1855,8 +1855,8 @@ static void ide_tape_get_bsize_from_bdesc(ide_drive_t *drive)if (ide_queue_pc_tail (drive, tape->disk, &pc)) {pr_err ("ide-tape: Can't get block descriptor\n" );if (tape->blk_size ==0 ) { -printk (KERN_WARNING "ide-tape: Cannot deal with zero " -"block size, assuming 32k\n" ); +pr_warning ("ide-tape: Cannot deal with zero " +"block size, assuming 32k\n" ); tape->blk_size =32768 ; }return ;
drivers/ide/ide.c +1 -1
@@ -359,7 +359,7 @@ static int __init ide_init(void) ret =bus_register (&ide_bus_type);if (ret <0 ) { -printk (KERN_WARNING "IDE: bus_register error: %d\n" , ret); +pr_warning ("IDE: bus_register error: %d\n" , ret);return ret; }
drivers/ide/it821x.c +2 -2
@@ -562,8 +562,8 @@ static void __devinit init_hwif_it821x(ide_hwif_t *hwif) idev->timing10 =1 ; hwif->host_flags |=IDE_HFLAG_NO_ATAPI_DMA ;if (idev->smart ==0 ) - printk(KERN_WARNING DRV_NAME " %s: revision 0x10, " -"workarounds activated\n" ,pci_name (dev)); +pr_warning (DRV_NAME " %s: revision 0x10, workarounds activated\n" , +pci_name (dev)); }if (idev->smart ==0 ) {
drivers/ide/palm_bk3710.c +1 -1
@@ -375,7 +375,7 @@ static int __init palm_bk3710_probe(struct platform_device *pdev)return 0 ; out: -printk (KERN_WARNING "Palm Chip BK3710 IDE Register Fail\n" ); +pr_warning ("Palm Chip BK3710 IDE Register Fail\n" );return rc; }
drivers/ide/pdc202xx_new.c +2 -2
@@ -218,8 +218,8 @@ static void pdcnew_reset(ide_drive_t *drive)/* * Deleted this because it is redundant from the caller. */ -printk (KERN_WARNING "pdc202xx_new: %s channel reset.\n" , - drive->hwif->channel ?"Secondary" :"Primary" ); +pr_warning ("pdc202xx_new: %s channel reset.\n" , + drive->hwif->channel ?"Secondary" :"Primary" ); }/**
drivers/ide/pdc202xx_old.c +2 -2
@@ -237,8 +237,8 @@ static void pdc202xx_reset_host (ide_hwif_t *hwif)outb (udma_speed_flag & ~0x10 , high_16 |0x001f );mdelay (2000 );/* 2 seconds ?! */ -printk (KERN_WARNING "PDC202XX: %s channel reset.\n" , - hwif->channel ?"Secondary" :"Primary" ); +pr_warning ("PDC202XX: %s channel reset.\n" , + hwif->channel ?"Secondary" :"Primary" ); }static void pdc202xx_reset (ide_drive_t *drive)
drivers/ide/piix.c +2 -2
@@ -408,9 +408,9 @@ static void __devinit piix_check_450nx(void) no_piix_dma =2 ; }if (no_piix_dma) - printk(KERN_WARNING DRV_NAME ": 450NX errata present, disabling IDE DMA.\n"); +pr_warning (DRV_NAME ": 450NX errata present, disabling IDE DMA.\n" );if (no_piix_dma ==2 ) - printk(KERN_WARNING DRV_NAME ": A BIOS update may resolve this.\n"); +pr_warning (DRV_NAME ": A BIOS update may resolve this.\n" ); }static const struct pci_device_id piix_pci_tbl[] = {
drivers/ide/pmac.c +15 -15
@@ -1151,8 +1151,8 @@ pmac_ide_macio_attach(struct macio_dev *mdev, const struct of_device_id *match)return -ENOMEM ;if (macio_resource_count (mdev) ==0 ) { -printk (KERN_WARNING "ide-pmac: no address for %s\n" , - mdev->ofdev.node->full_name); +pr_warning ("ide-pmac: no address for %s\n" , + mdev->ofdev.node->full_name); rc = -ENXIO ; goto out_free_pmif; }
@@ -1171,8 +1171,8 @@ pmac_ide_macio_attach(struct macio_dev *mdev, const struct of_device_id *match)* where that happens though... */ if (macio_irq_count (mdev) ==0 ) { -printk (KERN_WARNING "ide-pmac: no intrs for device %s, using " -"13\n" , mdev->ofdev.node->full_name); +pr_warning ("ide-pmac: no intrs for device %s, using 13\n" , + mdev->ofdev.node->full_name); irq =irq_create_mapping (NULL ,13 ); }else irq =macio_irq (mdev,0 );
@@ -1188,9 +1188,8 @@ pmac_ide_macio_attach(struct macio_dev *mdev, const struct of_device_id *match)if (macio_resource_count (mdev) >=2 ) {if (macio_request_resource (mdev,1 ,"ide-pmac (dma)" )) -printk (KERN_WARNING "ide-pmac: can't request DMA " -"resource for %s!\n" , - mdev->ofdev.node->full_name); +pr_warning ("ide-pmac: can't request DMA resource for %s!\n" , + mdev->ofdev.node->full_name);else pmif->dma_regs =ioremap (macio_resource_start (mdev,1 ),0x1000 ); }else
@@ -1281,8 +1280,8 @@ pmac_ide_pci_attach(struct pci_dev *pdev, const struct pci_device_id *id)return -ENOMEM ;if (pci_enable_device (pdev)) { -printk (KERN_WARNING "ide-pmac: Can't enable PCI device for " -"%s\n" , np->full_name); +pr_warning ("ide-pmac: Can't enable PCI device for %s\n" , + np->full_name); rc = -ENXIO ; goto out_free_pmif; }
@@ -1469,8 +1468,9 @@ static int pmac_ide_build_dmatable(ide_drive_t *drive, struct ide_cmd *cmd)if (pmif->broken_dma && cur_addr & (L1_CACHE_BYTES -1 )) {if (pmif->broken_dma_warn ==0 ) { -printk (KERN_WARNING "%s: DMA on non aligned address, " -"switching to PIO on Ohare chipset\n" , drive->name); +pr_warning ("%s: DMA on non aligned address, " +"switching to PIO on Ohare chipset\n" , + drive->name); pmif->broken_dma_warn =1 ; }return 0 ;
@@ -1479,8 +1479,8 @@ static int pmac_ide_build_dmatable(ide_drive_t *drive, struct ide_cmd *cmd)unsigned int tc = (cur_len <0xfe00 )? cur_len:0xfe00 ;if (count++ >=MAX_DCMDS ) { -printk (KERN_WARNING "%s: DMA table too small\n" , - drive->name); +pr_warning ("%s: DMA table too small\n" , + drive->name);return 0 ; }st_le16 (&table->command, wr?OUTPUT_MORE :INPUT_MORE );
@@ -1628,8 +1628,8 @@ pmac_ide_dma_test_irq (ide_drive_t *drive)if ((status &FLUSH ) ==0 )break ;if (++timeout >100 ) { -printk (KERN_WARNING "ide%d, ide_dma_test_irq \ -timeout flushing channel\n" , hwif->index); +pr_warning ("ide%d, ide_dma_test_irq timeout flushing channel\n" , + hwif->index);break ; } }
drivers/ide/qd65xx.c +7 -6
@@ -227,14 +227,16 @@ static void qd6580_set_pio_mode(ide_drive_t *drive, const u8 pio) active_time =86 ; recovery_time = cycle_time -102 ; }else -printk (KERN_WARNING "%s: Strange recovery time !\n" ,drive->name); +pr_warning ("%s: Strange recovery time !\n" , + drive->name);break ;case 4 :if (cycle_time >=69 ) { active_time =70 ; recovery_time = cycle_time -61 ; }else -printk (KERN_WARNING "%s: Strange recovery time !\n" ,drive->name); +pr_warning ("%s: Strange recovery time !\n" , + drive->name);break ;default :if (cycle_time >=180 ) {
@@ -250,9 +252,8 @@ static void qd6580_set_pio_mode(ide_drive_t *drive, const u8 pio)if (!hwif->channel && drive->media != ide_disk) {outb (0x5f ,QD_CONTROL_PORT ); -printk (KERN_WARNING "%s: ATAPI: disabled read-ahead FIFO " -"and post-write buffer on %s.\n" , - drive->name, hwif->name); +pr_warning ("%s: ATAPI: disabled read-ahead FIFO and post-write buffer on %s.\n" , + drive->name, hwif->name); }qd_set_timing (drive,qd6580_compute_timing (active_time, recovery_time));
@@ -373,7 +374,7 @@ static int __init qd_probe(int base)return -ENODEV ;/* bad register */ if (config &QD_CONFIG_DISABLED ) { -printk (KERN_WARNING "qd6500 is disabled !\n" ); +pr_warning ("qd6500 is disabled !\n" );return -ENODEV ; }
drivers/ide/scc_pata.c +8 -7
@@ -380,8 +380,8 @@ static int scc_dma_end(ide_drive_t *drive) drive->media == ide_disk && drive->current_speed > XFER_UDMA_4) { reg =in_be32 ((void __iomem *)intsts_port);if (!(reg &INTSTS_ACTEINT )) { -printk (KERN_WARNING "%s: operation failed (transfer data loss)\n" , - drive->name); +pr_warning ("%s: operation failed (transfer data loss)\n" , + drive->name); data_loss =1 ;if (retry++) {struct request *rq = hwif->rq;
@@ -404,7 +404,7 @@ static int scc_dma_end(ide_drive_t *drive) reg =in_be32 ((void __iomem *)intsts_port);if (reg &INTSTS_SERROR ) { -printk (KERN_WARNING "%s: SERROR\n" ,SCC_PATA_NAME ); +pr_warning ("%s: SERROR\n" ,SCC_PATA_NAME );out_be32 ((void __iomem *)intsts_port,INTSTS_SERROR |INTSTS_BMSINT );out_be32 (dma_base,in_be32 (dma_base) & ~QCHCD_IOS_SS );
@@ -418,7 +418,8 @@ static int scc_dma_end(ide_drive_t *drive) maea0 =in_be32 ((void __iomem *)(ctl_base +0xF50 )); maec0 =in_be32 ((void __iomem *)(ctl_base +0xF54 )); -printk (KERN_WARNING "%s: PRERR [addr:%x cmd:%x]\n" ,SCC_PATA_NAME , maea0, maec0); +pr_warning ("%s: PRERR [addr:%x cmd:%x]\n" , +SCC_PATA_NAME , maea0, maec0);out_be32 ((void __iomem *)intsts_port,INTSTS_PRERR |INTSTS_BMSINT );
@@ -427,7 +428,7 @@ static int scc_dma_end(ide_drive_t *drive) }if (reg &INTSTS_RERR ) { -printk (KERN_WARNING "%s: Response Error\n" ,SCC_PATA_NAME ); +pr_warning ("%s: Response Error\n" ,SCC_PATA_NAME );out_be32 ((void __iomem *)intsts_port,INTSTS_RERR |INTSTS_BMSINT );out_be32 (dma_base,in_be32 (dma_base) & ~QCHCD_IOS_SS );
@@ -437,13 +438,13 @@ static int scc_dma_end(ide_drive_t *drive)if (reg &INTSTS_ICERR ) {out_be32 (dma_base,in_be32 (dma_base) & ~QCHCD_IOS_SS ); -printk (KERN_WARNING "%s: Illegal Configuration\n" ,SCC_PATA_NAME ); +pr_warning ("%s: Illegal Configuration\n" ,SCC_PATA_NAME );out_be32 ((void __iomem *)intsts_port,INTSTS_ICERR |INTSTS_BMSINT );continue ; }if (reg &INTSTS_BMSINT ) { -printk (KERN_WARNING "%s: Internal Bus Error\n" ,SCC_PATA_NAME ); +pr_warning ("%s: Internal Bus Error\n" ,SCC_PATA_NAME );out_be32 ((void __iomem *)intsts_port,INTSTS_BMSINT );ide_do_reset (drive);
drivers/ide/setup-pci.c +6 -6
@@ -195,12 +195,12 @@ static int ide_pci_enable(struct pci_dev *dev, const struct ide_port_info *d)if (pci_enable_device (dev)) { ret =pci_enable_device_io (dev);if (ret <0 ) { -printk (KERN_WARNING "%s %s: couldn't enable device\n" , - d->name,pci_name (dev)); +pr_warning ("%s %s: couldn't enable device\n" , + d->name,pci_name (dev)); goto out; } -printk (KERN_WARNING "%s %s: BIOS configuration fixed\n" , - d->name,pci_name (dev)); +pr_warning ("%s %s: BIOS configuration fixed\n" , + d->name,pci_name (dev)); }/*
@@ -521,8 +521,8 @@ static int do_ide_setup_pci_device(struct pci_dev *dev, d->name, pci_name(dev)); pciirq =0 ; }else if (!pciirq && noisy) { -printk (KERN_WARNING "%s %s: bad irq (%d): will probe later\n" , - d->name,pci_name (dev), pciirq); +pr_warning ("%s %s: bad irq (%d): will probe later\n" , + d->name,pci_name (dev), pciirq); }else if (noisy) {pr_info ("%s %s: 100%% native mode on irq %d\n" , d->name,pci_name (dev), pciirq);
drivers/ide/sgiioc4.c +6 -10
@@ -367,9 +367,8 @@ sgiioc4_configure_for_dma(int dma_direction, ide_drive_t * drive) ioc4_dma =readl ((void __iomem *)ioc4_dma_addr);if (ioc4_dma &IOC4_S_DMA_ACTIVE ) { -printk (KERN_WARNING -"%s(%s):Warning!! DMA from previous transfer was still active\n" , - __func__, drive->name); +pr_warning ("%s(%s):Warning!! DMA from previous transfer was still active\n" , + __func__, drive->name);writel (IOC4_S_DMA_STOP , (void __iomem *)ioc4_dma_addr); ioc4_dma =sgiioc4_ide_dma_stop (hwif, dma_base);
@@ -380,10 +379,8 @@ sgiioc4_configure_for_dma(int dma_direction, ide_drive_t * drive) ioc4_dma =readl ((void __iomem *)ioc4_dma_addr);if (ioc4_dma &IOC4_S_DMA_ERROR ) { -printk (KERN_WARNING -"%s(%s) : Warning!! - DMA Error during Previous" -" transfer | status 0x%x\n" , - __func__, drive->name, ioc4_dma); +pr_warning ("%s(%s) : Warning!! - DMA Error during Previous transfer | status 0x%x\n" , + __func__, drive->name, ioc4_dma);writel (IOC4_S_DMA_STOP , (void __iomem *)ioc4_dma_addr); ioc4_dma =sgiioc4_ide_dma_stop (hwif, dma_base);
@@ -428,9 +425,8 @@ static int sgiioc4_build_dmatable(ide_drive_t *drive, struct ide_cmd *cmd)while (cur_len) {if (count++ >=IOC4_PRD_ENTRIES ) { -printk (KERN_WARNING -"%s: DMA table too small\n" , - drive->name); +pr_warning ("%s: DMA table too small\n" , + drive->name);return 0 ; }else { u32 bcount =
drivers/ide/siimage.c +6 -7
@@ -382,9 +382,8 @@ static int siimage_mmio_dma_test_irq(ide_drive_t *drive)writel (sata_error, sata_error_addr); watchdog = (sata_error &0x00680000 ) ?1 :0 ; -printk (KERN_WARNING "%s: sata_error = 0x%08x, " -"watchdog = %d, %s\n" , - drive->name, sata_error, watchdog, __func__); +pr_warning ("%s: sata_error = 0x%08x, watchdog = %d, %s\n" , + drive->name, sata_error, watchdog, __func__); }else watchdog = (ext_stat &0x8000 ) ?1 :0 ;
@@ -431,8 +430,8 @@ static int sil_sata_reset_poll(ide_drive_t *drive)u32 sata_stat =readl (sata_status_addr);if ((sata_stat &0x03 ) !=0x03 ) { -printk (KERN_WARNING "%s: reset phy dead, status=0x%08x\n" , - hwif->name, sata_stat); +pr_warning ("%s: reset phy dead, status=0x%08x\n" , + hwif->name, sata_stat);return -ENXIO ; } }
@@ -781,8 +780,8 @@ static int __devinit siimage_init_one(struct pci_dev *dev,* seem to get terminally confused in the PCI spaces. */ if (!request_mem_region (bar5, barsize, d.name)) { - printk(KERN_WARNING DRV_NAME " %s: MMIO ports not " - "available\n", pci_name(dev)); +pr_warning (DRV_NAME " %s: MMIO ports not available\n" , +pci_name (dev)); }else { ioaddr =pci_ioremap_bar (dev,5 );if (ioaddr ==NULL )
drivers/ide/tc86c001.c +2 -2
@@ -74,8 +74,8 @@ static int tc86c001_timer_expiry(ide_drive_t *drive)unsigned long twcr_port = sc_base + (drive->dn ?0x06 :0x04 );u8 dma_cmd =inb (hwif->dma_base +ATA_DMA_CMD ); -printk (KERN_WARNING "%s: DMA interrupt possibly stuck, " -"attempting recovery...\n" , drive->name); +pr_warning ("%s: DMA interrupt possibly stuck, attempting recovery...\n" , + drive->name);/* Stop DMA */ outb (dma_cmd & ~0x01 , hwif->dma_base +ATA_DMA_CMD );
drivers/ide/via82cxxx.c +4 -4
@@ -402,8 +402,8 @@ static int __devinit via_init_one(struct pci_dev *dev, const struct pci_device_i*/ via_config =via_config_find (&isa);if (!via_config->id) { - printk(KERN_WARNING DRV_NAME " %s: unknown chipset, skipping\n", - pci_name(dev)); +pr_warning (DRV_NAME " %s: unknown chipset, skipping\n" , +pci_name (dev));return -ENODEV ; }
@@ -430,8 +430,8 @@ static int __devinit via_init_one(struct pci_dev *dev, const struct pci_device_i }if (via_clock <20000 || via_clock >50000 ) { - printk(KERN_WARNING DRV_NAME ": User given PCI clock speed " - "impossible (%d), using 33 MHz instead.\n", via_clock); +pr_warning (DRV_NAME ": User given PCI clock speed impossible (%d), using 33 MHz instead.\n" , + via_clock); via_clock =33333 ; }
Signature · 1 line
1.6.3.1.10.g659a0.dirty
PATCH 5/6 drivers/ide: Convert printk(KERN_CONT to pr_cont(
In reply to Joe Perches--- drivers/ide/ide-cd.c | 24 ++++++++-------- drivers/ide/ide-cd_verbose.c | 38 +++++++++++++++++---------- drivers/ide/ide-disk.c | 4 +- drivers/ide/ide-eh.c | 8 +++--- drivers/ide/ide-lib.c | 58 +++++++++++++++++++++--------------------- drivers/ide/ide-probe.c | 20 +++++++------- drivers/ide/it821x.c | 4 +- drivers/ide/trm290.c | 2 +- 8 files changed, 84 insertions(+), 74 deletions(-)
drivers/ide/ide-cd.c +12 -12
@@ -1359,27 +1359,27 @@ static int ide_cdrom_probe_capabilities(ide_drive_t *drive)/* don't print speed if the drive reported 0 */ if (cd->max_speed) -printk (KERN_CONT " %dX" , cd->max_speed); +pr_cont (" %dX" , cd->max_speed); -printk (KERN_CONT " %s" , (cdi->mask &CDC_DVD ) ?"CD-ROM" :"DVD-ROM" ); +pr_cont (" %s" , (cdi->mask &CDC_DVD ) ?"CD-ROM" :"DVD-ROM" );if ((cdi->mask &CDC_DVD_R ) ==0 || (cdi->mask &CDC_DVD_RAM ) ==0 ) -printk (KERN_CONT " DVD%s%s" , - (cdi->mask &CDC_DVD_R ) ?"" :"-R" , - (cdi->mask &CDC_DVD_RAM ) ?"" :"/RAM" ); +pr_cont (" DVD%s%s" , + (cdi->mask &CDC_DVD_R ) ?"" :"-R" , + (cdi->mask &CDC_DVD_RAM ) ?"" :"/RAM" );if ((cdi->mask &CDC_CD_R ) ==0 || (cdi->mask &CDC_CD_RW ) ==0 ) -printk (KERN_CONT " CD%s%s" , - (cdi->mask &CDC_CD_R ) ?"" :"-R" , - (cdi->mask &CDC_CD_RW ) ?"" :"/RW" ); +pr_cont (" CD%s%s" , + (cdi->mask &CDC_CD_R ) ?"" :"-R" , + (cdi->mask &CDC_CD_RW ) ?"" :"/RW" );if ((cdi->mask &CDC_SELECT_DISC ) ==0 ) -printk (KERN_CONT " changer w/%d slots" , nslots); +pr_cont (" changer w/%d slots" , nslots);else -printk (KERN_CONT " drive" ); +pr_cont (" drive" ); -printk (KERN_CONT ", %dkB Cache\n" , -be16_to_cpup ((__be16 *)&buf[8 +12 ])); +pr_cont (", %dkB Cache\n" , +be16_to_cpup ((__be16 *)&buf[8 +12 ]));return nslots; }
drivers/ide/ide-cd_verbose.c +24 -14
@@ -252,23 +252,33 @@ void ide_cd_log_error(const char *name, struct request *failed_command, struct request_sense *sense) {int i; -const char *s ="bad sense key!" ; +const char *s; +const char *prefix;char buf[80 ];pr_err ("ATAPI device %s:\n" , name); -if (sense->error_code ==0x70 ) -printk (KERN_CONT " Error: " ); -else if (sense->error_code ==0x71 ) -printk (" Deferred Error: " ); -else if (sense->error_code ==0x7f ) -printk (KERN_CONT " Vendor-specific Error: " ); -else -printk (KERN_CONT " Unknown Error Type: " ); + +switch (sense->error_code) { +case 0x70 : + prefix ="Error" ; +break ; +case 0x71 : + prefix ="Deferred Error" ; +break ; +case 0x7f : + prefix ="Vendor-specific Error" ; +break ; +default : + prefix ="Unknown Error Type" ; +break ; + }if (sense->sense_key <ARRAY_SIZE (sense_key_texts)) s = sense_key_texts[sense->sense_key]; +else + s ="bad sense key!" ; -printk (KERN_CONT "%s -- (Sense key=0x%02x)\n" , s, sense->sense_key); +pr_err (" %s: %s -- (Sense key=0x%02x)\n" , prefix, s, sense->sense_key);if (sense->asc ==0x40 ) { sprintf(buf, "Diagnostic failure on component 0x%02x",
@@ -326,8 +336,8 @@ void ide_cd_log_error(const char *name, struct request *failed_command,pr_err (" The failed \"%s\" packet command was: \n \"" , s);for (i =0 ; i <BLK_MAX_CDB ; i++) -printk (KERN_CONT "%02x " , failed_command->cmd[i]); -printk (KERN_CONT "\"\n" ); +pr_cont ("%02x " , failed_command->cmd[i]); +pr_cont ("\"\n" ); }/* The SKSV bit specifies validity of the sense_key_specific
@@ -349,9 +359,9 @@ void ide_cd_log_error(const char *name, struct request *failed_command, (sense->sks[1] << 8) + sense->sks[2]);if ((sense->sks[0 ] &0x40 ) !=0 ) -printk (KERN_CONT " bit %d" , sense->sks[0 ] &0x07 ); +pr_cont (" bit %d" , sense->sks[0 ] &0x07 ); - printk(KERN_CONT "\n"); + pr_cont("\n"); } }#endif
drivers/ide/ide-disk.c +2 -2
@@ -680,9 +680,9 @@ static void ide_disk_setup(ide_drive_t *drive)/* Only print cache size when it was specified */ if (id[ATA_ID_BUF_SIZE ]) -printk (KERN_CONT " w/%dKiB Cache" , id[ATA_ID_BUF_SIZE ] /2 ); +pr_cont (" w/%dKiB Cache" , id[ATA_ID_BUF_SIZE ] /2 ); -printk (KERN_CONT ", CHS=%d/%d/%d\n" , +pr_cont (", CHS=%d/%d/%d\n" , drive->bios_cyl, drive->bios_head, drive->bios_sect);/* write cache enabled? */
drivers/ide/ide-eh.c +4 -4
@@ -204,12 +204,12 @@ static void ide_reset_report_error(ide_hwif_t *hwif, u8 err)pr_err ("%s: reset: master: " , hwif->name);if (err_master && err_master <6 ) -printk (KERN_CONT "%s" , err_master_vals[err_master]); +pr_cont ("%s" , err_master_vals[err_master]);else -printk (KERN_CONT "error (0x%02x?)" , err); +pr_cont ("error (0x%02x?)" , err);if (err &0x80 ) -printk (KERN_CONT "; slave: failed" ); -printk (KERN_CONT "\n" ); +pr_cont ("; slave: failed" ); +pr_cont ("\n" ); }/*
drivers/ide/ide-lib.c +29 -29
118 lines not on this page · raw message
drivers/ide/ide-probe.c +10 -10
@@ -133,9 +133,9 @@ static void ide_classify_atapi_dev(ide_drive_t *drive)if (!strstr (m,"oppy" ) && !strstr (m,"poyp" ) && !strstr (m,"ZIP" )) -printk (KERN_CONT "cdrom or floppy?, assuming " ); +pr_cont ("cdrom or floppy?, assuming " );if (drive->media != ide_cdrom) { -printk (KERN_CONT "FLOPPY" ); +pr_cont ("FLOPPY" ); drive->dev_flags |=IDE_DFLAG_REMOVABLE ;break ; }
@@ -147,26 +147,26 @@ static void ide_classify_atapi_dev(ide_drive_t *drive)#ifdef CONFIG_PPC /* kludge for Apple PowerBook internal zip */ if (!strstr (m,"CD-ROM" ) &&strstr (m,"ZIP" )) { -printk (KERN_CONT "FLOPPY" ); +pr_cont ("FLOPPY" ); type = ide_floppy;break ; }#endif -printk (KERN_CONT "CD/DVD-ROM" ); +pr_cont ("CD/DVD-ROM" );break ;case ide_tape: -printk (KERN_CONT "TAPE" ); +pr_cont ("TAPE" );break ;case ide_optical: -printk (KERN_CONT "OPTICAL" ); +pr_cont ("OPTICAL" ); drive->dev_flags |=IDE_DFLAG_REMOVABLE ;break ;default : -printk (KERN_CONT "UNKNOWN (type %d)" , type); +pr_cont ("UNKNOWN (type %d)" , type);break ; } -printk (KERN_CONT " drive\n" ); +pr_cont (" drive\n" ); drive->media = type;/* an ATAPI device ignores DRDY */ drive->ready_stat =0 ;
@@ -856,8 +856,8 @@ static int init_irq (ide_hwif_t *hwif) io_ports->data_addr, hwif->irq);#endif /* __mc68000__ */ if (hwif->host->host_flags &IDE_HFLAG_SERIALIZE ) -printk (KERN_CONT " (serialized)" ); -printk (KERN_CONT "\n" ); +pr_cont (" (serialized)" ); +pr_cont ("\n" );return 0 ; out_up:
drivers/ide/it821x.c +2 -2
@@ -471,8 +471,8 @@ static void it821x_quirkproc(ide_drive_t *drive) drive->name, id[147 ] ?"Bootable " :"" , id[ATA_ID_CSFO]);if (id[ATA_ID_CSFO ] !=1 ) -printk (KERN_CONT "(%dK stripe)" , id[146 ]); -printk (KERN_CONT ".\n" ); +pr_cont ("(%dK stripe)" , id[146 ]); +pr_cont (".\n" ); }else {/* Non RAID volume. Fixups to stop the core code doing unsupported things */
drivers/ide/trm290.c +1 -1
@@ -244,7 +244,7 @@ static void __devinit init_hwif_trm290(ide_hwif_t *hwif) cfg_base =0x3df0 ;pr_info (DRV_NAME " %s: using default" ,pci_name (dev)); } -printk (KERN_CONT " config base at 0x%04x\n" , cfg_base); +pr_cont (" config base at 0x%04x\n" , cfg_base); hwif->config_data = cfg_base; hwif->dma_base = (cfg_base +4 ) ^ (hwif->channel ?0x80 :0 );
Signature · 1 line
1.6.3.1.10.g659a0.dirty
PATCH 6/6 drivers/ide: Convert printk(KERN_NOTICE to pr_notice(
In reply to Joe Perches--- drivers/ide/ht6560b.c | 5 ++--- drivers/ide/ide-acpi.c | 2 +- drivers/ide/ide-cs.c | 2 +- drivers/ide/ide-floppy.c | 16 +++++++--------- drivers/ide/ide-tape.c | 6 +++--- drivers/ide/qd65xx.c | 4 ++-- 6 files changed, 16 insertions(+), 19 deletions(-)
drivers/ide/ht6560b.c +2 -3
@@ -343,13 +343,12 @@ static int __init ht6560b_init(void)return -ENODEV ;if (!request_region (HT_CONFIG_PORT ,1 ,DRV_NAME )) { -printk (KERN_NOTICE "%s: HT_CONFIG_PORT not found\n" , - __func__); +pr_notice ("%s: HT_CONFIG_PORT not found\n" , __func__);return -ENODEV ; }if (!try_to_init_ht6560b ()) { -printk (KERN_NOTICE "%s: HBA not found\n" , __func__); +pr_notice ("%s: HBA not found\n" , __func__); goto release_region; }
drivers/ide/ide-acpi.c +1 -1
@@ -67,7 +67,7 @@ static bool ide_noacpi_psx;static int no_acpi_psx (const struct dmi_system_id *id) { ide_noacpi_psx = true; -printk (KERN_NOTICE "%s detected - disable ACPI _PSx.\n" , id->ident); +pr_notice ("%s detected - disable ACPI _PSx.\n" , id->ident);return 0 ; }
drivers/ide/ide-cs.c +1 -1
@@ -338,7 +338,7 @@ static int ide_config(struct pcmcia_device *link)return 0 ; err_mem: -printk (KERN_NOTICE "ide-cs: ide_config failed memory allocation\n" ); +pr_notice ("ide-cs: ide_config failed memory allocation\n" ); goto failed; cs_failed:
drivers/ide/ide-floppy.c +7 -9
@@ -349,9 +349,9 @@ static int ide_floppy_get_flexible_disk_page(ide_drive_t *drive, lba_capacity = floppy->blocks * floppy->block_size;if (capacity < lba_capacity) { - printk(KERN_NOTICE PFX "%s: The disk reports a capacity of %d " -"bytes, but the drive only handles %d\n" , - drive->name, lba_capacity, capacity); +pr_notice (PFX "%s: The disk reports a capacity of %d " +"bytes, but the drive only handles %d\n" , + drive->name, lba_capacity, capacity); floppy->blocks = floppy->block_size ? capacity / floppy->block_size :0 ; drive->capacity64 = floppy->blocks * floppy->bs_factor;
@@ -428,17 +428,15 @@ static int ide_floppy_get_capacity(ide_drive_t *drive)memcpy (&floppy->cap_desc, cap_desc,8 );if (!length || length %512 ) { - printk(KERN_NOTICE PFX "%s: %d bytes block size" - " not supported\n", drive->name, length); +pr_notice (PFX "%s: %d bytes block size not supported\n" , + drive->name, length); }else { floppy->blocks = blocks; floppy->block_size = length; floppy->bs_factor = length /512 ;if (floppy->bs_factor !=1 ) - printk(KERN_NOTICE PFX "%s: Warning: " -"non 512 bytes block size not " -"fully supported\n" , - drive->name); +pr_notice (PFX "%s: Warning: non 512 bytes block size not fully supported\n" , + drive->name); drive->capacity64 = floppy->blocks * floppy->bs_factor; rc =0 ;
drivers/ide/ide-tape.c +3 -3
@@ -756,8 +756,8 @@ static ide_startstop_t idetape_do_request(ide_drive_t *drive,if (!blk_special_request (rq)) {/* We do not support buffer cache originated requests. */ -printk (KERN_NOTICE "ide-tape: %s: Unsupported request in " -"request queue (%d)\n" , drive->name, rq->cmd_type); +pr_notice ("ide-tape: %s: Unsupported request in request queue (%d)\n" , + drive->name, rq->cmd_type);if (blk_fs_request (rq) ==0 && rq->errors ==0 ) rq->errors = -EIO ;ide_complete_rq (drive, -EIO ,ide_rq_bytes (rq));
@@ -2176,7 +2176,7 @@ static void idetape_setup(ide_drive_t *drive, idetape_tape_t *tape, int minor) tape->user_bs_factor =1 ; tape->buffer_size = *ctl * tape->blk_size;while (tape->buffer_size >0xffff ) { -printk (KERN_NOTICE "ide-tape: decreasing stage size\n" ); +pr_notice ("ide-tape: decreasing stage size\n" ); *ctl /=2 ; tape->buffer_size = *ctl * tape->blk_size; }
drivers/ide/qd65xx.c +2 -2
@@ -378,7 +378,7 @@ static int __init qd_probe(int base)return -ENODEV ; } -printk (KERN_NOTICE "qd6500 at %#x\n" , base); +pr_notice ("qd6500 at %#x\n" , base);pr_debug ("qd6500: config=%#x, ID3=%u\n" , config,QD_ID3 ); d.port_ops = &qd6500_port_ops;
@@ -391,7 +391,7 @@ static int __init qd_probe(int base) control =inb (QD_CONTROL_PORT ); -printk (KERN_NOTICE "qd6580 at %#x\n" , base); +pr_notice ("qd6580 at %#x\n" , base);pr_debug ("qd6580: config=%#x, control=%#x, ID3=%u\n" , config, control,QD_ID3 );
Signature · 1 line
1.6.3.1.10.g659a0.dirty
Re: [PATCH 6/6] drivers/ide: Convert printk(KERN_NOTICE to pr_notice(
Hello.
Quoted 2 lines · Joe Perches
Signed-off-by Joe Perches <[email protected]>
This patch creates lines > 80 chars long, co no ACK this time.
Quoted 5 lines
drivers/ide/ide-floppy.c +0
-0
[...]
drivers/ide/ide-floppy.c static int ide_floppy_get_capacity(ide_drive_t *drive) · line 432
Quoted 8 lines
drivers/ide/ide-floppy.c +1
-2@@ -428,17 +428,15 @@ static int ide_floppy_get_capacity(ide_drive_t *drive)memcpy (&floppy->cap_desc, cap_desc,8 );if (!length || length %512 ) { - printk(KERN_NOTICE PFX "%s: %d bytes block size" - " not supported\n", drive->name, length); + pr_notice(PFX "%s: %d bytes block size not supported\n",
Line longer than 80 characters...
drivers/ide/ide-floppy.c static int ide_floppy_get_capacity(ide_drive_t *drive)
Quoted 12 lines
drivers/ide/ide-floppy.c +2
-4+ drive->name, length); }else { floppy->blocks = blocks; floppy->block_size = length; floppy->bs_factor = length /512 ;if (floppy->bs_factor !=1 ) - printk(KERN_NOTICE PFX "%s: Warning: " -"non 512 bytes block size not " -"fully supported\n" , - drive->name); + pr_notice(PFX "%s: Warning: non 512 bytes block size not fully supported\n",
Again.
Quoted 9 lines
drivers/ide/ide-floppy.c +1
-0+ drive->name); drive->capacity64 =drivers/ide/ide-floppy.c +0
-0floppy->blocks * floppy->bs_factor; rc =0 ;drivers/ide/ide-tape.c +0
-0
drivers/ide/ide-tape.c static ide_startstop_t idetape_do_request(ide_drive_t *drive, · line 760
Quoted 7 lines
drivers/ide/ide-tape.c +1
-2@@ -756,8 +756,8 @@ static ide_startstop_t idetape_do_request(ide_drive_t *drive,if (!blk_special_request (rq)) {/* We do not support buffer cache originated requests. */ -printk (KERN_NOTICE "ide-tape: %s: Unsupported request in " -"request queue (%d)\n" , drive->name, rq->cmd_type); + pr_notice("ide-tape: %s: Unsupported request in request queue (%d)\n",
And again.
MBR, Sergei
Re: [PATCH 6/6] drivers/ide: Convert printk(KERN_NOTICE to pr_notice(
Quoted 5 lines · Sergei Shtylyov
Quoted 5 lines
drivers/ide/ide-floppy.c +0
-0}else { floppy->blocks = blocks; floppy->block_size = length; floppy->bs_factor = length /512 ;if (floppy->bs_factor !=1 )
Quoted 8 lines
drivers/ide/ide-floppy.c static int ide_floppy_get_capacity(ide_drive_t *drive) · line 438
Quoted 6 lines
drivers/ide/ide-floppy.c +1
-4- printk(KERN_NOTICE PFX "%s: Warning: " -"non 512 bytes block size not " -"fully supported\n" , - drive->name); + pr_notice(PFX "%s: Warning: non 512 bytes block size not fully supported\n",Again.
(> 80 chars in line)
Though I think most people would agree that the latter is much better, no?
I think removal (rewording) of this rule has already been agreed upon, though not exactly yet codified.
Signature · 1 line
Krzysztof Halasa
Re: [PATCH 6/6] drivers/ide: Convert printk(KERN_NOTICE to pr_notice(
Hello.
Quoted 15 lines · Krzysztof Halasa
Quoted 5 lines
Quoted 5 lines
drivers/ide/ide-floppy.c +0
-0}else { floppy->blocks = blocks; floppy->block_size = length; floppy->bs_factor = length /512 ;if (floppy->bs_factor !=1 )Quoted 9 lines
drivers/ide/ide-floppy.c static int ide_floppy_get_capacity(ide_drive_t *drive) · line 438
Quoted 7 lines
drivers/ide/ide-floppy.c +1
-4- printk(KERN_NOTICE PFX "%s: Warning: " -"non 512 bytes block size not " -"fully supported\n" , - drive->name); + pr_notice(PFX "%s: Warning: non 512 bytes block size not fully supported\n",Again.
Quoted 5 lines
(> 80 chars in line)
Though I think most people would agree that the latter is much better, no?
Don't know about most people but I don't find 120-column lines better
(being recently imposed 65-column limit on the patch description by some people :-).
Quoted 3 lines
I think removal (rewording) of this rule has already been agreed upon, though not exactly yet codified.
Again, don't know about that but that would be against my personal
preference. Also, if still not codified, it won't pass chackpatch.pl, so should be fixed.
MBR, Sergei
Re: [PATCH 6/6] drivers/ide: Convert printk(KERN_NOTICE to pr_notice(
In reply to Krzysztof HalasaQuoted 16 lines · On Monday 18 May 2009 15:22:01 Krzysztof Halasa wrote:
Quoted 5 lines · Sergei Shtylyov
Quoted 5 lines
drivers/ide/ide-floppy.c +0
-0}else { floppy->blocks = blocks; floppy->block_size = length; floppy->bs_factor = length /512 ;if (floppy->bs_factor !=1 )Quoted 8 lines
drivers/ide/ide-floppy.c static int ide_floppy_get_capacity(ide_drive_t *drive) · line 438
Quoted 6 lines
drivers/ide/ide-floppy.c +1
-4- printk(KERN_NOTICE PFX "%s: Warning: " -"non 512 bytes block size not " -"fully supported\n" , - drive->name); + pr_notice(PFX "%s: Warning: non 512 bytes block size not fully supported\n",Again.
Quoted 4 lines
(> 80 chars in line)
Though I think most people would agree that the latter is much better, no?
No, it just hides the real issue:
Please factor out descriptor parsing from ide_floppy_get_capacity() and remove superfluous "Warning: " part of the message instead if you want something much better.
It is also a real pain for people depending on some kind of automatic verification of patches (infamous checkpatch.pl ;).
Quoted 2 lines
I think removal (rewording) of this rule has already been agreed upon, though not exactly yet codified.
This is not a strict rule but in 99% cases it shows that the code could be improved further without >80 chars lines.
Thanks.
Bart
Re: [PATCH 6/6] drivers/ide: Convert printk(KERN_NOTICE to pr_notice(
Quoted 4 lines · Bartlomiej Zolnierkiewicz
Quoted 2 lines
Though I think most people would agree that the latter is much better, no?
No, it just hides the real issue:
I didn't say it's best. Just better :-)
Quoted 5 lines
Quoted 2 lines
I think removal (rewording) of this rule has already been agreed upon, though not exactly yet codified.
This is not a strict rule but in 99% cases it shows that the code could be improved further without >80 chars lines.
I don't have the stat numbers handy but the established idea is that since the texts could be up to 80-chars long (and it's a good thing), the printk line needed to output them has to be longer. IOW, breaking the text into pieces is worse. Obviously, that doesn't mean one can't do better.
Signature · 1 line
Krzysztof Halasa
Re: [PATCH 6/6] drivers/ide: Convert printk(KERN_NOTICE to pr_notice(
In reply to Krzysztof HalasaQuoted 4 lines
Though I think most people would agree that the latter is much better, no?
I think removal (rewording) of this rule has already been agreed upon, though not exactly yet codified.
There are no rules - its a style guide ;)
And yes sticking to 80 columns is frequently totally bogus especially when it splits text strings
Alan
--
"Policy is a poor man's substitute for common sense."
-- David Woodhouse
Re: [PATCH 6/6] drivers/ide: Convert printk(KERN_NOTICE to pr_notice(
In reply to Sergei ShtylyovQuoted 1 line · Sergei Shtylyov
This patch creates lines > 80 chars long, co no ACK this time.
It makes grepping for log messages easier.
http://lkml.org/lkml/2009/4/8/607
Quoted 3 lines
drivers/ide/ide-floppy.c static int ide_floppy_get_capacity(ide_drive_t *drive) · line 431
Quoted 3 lines
drivers/ide/ide-floppy.c +1
-2- printk(KERN_NOTICE PFX "%s: %d bytes block size" - " not supported\n", drive->name, length); + pr_notice(PFX "%s: %d bytes block size not supported\n",
[]
Quoted 5 lines
drivers/ide/ide-floppy.c static int ide_floppy_get_capacity(ide_drive_t *drive) · line 438
Quoted 5 lines
drivers/ide/ide-floppy.c +1
-4- printk(KERN_NOTICE PFX "%s: Warning: " -"non 512 bytes block size not " -"fully supported\n" , - drive->name); + pr_notice(PFX "%s: Warning: non 512 bytes block size not fully supported\n",
[]
Quoted 3 lines
drivers/ide/ide-tape.c static ide_startstop_t idetape_do_request(ide_drive_t *drive, · line 759
Quoted 3 lines
drivers/ide/ide-tape.c +1
-2-printk (KERN_NOTICE "ide-tape: %s: Unsupported request in " -"request queue (%d)\n" , drive->name, rq->cmd_type); + pr_notice("ide-tape: %s: Unsupported request in request queue (%d)\n",
cheers, Joe
Quoted 1 line · On Monday 18 May 2009 04:21:08 Joe Perches wrote:
Mostly mechanical conversion of printk's
[...]
Hmm.. less mechanical conversion using also dev_*() macros where suitable would be much better...
Quoted 2 lines
Joe Perches (6):
drivers/ide: Convert printk(KERN_DEBUG to pr_debug(
How's about fixing pr_devel() which currently doesn't seem to be used by anything inside kernel to not depend on DEBUG in separate pre-patch and then using it instead of pr_debug()?
Quoted 5 lines
drivers/ide: Convert printk(KERN_INFO to pr_info(drivers/ide: Convert printk(KERN_ERR to pr_err(drivers/ide: Convert printk(KERN_WARNING to pr_warning(drivers/ide: Convert printk(KERN_CONT to pr_cont(drivers/ide: Convert printk(KERN_NOTICE to pr_notice(
Please re-do it so we have per-file patches instead of per-pr_.
Preferably with some files grouped together so we have only three patches:
* core code: ide-acpi.c, ide-atapi.c, ide.c, ide-devsets.c, ide-dma*.c, ide-eh.c, ide-io*.c, ide-legacy.c, ide-lib.c, ide-park.c, ide-pio*.c, ide-pm.c, ide-probe.c, ide-proc.c, ide-scan-pci.c, ide-sysfs.c, ide-taskfile.c, ide-timings.c, ide-xfer-mode.c and setup-pci.c
* device drivers: ide-cd*, ide-disk*, ide-gd*, ide-floppy* and ide-tape.c
* host drivers: all the rest
It would make patches easier to review and would greatly help when it comes to merging them (i.e. I could apply changes to host drivers right know but I don't want to interfere too much with the on-going work on device drivers).
Thanks.
Bart
Quoted 7 lines · Bartlomiej Zolnierkiewicz
Quoted 1 line · On Monday 18 May 2009 04:21:08 Joe Perches wrote:
Mostly mechanical conversion of printk's
Hmm.. less mechanical conversion using also dev_*() macros where suitable would be much better...
How's about fixingpr_devel()which currently doesn't seem to be used by anything inside kernel to not depend on DEBUG in separate pre-patch and then using it instead ofpr_debug()?
How about deferring the "printk(KERN_DEBUG" to something else and doing the mechanical conversion to core as a first pass, followed by core pr_<foo> to dev_<foo> where appropriate as a second pass?
What do you think is appropriate for pr_<foo> to dev_<foo> conversions?
Quoted 9 lines · On Monday 18 May 2009 17:41:28 Joe Perches wrote:
Quoted 7 lines · Bartlomiej Zolnierkiewicz
Quoted 1 line · On Monday 18 May 2009 04:21:08 Joe Perches wrote:
Mostly mechanical conversion of printk's
Hmm.. less mechanical conversion using also dev_*() macros where suitable would be much better...
How's about fixingpr_devel()which currently doesn't seem to be used by anything inside kernel to not depend on DEBUG in separate pre-patch and then using it instead ofpr_debug()?
Quoted 4 lines
How about deferring the "printk(KERN_DEBUG" to something else and doing the mechanical conversion to core as a first pass, followed by core pr_<foo> to dev_<foo> where appropriate as a second pass?
Fine with me.
Quoted 2 lines
What do you think is appropriate for pr_<foo> to dev_<foo> conversions?
printk()s using drive->name or hwif->name
Thanks,
Bart
Quoted 9 lines · Joe Perches
Quoted 7 lines · Bartlomiej Zolnierkiewicz
Quoted 1 line · On Monday 18 May 2009 04:21:08 Joe Perches wrote:
Mostly mechanical conversion of printk's
Hmm.. less mechanical conversion using also dev_*() macros where suitable would be much better...
How's about fixingpr_devel()which currently doesn't seem to be used by anything inside kernel to not depend on DEBUG in separate pre-patch and then using it instead ofpr_debug()?
Quoted 4 lines
How about deferring the "printk(KERN_DEBUG" to something else and doing the mechanical conversion to core as a first pass, followed by core pr_<foo> to dev_<foo> where appropriate as a second pass?
What exactly is the point of a mechanical conversion from printk(KERN_ ...) to pr_...?
I can see the value of the pr_ macros from new code in that the temptation to put a comma after KERN_.. for some people is irresistible so it's an interface that's very easy to misuse, but given that we have correct uses, why convert them?
James
Quoted 7 lines · James Bottomley
What exactly is the point of a mechanical conversion from
printk(KERN_ ...)topr_...?I can see the value of the
pr_macros from new code in that the temptation to put a comma afterKERN_.. for some people is irresistible so it's an interface that's very easy to misuse, but given that we have correct uses, why convert them?
Enables easier conversion to dev_<foo> macros Allows easier prefixing via pr_fmt
Puts back together unnecessarily chopped up format strings Standardization is good
Just for the hell of it
cheers, Joe
Quoted 10 lines · Joe Perches
Quoted 7 lines · James Bottomley
What exactly is the point of a mechanical conversion from
printk(KERN_ ...)topr_...?I can see the value of the
pr_macros from new code in that the temptation to put a comma afterKERN_.. for some people is irresistible so it's an interface that's very easy to misuse, but given that we have correct uses, why convert them?Enables easier conversion to dev_<foo> macros
Don't buy this ... this should just be done directly to avoid code churn.
Quoted 1 line
Allows easier prefixing via
pr_fmt
Buy this, but you need to say what you're proposing for pr_fmt in IDE for this to make sense.
Quoted 1 line
Puts back together unnecessarily chopped up format strings
Staying out of this bikeshed colour discussion.
Quoted 1 line
Standardization is good
We'd only be standardising if printk is deprecated, which I don't think it is.
Quoted 1 line
Just for the hell of it
Don't like this ... it's not good for the stability of the code base and it can cause problems with subsidiary committers by generating unnecessary patch rejections due to code churn.
James
Quoted 3 lines · James Bottomley
it's not good for the stability of the code base and it can cause problems with subsidiary committers by generating unnecessary patch rejections due to code churn.
Bart can decide, coordinate and mitigate.
He's the one that asked for it.
http://lkml.org/lkml/2009/5/17/127
cheers, Joe