From: Sergei Shtylyov <sshtylyov@ru.mvista.com>
To: Joe Perches <joe@perches.com>
Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>,
linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org
Subject: Re: [PATCH 1/6] drivers/ide: Convert printk(KERN_DEBUG to pr_debug(
Date: Mon, 18 May 2009 13:34:22 +0400 [thread overview]
Message-ID: <4A112B9E.4020405@ru.mvista.com> (raw)
In-Reply-To: <5405960caf8cf09e74b8ac42ca8056843f13c20c.1242609803.git.joe@perches.com>
Hello.
Joe Perches wrote:
> Signed-off-by: Joe Perches <joe@perches.com>
NAK. This will effectively disable the debugging messages.
> diff --git a/drivers/ide/ali14xx.c b/drivers/ide/ali14xx.c
> index 90da1f9..5ac2174 100644
> --- a/drivers/ide/ali14xx.c
> +++ b/drivers/ide/ali14xx.c
> @@ -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.
> @@ -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.
> diff --git a/drivers/ide/hpt366.c b/drivers/ide/hpt366.c
> index 0feb66c..0debe3c 100644
> --- a/drivers/ide/hpt366.c
> +++ b/drivers/ide/hpt366.c
> @@ -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.
> diff --git a/drivers/ide/ide-acpi.c b/drivers/ide/ide-acpi.c
> index 77f79d2..c2f7c2f 100644
> --- a/drivers/ide/ide-acpi.c
> +++ b/drivers/ide/ide-acpi.c
> @@ -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.
> @@ -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.
> diff --git a/drivers/ide/ide-cs.c b/drivers/ide/ide-cs.c
> index 9e47f35..10adf8e 100644
> --- a/drivers/ide/ide-cs.c
> +++ b/drivers/ide/ide-cs.c
> @@ -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.
> diff --git a/drivers/ide/ide-iops.c b/drivers/ide/ide-iops.c
> index c19a221..b245f39 100644
> --- a/drivers/ide/ide-iops.c
> +++ b/drivers/ide/ide-iops.c
> @@ -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;
> diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c
> index 7f264ed..8849e55 100644
> --- a/drivers/ide/ide-probe.c
> +++ b/drivers/ide/ide-probe.c
> @@ -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.
> @@ -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);
>
Not equivalent.
> diff --git a/drivers/ide/ide-xfer-mode.c b/drivers/ide/ide-xfer-mode.c
> index af44be9..e9d75e7 100644
> --- a/drivers/ide/ide-xfer-mode.c
> +++ b/drivers/ide/ide-xfer-mode.c
> @@ -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.
> diff --git a/drivers/ide/pdc202xx_old.c b/drivers/ide/pdc202xx_old.c
> index 248a54b..3e07c0b 100644
> --- a/drivers/ide/pdc202xx_old.c
> +++ b/drivers/ide/pdc202xx_old.c
> @@ -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
>
Not equivalent.
> diff --git a/drivers/ide/qd65xx.c b/drivers/ide/qd65xx.c
> index c9a1349..550aa95 100644
> --- a/drivers/ide/qd65xx.c
> +++ b/drivers/ide/qd65xx.c
> @@ -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);
>
Not equivalent.
> diff --git a/drivers/ide/serverworks.c b/drivers/ide/serverworks.c
> index b6554ef..28e6083 100644
> --- a/drivers/ide/serverworks.c
> +++ b/drivers/ide/serverworks.c
> @@ -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.
> diff --git a/drivers/ide/sl82c105.c b/drivers/ide/sl82c105.c
> index b0a4606..21df560 100644
> --- a/drivers/ide/sl82c105.c
> +++ b/drivers/ide/sl82c105.c
> @@ -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
next prev parent reply other threads:[~2009-05-18 9:34 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-18 2:21 [PATCH 0/6] drivers/ide Convert printk(KERN_<foo> to pr_<foo>( Joe Perches
2009-05-18 2:21 ` [PATCH 1/6] drivers/ide: Convert printk(KERN_DEBUG to pr_debug( Joe Perches
2009-05-18 2:21 ` Joe Perches
2009-05-18 9:34 ` Sergei Shtylyov [this message]
2009-05-18 2:21 ` [PATCH 2/6] drivers/ide: Convert printk(KERN_INFO to pr_info( Joe Perches
2009-05-18 2:21 ` Joe Perches
2009-05-18 2:31 ` Joe Perches
2009-05-18 2:21 ` [PATCH 3/6] drivers/ide: Convert printk(KERN_ERR to pr_err( Joe Perches
2009-05-18 2:21 ` Joe Perches
2009-05-18 2:21 ` [PATCH 4/6] drivers/ide: Convert printk(KERN_WARNING to pr_warning( Joe Perches
2009-05-18 2:21 ` Joe Perches
2009-05-18 2:21 ` [PATCH 5/6] drivers/ide: Convert printk(KERN_CONT to pr_cont( Joe Perches
2009-05-18 2:21 ` Joe Perches
2009-05-18 2:21 ` [PATCH 6/6] drivers/ide: Convert printk(KERN_NOTICE to pr_notice( Joe Perches
2009-05-18 2:21 ` Joe Perches
2009-05-18 10:11 ` Sergei Shtylyov
2009-05-18 13:22 ` Krzysztof Halasa
2009-05-18 13:38 ` Sergei Shtylyov
2009-05-18 13:50 ` Bartlomiej Zolnierkiewicz
2009-05-18 17:18 ` Krzysztof Halasa
2009-05-18 18:55 ` Alan Cox
2009-05-18 13:32 ` Joe Perches
2009-05-18 14:12 ` [PATCH 0/6] drivers/ide Convert printk(KERN_<foo> to pr_<foo>( Bartlomiej Zolnierkiewicz
2009-05-18 15:41 ` Joe Perches
2009-05-18 15:48 ` Bartlomiej Zolnierkiewicz
2009-05-18 15:56 ` James Bottomley
2009-05-18 20:59 ` Joe Perches
2009-05-18 21:15 ` James Bottomley
2009-05-18 21:21 ` Joe Perches
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4A112B9E.4020405@ru.mvista.com \
--to=sshtylyov@ru.mvista.com \
--cc=bzolnier@gmail.com \
--cc=joe@perches.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.