From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
To: Joe Perches <joe@perches.com>
Cc: Borislav Petkov <petkovbb@gmail.com>,
Sergei Shtylyov <sshtylyov@ru.mvista.com>,
Tejun Heo <tj@kernel.org>,
linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/3] drivers/ide/ide-core: Convert printk(KERN_<level> to pr_<level>
Date: Tue, 2 Jun 2009 16:02:42 +0200 [thread overview]
Message-ID: <200906021602.42848.bzolnier@gmail.com> (raw)
In-Reply-To: <ad29856101ea7fec73e2df4fd09708c55afb989a.1243062772.git.joe@perches.com>
On Saturday 23 May 2009 09:41:14 Joe Perches wrote:
> --- a/drivers/ide/setup-pci.c
> +++ b/drivers/ide/setup-pci.c
> @@ -39,18 +39,18 @@ 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 "
> + 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 "
> + 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) {
> - printk(KERN_ERR "%s %s: rewrite of PROGIF failed, "
> - "wanted 0x%04x, got 0x%04x\n",
> - name, pci_name(dev), progif | 5, progif);
> + pr_err("%s %s: rewrite of PROGIF failed, "
> + "wanted 0x%04x, got 0x%04x\n",
> + name, pci_name(dev), progif | 5, progif);
> return -EOPNOTSUPP;
> }
> }
> @@ -92,8 +92,8 @@ unsigned long ide_pci_dma_base(ide_hwif_t *hwif, const struct ide_port_info *d)
> dma_base = pci_resource_start(dev, baridx);
>
> if (dma_base == 0) {
> - printk(KERN_ERR "%s %s: DMA base is invalid\n",
> - d->name, pci_name(dev));
> + pr_err("%s %s: DMA base is invalid\n",
> + d->name, pci_name(dev));
> return 0;
> }
> }
> @@ -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;
> }
> @@ -155,8 +155,8 @@ int ide_pci_set_master(struct pci_dev *dev, const char *name)
>
> if (pci_read_config_word(dev, PCI_COMMAND, &pcicmd) ||
> (pcicmd & PCI_COMMAND_MASTER) == 0) {
> - printk(KERN_ERR "%s %s: error updating PCICMD\n",
> - name, pci_name(dev));
> + pr_err("%s %s: error updating PCICMD\n",
> + name, pci_name(dev));
> return -EIO;
> }
> }
> @@ -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);
> }
> @@ -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));
> }
>
> /*
> @@ -210,8 +210,8 @@ static int ide_pci_enable(struct pci_dev *dev, const struct ide_port_info *d)
> */
> ret = pci_set_dma_mask(dev, DMA_BIT_MASK(32));
> if (ret < 0) {
> - printk(KERN_ERR "%s %s: can't set DMA mask\n",
> - d->name, pci_name(dev));
> + pr_err("%s %s: can't set DMA mask\n",
> + d->name, pci_name(dev));
> goto out;
> }
>
> @@ -229,8 +229,8 @@ static int ide_pci_enable(struct pci_dev *dev, const struct ide_port_info *d)
>
> ret = pci_request_selected_regions(dev, bars, d->name);
> if (ret < 0)
> - printk(KERN_ERR "%s %s: can't reserve resources\n",
> - d->name, pci_name(dev));
> + pr_err("%s %s: can't reserve resources\n",
> + d->name, pci_name(dev));
> out:
> return ret;
> }
> @@ -256,18 +256,18 @@ 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;
> }
> if (pci_read_config_word(dev, PCI_COMMAND, &pcicmd)) {
> - printk(KERN_ERR "%s %s: error accessing PCI regs\n",
> - d->name, pci_name(dev));
> + pr_err("%s %s: error accessing PCI regs\n",
> + d->name, pci_name(dev));
> return -EIO;
> }
> if (!(pcicmd & PCI_COMMAND_IO)) {
> - printk(KERN_ERR "%s %s: unable to enable IDE controller\n",
> - d->name, pci_name(dev));
> + pr_err("%s %s: unable to enable IDE controller\n",
> + d->name, pci_name(dev));
> return -ENXIO;
> }
> return 0;
> @@ -322,9 +322,9 @@ static int ide_hw_configure(struct pci_dev *dev, const struct ide_port_info *d,
> if ((d->host_flags & IDE_HFLAG_ISA_PORTS) == 0) {
> if (ide_pci_check_iomem(dev, d, 2 * port) ||
> ide_pci_check_iomem(dev, d, 2 * port + 1)) {
> - printk(KERN_ERR "%s %s: I/O baseregs (BIOS) are "
> - "reported as MEM for port %d!\n",
> - d->name, pci_name(dev), port);
> + pr_err("%s %s: I/O baseregs (BIOS) are "
> + "reported as MEM for port %d!\n",
> + d->name, pci_name(dev), port);
> return -EINVAL;
> }
>
> @@ -337,8 +337,8 @@ static int ide_hw_configure(struct pci_dev *dev, const struct ide_port_info *d,
> }
>
> if (!base || !ctl) {
> - printk(KERN_ERR "%s %s: bad PCI BARs for port %d, skipping\n",
> - d->name, pci_name(dev), port);
> + pr_err("%s %s: bad PCI BARs for port %d, skipping\n",
> + d->name, pci_name(dev), port);
> return -EINVAL;
> }
>
> @@ -426,15 +426,15 @@ static int ide_setup_pci_controller(struct pci_dev *dev,
>
> ret = pci_read_config_word(dev, PCI_COMMAND, &pcicmd);
> if (ret < 0) {
> - printk(KERN_ERR "%s %s: error accessing PCI regs\n",
> - d->name, pci_name(dev));
> + pr_err("%s %s: error accessing PCI regs\n",
> + d->name, pci_name(dev));
> goto out;
> }
> if (!(pcicmd & PCI_COMMAND_IO)) { /* is device disabled? */
> 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 "
> + 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);
> + pr_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);
> }
Seems like it would be more beneficial to convert the above printk()s
to use dev_*(&dev->dev) instead (please note the "%s %s: " prefix).
next prev parent reply other threads:[~2009-06-02 14:14 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-23 7:41 [PATCH 0/3] drivers/ide/ide-core: Use dev_<level> and pr_<level> Joe Perches
2009-05-23 7:41 ` [PATCH 1/3] drivers/ide/ide-core: Convert printk(KERN_<level> to dev_<level> Joe Perches
2009-06-02 13:57 ` Bartlomiej Zolnierkiewicz
2009-05-23 7:41 ` [PATCH 2/3] drivers/ide/ide-core: Convert printk(KERN_<level> to pr_<level> Joe Perches
2009-06-02 14:02 ` Bartlomiej Zolnierkiewicz [this message]
2009-05-23 7:41 ` [PATCH 3/3] drivers/ide/ide-core: Unsplit constant strings for pr_<level> and dev_<level> Joe Perches
2009-05-24 12:12 ` Sergei Shtylyov
2009-05-24 16:46 ` Joe Perches
2009-05-24 18:00 ` Sergei Shtylyov
2009-06-02 14:19 ` Bartlomiej Zolnierkiewicz
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=200906021602.42848.bzolnier@gmail.com \
--to=bzolnier@gmail.com \
--cc=joe@perches.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=petkovbb@gmail.com \
--cc=sshtylyov@ru.mvista.com \
--cc=tj@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.