2012-10-28 08:06:57

by Joe Perches

[permalink] [raw]
Subject: [PATCH 00/16] treewide: Convert dev_printk(KERN_<LEVEL> to dev_<level>(

dev_<level> create smaller objects than dev_printk(KERN_<LEVEL>.
Convert non-debug calls to this form.

Joe Perches (16):
tile: Convert dev_printk(KERN_<LEVEL> to dev_<level>(
ata: Convert dev_printk(KERN_<LEVEL> to dev_<level>(
drivers: base: Convert dev_printk(KERN_<LEVEL> to dev_<level>(
block: Convert dev_printk(KERN_<LEVEL> to dev_<level>(
pcmcia: Convert dev_printk(KERN_<LEVEL> to dev_<level>(
dma: Convert dev_printk(KERN_<LEVEL> to dev_<level>(
gpu: Convert dev_printk(KERN_<LEVEL> to dev_<level>(
i2c: Convert dev_printk(KERN_<LEVEL> to dev_<level>(
wireless: Convert dev_printk(KERN_<LEVEL> to dev_<level>(
ethernet: Convert dev_printk(KERN_<LEVEL> to dev_<level>(
pci: Convert dev_printk(KERN_<LEVEL> to dev_<level>(
scsi: Convert dev_printk(KERN_<LEVEL> to dev_<level>(
usb: Convert dev_printk(KERN_<LEVEL> to dev_<level>(
tile: Convert dev_printk(KERN_<LEVEL> to dev_<level>(
watchdog: Convert dev_printk(KERN_<LEVEL> to dev_<level>(
tile: Convert dev_printk(KERN_<LEVEL> to dev_<level>(

arch/tile/kernel/pci_gx.c | 15 ++---
drivers/ata/pata_cmd64x.c | 6 +-
drivers/base/attribute_container.c | 2 +-
drivers/base/devres.c | 4 +-
drivers/block/umem.c | 97 ++++++++++++--------------
drivers/char/pcmcia/cm4040_cs.c | 5 +-
drivers/dma/at_hdmac_regs.h | 8 +-
drivers/dma/iop-adma.c | 45 ++++++------
drivers/dma/mv_xor.c | 62 ++++++++----------
drivers/gpu/drm/gma500/cdv_intel_crt.c | 3 +-
drivers/gpu/drm/gma500/cdv_intel_lvds.c | 7 +-
drivers/gpu/drm/gma500/psb_intel_lvds.c | 7 +-
drivers/gpu/drm/i915/intel_opregion.c | 8 +-
drivers/i2c/busses/i2c-piix4.c | 5 +-
drivers/net/ethernet/chelsio/cxgb3/common.h | 7 +-
drivers/net/ethernet/marvell/pxa168_eth.c | 7 +-
drivers/net/wireless/at76c50x-usb.c | 85 +++++++++++------------
drivers/net/wireless/iwlegacy/common.h | 5 +-
drivers/net/wireless/iwlwifi/pcie/trans.c | 28 +++-----
drivers/pci/irq.c | 10 ++--
drivers/pci/pci-stub.c | 2 +-
drivers/pci/pcie/aspm.c | 7 +--
drivers/pcmcia/cistpl.c | 10 +--
drivers/pcmcia/cs.c | 28 +++-----
drivers/pcmcia/ds.c | 38 +++++------
drivers/pcmcia/pcmcia_cis.c | 4 +-
drivers/pcmcia/pcmcia_resource.c | 11 +--
drivers/pcmcia/rsrc_nonstatic.c | 24 +++----
drivers/pcmcia/ti113x.h | 80 +++++++++++------------
drivers/pcmcia/yenta_socket.c | 61 ++++++++---------
drivers/scsi/53c700.c | 2 +-
drivers/scsi/aic7xxx/aic79xx_osm_pci.c | 4 +-
drivers/scsi/aic7xxx/aic7xxx_osm_pci.c | 4 +-
drivers/scsi/aic94xx/aic94xx_tmf.c | 4 +-
drivers/scsi/bfa/bfad.c | 32 ++++-----
drivers/scsi/fcoe/fcoe_sysfs.c | 3 +-
drivers/scsi/lasi700.c | 2 +-
drivers/scsi/libsas/sas_task.c | 9 +--
drivers/scsi/lpfc/lpfc_attr.c | 8 +-
drivers/scsi/lpfc/lpfc_debugfs.h | 6 +-
drivers/scsi/lpfc/lpfc_hbadisc.c | 4 +-
drivers/scsi/lpfc/lpfc_init.c | 45 ++++++-------
drivers/scsi/mpt2sas/mpt2sas_transport.c | 91 ++++++++++++-------------
drivers/scsi/mvsas/mv_64xx.c | 2 +-
drivers/scsi/mvsas/mv_chips.h | 8 +-
drivers/scsi/mvsas/mv_init.c | 14 ++--
drivers/scsi/mvsas/mv_sas.c | 9 +--
drivers/scsi/pm8001/pm8001_init.c | 10 +--
drivers/scsi/pm8001/pm8001_sas.c | 4 +-
drivers/scsi/raid_class.c | 8 +-
drivers/scsi/scsi_scan.c | 3 +-
drivers/scsi/scsi_transport_fc.c | 31 ++++-----
drivers/scsi/scsi_transport_sas.c | 7 +-
drivers/scsi/sni_53c710.c | 2 +-
drivers/scsi/zalon.c | 4 +-
drivers/usb/core/hub.c | 2 +-
drivers/virtio/virtio_balloon.c | 7 +-
drivers/watchdog/mpcore_wdt.c | 19 +++---
sound/pci/asihpi/hpidspcd.c | 22 +++----
sound/pci/asihpi/hpioctl.c | 17 ++---
60 files changed, 485 insertions(+), 579 deletions(-)

--
1.7.8.112.g3fd21


2012-10-28 08:07:23

by Joe Perches

[permalink] [raw]
Subject: [PATCH 01/16] tile: Convert dev_printk(KERN_<LEVEL> to dev_<level>(

dev_<level> calls take less code than dev_printk(KERN_<LEVEL>
and reducing object size is good.
Coalesce formats for easier grep.

Signed-off-by: Joe Perches <[email protected]>
---
arch/tile/kernel/pci_gx.c | 15 ++++++---------
1 files changed, 6 insertions(+), 9 deletions(-)

diff --git a/arch/tile/kernel/pci_gx.c b/arch/tile/kernel/pci_gx.c
index 2ba6d05..cf1b378 100644
--- a/arch/tile/kernel/pci_gx.c
+++ b/arch/tile/kernel/pci_gx.c
@@ -1454,9 +1454,8 @@ int arch_setup_msi_irq(struct pci_dev *pdev, struct msi_desc *desc)
* Most PCIe endpoint devices do support 64-bit message addressing.
*/
if (desc->msi_attrib.is_64 == 0) {
- dev_printk(KERN_INFO, &pdev->dev,
- "64-bit MSI message address not supported, "
- "falling back to legacy interrupts.\n");
+ dev_info(&pdev->dev,
+ "64-bit MSI message address not supported, falling back to legacy interrupts\n");

ret = -ENOMEM;
goto is_64_failure;
@@ -1475,11 +1474,9 @@ int arch_setup_msi_irq(struct pci_dev *pdev, struct msi_desc *desc)
*/
mem_map = gxio_trio_alloc_memory_maps(trio_context, 1, 0, 0);
if (mem_map < 0) {
- dev_printk(KERN_INFO, &pdev->dev,
- "%s Mem-Map alloc failure. "
- "Failed to initialize MSI interrupts. "
- "Falling back to legacy interrupts.\n",
- desc->msi_attrib.is_msix ? "MSI-X" : "MSI");
+ dev_info(&pdev->dev,
+ "%s Mem-Map alloc failure. Failed to initialize MSI interrupts. Falling back to legacy interrupts.\n",
+ desc->msi_attrib.is_msix ? "MSI-X" : "MSI");

ret = -ENOMEM;
goto msi_mem_map_alloc_failure;
@@ -1501,7 +1498,7 @@ int arch_setup_msi_irq(struct pci_dev *pdev, struct msi_desc *desc)
mem_map, mem_map_base, mem_map_limit,
trio_context->asid);
if (ret < 0) {
- dev_printk(KERN_INFO, &pdev->dev, "HV MSI config failed.\n");
+ dev_info(&pdev->dev, "HV MSI config failed\n");

goto hv_msi_config_failure;
}
--
1.7.8.112.g3fd21

2012-10-28 08:07:36

by Joe Perches

[permalink] [raw]
Subject: [PATCH 02/16] ata: Convert dev_printk(KERN_<LEVEL> to dev_<level>(

dev_<level> calls take less code than dev_printk(KERN_<LEVEL>
and reducing object size is good.
Coalesce formats for easier grep.

Signed-off-by: Joe Perches <[email protected]>
---
drivers/ata/pata_cmd64x.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/ata/pata_cmd64x.c b/drivers/ata/pata_cmd64x.c
index 7ba0141..2949cfc 100644
--- a/drivers/ata/pata_cmd64x.c
+++ b/drivers/ata/pata_cmd64x.c
@@ -474,14 +474,14 @@ static int cmd64x_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
/* check for enabled ports */
pci_read_config_byte(pdev, CNTRL, &reg);
if (!port_ok)
- dev_printk(KERN_NOTICE, &pdev->dev, "Mobility Bridge detected, ignoring CNTRL port enable/disable\n");
+ dev_notice(&pdev->dev, "Mobility Bridge detected, ignoring CNTRL port enable/disable\n");
if (port_ok && cntrl_ch0_ok && !(reg & CNTRL_CH0)) {
- dev_printk(KERN_NOTICE, &pdev->dev, "Primary port is disabled\n");
+ dev_notice(&pdev->dev, "Primary port is disabled\n");
ppi[0] = &ata_dummy_port_info;

}
if (port_ok && !(reg & CNTRL_CH1)) {
- dev_printk(KERN_NOTICE, &pdev->dev, "Secondary port is disabled\n");
+ dev_notice(&pdev->dev, "Secondary port is disabled\n");
ppi[1] = &ata_dummy_port_info;
}

--
1.7.8.112.g3fd21

2012-10-28 08:07:50

by Joe Perches

[permalink] [raw]
Subject: [PATCH 03/16] drivers: base: Convert dev_printk(KERN_<LEVEL> to dev_<level>(

dev_<level> calls take less code than dev_printk(KERN_<LEVEL>
and reducing object size is good.

Signed-off-by: Joe Perches <[email protected]>
---
drivers/base/attribute_container.c | 2 +-
drivers/base/devres.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/base/attribute_container.c b/drivers/base/attribute_container.c
index 8fc200b..d78b204 100644
--- a/drivers/base/attribute_container.c
+++ b/drivers/base/attribute_container.c
@@ -158,7 +158,7 @@ attribute_container_add_device(struct device *dev,

ic = kzalloc(sizeof(*ic), GFP_KERNEL);
if (!ic) {
- dev_printk(KERN_ERR, dev, "failed to allocate class container\n");
+ dev_err(dev, "failed to allocate class container\n");
continue;
}

diff --git a/drivers/base/devres.c b/drivers/base/devres.c
index 8731979..6683906 100644
--- a/drivers/base/devres.c
+++ b/drivers/base/devres.c
@@ -50,8 +50,8 @@ static void devres_log(struct device *dev, struct devres_node *node,
const char *op)
{
if (unlikely(log_devres))
- dev_printk(KERN_ERR, dev, "DEVRES %3s %p %s (%lu bytes)\n",
- op, node, node->name, (unsigned long)node->size);
+ dev_err(dev, "DEVRES %3s %p %s (%lu bytes)\n",
+ op, node, node->name, (unsigned long)node->size);
}
#else /* CONFIG_DEBUG_DEVRES */
#define set_node_dbginfo(node, n, s) do {} while (0)
--
1.7.8.112.g3fd21

2012-10-28 08:08:07

by Joe Perches

[permalink] [raw]
Subject: [PATCH 04/16] block: Convert dev_printk(KERN_<LEVEL> to dev_<level>(

dev_<level> calls take less code than dev_printk(KERN_<LEVEL>
and reducing object size is good.

Signed-off-by: Joe Perches <[email protected]>
---
drivers/block/umem.c | 97 +++++++++++++++++++++++---------------------------
1 files changed, 45 insertions(+), 52 deletions(-)

diff --git a/drivers/block/umem.c b/drivers/block/umem.c
index eb0d821..bd1c14c 100644
--- a/drivers/block/umem.c
+++ b/drivers/block/umem.c
@@ -461,18 +461,18 @@ static void process_page(unsigned long data)
if (control & DMASCR_HARD_ERROR) {
/* error */
clear_bit(BIO_UPTODATE, &bio->bi_flags);
- dev_printk(KERN_WARNING, &card->dev->dev,
- "I/O error on sector %d/%d\n",
- le32_to_cpu(desc->local_addr)>>9,
- le32_to_cpu(desc->transfer_size));
+ dev_warn(&card->dev->dev,
+ "I/O error on sector %d/%d\n",
+ le32_to_cpu(desc->local_addr)>>9,
+ le32_to_cpu(desc->transfer_size));
dump_dmastat(card, control);
} else if ((bio->bi_rw & REQ_WRITE) &&
le32_to_cpu(desc->local_addr) >> 9 ==
card->init_size) {
card->init_size += le32_to_cpu(desc->transfer_size) >> 9;
if (card->init_size >> 1 >= card->mm_size) {
- dev_printk(KERN_INFO, &card->dev->dev,
- "memory now initialised\n");
+ dev_info(&card->dev->dev,
+ "memory now initialised\n");
set_userbit(card, MEMORY_INITIALIZED, 1);
}
}
@@ -591,17 +591,16 @@ HW_TRACE(0x30);
dump_dmastat(card, dma_status);

if (stat & 0x01)
- dev_printk(KERN_ERR, &card->dev->dev,
+ dev_err(&card->dev->dev,
"Memory access error detected (err count %d)\n",
count);
if (stat & 0x02)
- dev_printk(KERN_ERR, &card->dev->dev,
- "Multi-bit EDC error\n");
+ dev_err(&card->dev->dev, "Multi-bit EDC error\n");

- dev_printk(KERN_ERR, &card->dev->dev,
+ dev_err(&card->dev->dev,
"Fault Address 0x%02x%08x, Fault Data 0x%08x%08x\n",
addr_log2, addr_log1, data_log2, data_log1);
- dev_printk(KERN_ERR, &card->dev->dev,
+ dev_err(&card->dev->dev,
"Fault Check 0x%02x, Fault Syndrome 0x%02x\n",
check, syndrome);

@@ -609,33 +608,31 @@ HW_TRACE(0x30);
}

if (dma_status & DMASCR_PARITY_ERR_REP) {
- dev_printk(KERN_ERR, &card->dev->dev,
- "PARITY ERROR REPORTED\n");
+ dev_err(&card->dev->dev, "PARITY ERROR REPORTED\n");
pci_read_config_word(card->dev, PCI_STATUS, &cfg_status);
pci_write_config_word(card->dev, PCI_STATUS, cfg_status);
}

if (dma_status & DMASCR_PARITY_ERR_DET) {
- dev_printk(KERN_ERR, &card->dev->dev,
- "PARITY ERROR DETECTED\n");
+ dev_err(&card->dev->dev, "PARITY ERROR DETECTED\n");
pci_read_config_word(card->dev, PCI_STATUS, &cfg_status);
pci_write_config_word(card->dev, PCI_STATUS, cfg_status);
}

if (dma_status & DMASCR_SYSTEM_ERR_SIG) {
- dev_printk(KERN_ERR, &card->dev->dev, "SYSTEM ERROR\n");
+ dev_err(&card->dev->dev, "SYSTEM ERROR\n");
pci_read_config_word(card->dev, PCI_STATUS, &cfg_status);
pci_write_config_word(card->dev, PCI_STATUS, cfg_status);
}

if (dma_status & DMASCR_TARGET_ABT) {
- dev_printk(KERN_ERR, &card->dev->dev, "TARGET ABORT\n");
+ dev_err(&card->dev->dev, "TARGET ABORT\n");
pci_read_config_word(card->dev, PCI_STATUS, &cfg_status);
pci_write_config_word(card->dev, PCI_STATUS, cfg_status);
}

if (dma_status & DMASCR_MASTER_ABT) {
- dev_printk(KERN_ERR, &card->dev->dev, "MASTER ABORT\n");
+ dev_err(&card->dev->dev, "MASTER ABORT\n");
pci_read_config_word(card->dev, PCI_STATUS, &cfg_status);
pci_write_config_word(card->dev, PCI_STATUS, cfg_status);
}
@@ -676,19 +673,19 @@ static int check_battery(struct cardinfo *card, int battery, int status)
card->battery[battery].last_change = jiffies;

if (card->battery[battery].good) {
- dev_printk(KERN_ERR, &card->dev->dev,
- "Battery %d now good\n", battery + 1);
+ dev_err(&card->dev->dev, "Battery %d now good\n",
+ battery + 1);
card->battery[battery].warned = 0;
} else
- dev_printk(KERN_ERR, &card->dev->dev,
- "Battery %d now FAILED\n", battery + 1);
+ dev_err(&card->dev->dev, "Battery %d now FAILED\n",
+ battery + 1);

return 1;
} else if (!card->battery[battery].good &&
!card->battery[battery].warned &&
time_after_eq(jiffies, card->battery[battery].last_change +
(HZ * 60 * 60 * 5))) {
- dev_printk(KERN_ERR, &card->dev->dev,
+ dev_err(&card->dev->dev,
"Battery %d still FAILED after 5 hours\n", battery + 1);
card->battery[battery].warned = 1;

@@ -819,34 +816,31 @@ static int __devinit mm_pci_probe(struct pci_dev *dev,
if (!csr_base || !csr_len)
return -ENODEV;

- dev_printk(KERN_INFO, &dev->dev,
- "Micro Memory(tm) controller found (PCI Mem Module (Battery Backup))\n");
+ dev_info(&dev->dev,
+ "Micro Memory(tm) controller found (PCI Mem Module (Battery Backup))\n");

if (pci_set_dma_mask(dev, DMA_BIT_MASK(64)) &&
pci_set_dma_mask(dev, DMA_BIT_MASK(32))) {
- dev_printk(KERN_WARNING, &dev->dev, "NO suitable DMA found\n");
+ dev_warn(&dev->dev, "NO suitable DMA found\n");
return -ENOMEM;
}

ret = pci_request_regions(dev, DRIVER_NAME);
if (ret) {
- dev_printk(KERN_ERR, &card->dev->dev,
- "Unable to request memory region\n");
+ dev_err(&card->dev->dev, "Unable to request memory region\n");
goto failed_req_csr;
}

card->csr_remap = ioremap_nocache(csr_base, csr_len);
if (!card->csr_remap) {
- dev_printk(KERN_ERR, &card->dev->dev,
- "Unable to remap memory region\n");
+ dev_err(&card->dev->dev, "Unable to remap memory region\n");
ret = -ENOMEM;

goto failed_remap_csr;
}

- dev_printk(KERN_INFO, &card->dev->dev,
- "CSR 0x%08lx -> 0x%p (0x%lx)\n",
- csr_base, card->csr_remap, csr_len);
+ dev_info(&card->dev->dev, "CSR 0x%08lx -> 0x%p (0x%lx)\n",
+ csr_base, card->csr_remap, csr_len);

switch (card->dev->device) {
case 0x5415:
@@ -871,7 +865,7 @@ static int __devinit mm_pci_probe(struct pci_dev *dev,
}

if (readb(card->csr_remap + MEMCTRLSTATUS_MAGIC) != magic_number) {
- dev_printk(KERN_ERR, &card->dev->dev, "Magic number invalid\n");
+ dev_err(&card->dev->dev, "Magic number invalid\n");
ret = -ENOMEM;
goto failed_magic;
}
@@ -884,7 +878,7 @@ static int __devinit mm_pci_probe(struct pci_dev *dev,
&card->mm_pages[1].page_dma);
if (card->mm_pages[0].desc == NULL ||
card->mm_pages[1].desc == NULL) {
- dev_printk(KERN_ERR, &card->dev->dev, "alloc failed\n");
+ dev_err(&card->dev->dev, "alloc failed\n");
goto failed_alloc;
}
reset_page(&card->mm_pages[0]);
@@ -939,16 +933,17 @@ static int __devinit mm_pci_probe(struct pci_dev *dev,
card->battery[0].last_change = card->battery[1].last_change = jiffies;

if (card->flags & UM_FLAG_NO_BATT)
- dev_printk(KERN_INFO, &card->dev->dev,
- "Size %d KB\n", card->mm_size);
+ dev_info(&card->dev->dev, "Size %d KB\n", card->mm_size);
else {
- dev_printk(KERN_INFO, &card->dev->dev,
- "Size %d KB, Battery 1 %s (%s), Battery 2 %s (%s)\n",
- card->mm_size,
- batt_status & BATTERY_1_DISABLED ? "Disabled" : "Enabled",
- card->battery[0].good ? "OK" : "FAILURE",
- batt_status & BATTERY_2_DISABLED ? "Disabled" : "Enabled",
- card->battery[1].good ? "OK" : "FAILURE");
+ dev_info(&card->dev->dev,
+ "Size %d KB, Battery 1 %s (%s), Battery 2 %s (%s)\n",
+ card->mm_size,
+ batt_status & BATTERY_1_DISABLED ?
+ "Disabled" : "Enabled",
+ card->battery[0].good ? "OK" : "FAILURE",
+ batt_status & BATTERY_2_DISABLED ?
+ "Disabled" : "Enabled",
+ card->battery[1].good ? "OK" : "FAILURE");

set_fault_to_battery_status(card);
}
@@ -964,14 +959,13 @@ static int __devinit mm_pci_probe(struct pci_dev *dev,

if (request_irq(dev->irq, mm_interrupt, IRQF_SHARED, DRIVER_NAME,
card)) {
- dev_printk(KERN_ERR, &card->dev->dev,
- "Unable to allocate IRQ\n");
+ dev_err(&card->dev->dev, "Unable to allocate IRQ\n");
ret = -ENODEV;
goto failed_req_irq;
}

- dev_printk(KERN_INFO, &card->dev->dev,
- "Window size %d bytes, IRQ %d\n", data, dev->irq);
+ dev_info(&card->dev->dev, "Window size %d bytes, IRQ %d\n",
+ data, dev->irq);

spin_lock_init(&card->lock);

@@ -991,12 +985,11 @@ static int __devinit mm_pci_probe(struct pci_dev *dev,
num_cards++;

if (!get_userbit(card, MEMORY_INITIALIZED)) {
- dev_printk(KERN_INFO, &card->dev->dev,
- "memory NOT initialized. Consider over-writing whole device.\n");
+ dev_info(&card->dev->dev,
+ "memory NOT initialized. Consider over-writing whole device.\n");
card->init_size = 0;
} else {
- dev_printk(KERN_INFO, &card->dev->dev,
- "memory already initialized\n");
+ dev_info(&card->dev->dev, "memory already initialized\n");
card->init_size = card->mm_size;
}

--
1.7.8.112.g3fd21

2012-10-28 08:08:26

by Joe Perches

[permalink] [raw]
Subject: [PATCH 05/16] pcmcia: Convert dev_printk(KERN_<LEVEL> to dev_<level>(

dev_<level> calls take less code than dev_printk(KERN_<LEVEL>
and reducing object size is good.
Coalesce formats for easier grep.
Add missing newline.

Signed-off-by: Joe Perches <[email protected]>
---
drivers/char/pcmcia/cm4040_cs.c | 5 +-
drivers/pcmcia/cistpl.c | 10 ++---
drivers/pcmcia/cs.c | 28 ++++++--------
drivers/pcmcia/ds.c | 38 ++++++++----------
drivers/pcmcia/pcmcia_cis.c | 4 +-
drivers/pcmcia/pcmcia_resource.c | 11 ++---
drivers/pcmcia/rsrc_nonstatic.c | 24 +++++------
drivers/pcmcia/ti113x.h | 80 ++++++++++++++++++--------------------
drivers/pcmcia/yenta_socket.c | 61 +++++++++++++---------------
9 files changed, 118 insertions(+), 143 deletions(-)

diff --git a/drivers/char/pcmcia/cm4040_cs.c b/drivers/char/pcmcia/cm4040_cs.c
index 8dd48a2..fc061f7 100644
--- a/drivers/char/pcmcia/cm4040_cs.c
+++ b/drivers/char/pcmcia/cm4040_cs.c
@@ -532,9 +532,8 @@ static int reader_config(struct pcmcia_device *link, int devno)

fail_rc = pcmcia_enable_device(link);
if (fail_rc != 0) {
- dev_printk(KERN_INFO, &link->dev,
- "pcmcia_enable_device failed 0x%x\n",
- fail_rc);
+ dev_info(&link->dev, "pcmcia_enable_device failed 0x%x\n",
+ fail_rc);
goto cs_release;
}

diff --git a/drivers/pcmcia/cistpl.c b/drivers/pcmcia/cistpl.c
index 884a984..8641bff 100644
--- a/drivers/pcmcia/cistpl.c
+++ b/drivers/pcmcia/cistpl.c
@@ -94,8 +94,7 @@ static void __iomem *set_cis_map(struct pcmcia_socket *s,
mem->res = pcmcia_find_mem_region(0, s->map_size,
s->map_size, 0, s);
if (mem->res == NULL) {
- dev_printk(KERN_NOTICE, &s->dev,
- "cs: unable to map card memory!\n");
+ dev_notice(&s->dev, "cs: unable to map card memory!\n");
return NULL;
}
s->cis_virt = NULL;
@@ -378,8 +377,7 @@ int verify_cis_cache(struct pcmcia_socket *s)

buf = kmalloc(256, GFP_KERNEL);
if (buf == NULL) {
- dev_printk(KERN_WARNING, &s->dev,
- "no memory for verifying CIS\n");
+ dev_warn(&s->dev, "no memory for verifying CIS\n");
return -ENOMEM;
}
mutex_lock(&s->ops_mutex);
@@ -411,14 +409,14 @@ int pcmcia_replace_cis(struct pcmcia_socket *s,
const u8 *data, const size_t len)
{
if (len > CISTPL_MAX_CIS_SIZE) {
- dev_printk(KERN_WARNING, &s->dev, "replacement CIS too big\n");
+ dev_warn(&s->dev, "replacement CIS too big\n");
return -EINVAL;
}
mutex_lock(&s->ops_mutex);
kfree(s->fake_cis);
s->fake_cis = kmalloc(len, GFP_KERNEL);
if (s->fake_cis == NULL) {
- dev_printk(KERN_WARNING, &s->dev, "no memory to replace CIS\n");
+ dev_warn(&s->dev, "no memory to replace CIS\n");
mutex_unlock(&s->ops_mutex);
return -ENOMEM;
}
diff --git a/drivers/pcmcia/cs.c b/drivers/pcmcia/cs.c
index 5292db6..9628a59 100644
--- a/drivers/pcmcia/cs.c
+++ b/drivers/pcmcia/cs.c
@@ -177,8 +177,8 @@ int pcmcia_register_socket(struct pcmcia_socket *socket)

wait_for_completion(&socket->thread_done);
if (!socket->thread) {
- dev_printk(KERN_WARNING, &socket->dev,
- "PCMCIA: warning: socket thread did not start\n");
+ dev_warn(&socket->dev,
+ "PCMCIA: warning: socket thread did not start\n");
return -EIO;
}

@@ -275,7 +275,7 @@ static int socket_reset(struct pcmcia_socket *skt)
msleep(unreset_check * 10);
}

- dev_printk(KERN_ERR, &skt->dev, "time out after reset.\n");
+ dev_err(&skt->dev, "time out after reset\n");
return -ETIMEDOUT;
}

@@ -325,8 +325,8 @@ static void socket_shutdown(struct pcmcia_socket *s)

s->ops->get_status(s, &status);
if (status & SS_POWERON) {
- dev_printk(KERN_ERR, &s->dev,
- "*** DANGER *** unable to remove socket power\n");
+ dev_err(&s->dev,
+ "*** DANGER *** unable to remove socket power\n");
}

s->state &= ~SOCKET_INUSE;
@@ -356,15 +356,13 @@ static int socket_setup(struct pcmcia_socket *skt, int initial_delay)
}

if (status & SS_PENDING) {
- dev_printk(KERN_ERR, &skt->dev,
- "voltage interrogation timed out.\n");
+ dev_err(&skt->dev, "voltage interrogation timed out\n");
return -ETIMEDOUT;
}

if (status & SS_CARDBUS) {
if (!(skt->features & SS_CAP_CARDBUS)) {
- dev_printk(KERN_ERR, &skt->dev,
- "cardbus cards are not supported.\n");
+ dev_err(&skt->dev, "cardbus cards are not supported\n");
return -EINVAL;
}
skt->state |= SOCKET_CARDBUS;
@@ -379,7 +377,7 @@ static int socket_setup(struct pcmcia_socket *skt, int initial_delay)
else if (!(status & SS_XVCARD))
skt->socket.Vcc = skt->socket.Vpp = 50;
else {
- dev_printk(KERN_ERR, &skt->dev, "unsupported voltage key.\n");
+ dev_err(&skt->dev, "unsupported voltage key\n");
return -EIO;
}

@@ -396,7 +394,7 @@ static int socket_setup(struct pcmcia_socket *skt, int initial_delay)

skt->ops->get_status(skt, &status);
if (!(status & SS_POWERON)) {
- dev_printk(KERN_ERR, &skt->dev, "unable to apply power.\n");
+ dev_err(&skt->dev, "unable to apply power\n");
return -EIO;
}

@@ -429,7 +427,7 @@ static int socket_insert(struct pcmcia_socket *skt)
if (ret == 0) {
skt->state |= SOCKET_PRESENT;

- dev_printk(KERN_NOTICE, &skt->dev,
+ dev_notice(&skt->dev,
"pccard: %s card inserted into slot %d\n",
(skt->state & SOCKET_CARDBUS) ? "CardBus" : "PCMCIA",
skt->sock);
@@ -558,8 +556,7 @@ static int socket_resume(struct pcmcia_socket *skt)

static void socket_remove(struct pcmcia_socket *skt)
{
- dev_printk(KERN_NOTICE, &skt->dev,
- "pccard: card ejected from slot %d\n", skt->sock);
+ dev_notice(&skt->dev, "pccard: card ejected from slot %d\n", skt->sock);
socket_shutdown(skt);
}

@@ -605,8 +602,7 @@ static int pccardd(void *__skt)
/* register with the device core */
ret = device_register(&skt->dev);
if (ret) {
- dev_printk(KERN_WARNING, &skt->dev,
- "PCMCIA: unable to register socket\n");
+ dev_warn(&skt->dev, "PCMCIA: unable to register socket\n");
skt->thread = NULL;
complete(&skt->thread_done);
return 0;
diff --git a/drivers/pcmcia/ds.c b/drivers/pcmcia/ds.c
index 079629b..b92a278 100644
--- a/drivers/pcmcia/ds.c
+++ b/drivers/pcmcia/ds.c
@@ -284,8 +284,8 @@ static int pcmcia_device_probe(struct device *dev)
dev_dbg(dev, "base %x, regs %x", p_dev->config_base,
p_dev->config_regs);
} else {
- dev_printk(KERN_INFO, dev,
- "pcmcia: could not parse base and rmask0 of CIS\n");
+ dev_info(dev,
+ "pcmcia: could not parse base and rmask0 of CIS\n");
p_dev->config_base = 0;
p_dev->config_regs = 0;
}
@@ -382,15 +382,15 @@ static int pcmcia_device_remove(struct device *dev)

/* check for proper unloading */
if (p_dev->_irq || p_dev->_io || p_dev->_locked)
- dev_printk(KERN_INFO, dev,
- "pcmcia: driver %s did not release config properly\n",
- p_drv->name);
+ dev_info(dev,
+ "pcmcia: driver %s did not release config properly\n",
+ p_drv->name);

for (i = 0; i < MAX_WIN; i++)
if (p_dev->_win & CLIENT_WIN_REQ(i))
- dev_printk(KERN_INFO, dev,
- "pcmcia: driver %s did not release window properly\n",
- p_drv->name);
+ dev_info(dev,
+ "pcmcia: driver %s did not release window properly\n",
+ p_drv->name);

/* references from pcmcia_probe_device */
pcmcia_put_dev(p_dev);
@@ -578,7 +578,7 @@ static struct pcmcia_device *pcmcia_device_add(struct pcmcia_socket *s,

mutex_unlock(&s->ops_mutex);

- dev_printk(KERN_NOTICE, &p_dev->dev,
+ dev_notice(&p_dev->dev,
"pcmcia: registering new device %s (IRQ: %d)\n",
p_dev->devname, p_dev->irq);

@@ -742,16 +742,14 @@ static int pcmcia_load_firmware(struct pcmcia_device *dev, char * filename)
if (request_firmware(&fw, filename, &dev->dev) == 0) {
if (fw->size >= CISTPL_MAX_CIS_SIZE) {
ret = -EINVAL;
- dev_printk(KERN_ERR, &dev->dev,
- "pcmcia: CIS override is too big\n");
+ dev_err(&dev->dev, "pcmcia: CIS override is too big\n");
goto release;
}

if (!pcmcia_replace_cis(s, fw->data, fw->size))
ret = 0;
else {
- dev_printk(KERN_ERR, &dev->dev,
- "pcmcia: CIS override failed\n");
+ dev_err(&dev->dev, "pcmcia: CIS override failed\n");
goto release;
}

@@ -1143,10 +1141,9 @@ static int pcmcia_dev_suspend(struct device *dev, pm_message_t state)
if (p_drv->suspend) {
ret = p_drv->suspend(p_dev);
if (ret) {
- dev_printk(KERN_ERR, dev,
- "pcmcia: device %s (driver %s) did "
- "not want to go to sleep (%d)\n",
- p_dev->devname, p_drv->name, ret);
+ dev_err(dev,
+ "pcmcia: device %s (driver %s) did not want to go to sleep (%d)\n",
+ p_dev->devname, p_drv->name, ret);
mutex_lock(&p_dev->socket->ops_mutex);
p_dev->suspended = 0;
mutex_unlock(&p_dev->socket->ops_mutex);
@@ -1337,14 +1334,13 @@ static int __devinit pcmcia_bus_add_socket(struct device *dev,

socket = pcmcia_get_socket(socket);
if (!socket) {
- dev_printk(KERN_ERR, dev,
- "PCMCIA obtaining reference to socket failed\n");
+ dev_err(dev, "PCMCIA obtaining reference to socket failed\n");
return -ENODEV;
}

ret = sysfs_create_bin_file(&dev->kobj, &pccard_cis_attr);
if (ret) {
- dev_printk(KERN_ERR, dev, "PCMCIA registration failed\n");
+ dev_err(dev, "PCMCIA registration failed\n");
pcmcia_put_socket(socket);
return ret;
}
@@ -1356,7 +1352,7 @@ static int __devinit pcmcia_bus_add_socket(struct device *dev,

ret = pccard_register_pcmcia(socket, &pcmcia_bus_callback);
if (ret) {
- dev_printk(KERN_ERR, dev, "PCMCIA registration failed\n");
+ dev_err(dev, "PCMCIA registration failed\n");
pcmcia_put_socket(socket);
return ret;
}
diff --git a/drivers/pcmcia/pcmcia_cis.c b/drivers/pcmcia/pcmcia_cis.c
index e2c9241..1c05d74 100644
--- a/drivers/pcmcia/pcmcia_cis.c
+++ b/drivers/pcmcia/pcmcia_cis.c
@@ -44,7 +44,7 @@ int pccard_read_tuple(struct pcmcia_socket *s, unsigned int function,

buf = kmalloc(256, GFP_KERNEL);
if (buf == NULL) {
- dev_printk(KERN_WARNING, &s->dev, "no memory to read tuple\n");
+ dev_warn(&s->dev, "no memory to read tuple\n");
return -ENOMEM;
}
tuple.DesiredTuple = code;
@@ -94,7 +94,7 @@ int pccard_loop_tuple(struct pcmcia_socket *s, unsigned int function,

buf = kzalloc(256, GFP_KERNEL);
if (buf == NULL) {
- dev_printk(KERN_WARNING, &s->dev, "no memory to read tuple\n");
+ dev_warn(&s->dev, "no memory to read tuple\n");
return -ENOMEM;
}

diff --git a/drivers/pcmcia/pcmcia_resource.c b/drivers/pcmcia/pcmcia_resource.c
index e8c19de..34aad89 100644
--- a/drivers/pcmcia/pcmcia_resource.c
+++ b/drivers/pcmcia/pcmcia_resource.c
@@ -508,8 +508,7 @@ int pcmcia_enable_device(struct pcmcia_device *p_dev)
s->socket.Vpp = p_dev->vpp;
if (s->ops->set_socket(s, &s->socket)) {
mutex_unlock(&s->ops_mutex);
- dev_printk(KERN_WARNING, &p_dev->dev,
- "Unable to set socket state\n");
+ dev_warn(&p_dev->dev, "Unable to set socket state\n");
return -EINVAL;
}

@@ -736,13 +735,11 @@ __pcmcia_request_exclusive_irq(struct pcmcia_device *p_dev,
ret = request_irq(p_dev->irq, handler, 0, p_dev->devname, p_dev->priv);
if (ret) {
ret = pcmcia_request_irq(p_dev, handler);
- dev_printk(KERN_WARNING, &p_dev->dev, "pcmcia: "
- "request for exclusive IRQ could not be fulfilled.\n");
- dev_printk(KERN_WARNING, &p_dev->dev, "pcmcia: the driver "
- "needs updating to supported shared IRQ lines.\n");
+ dev_warn(&p_dev->dev, "pcmcia: request for exclusive IRQ could not be fulfilled\n");
+ dev_warn(&p_dev->dev, "pcmcia: the driver needs updating to supported shared IRQ lines\n");
}
if (ret)
- dev_printk(KERN_INFO, &p_dev->dev, "request_irq() failed\n");
+ dev_info(&p_dev->dev, "request_irq() failed\n");
else
p_dev->_irq = 1;

diff --git a/drivers/pcmcia/rsrc_nonstatic.c b/drivers/pcmcia/rsrc_nonstatic.c
index 9da9656..4b9587a 100644
--- a/drivers/pcmcia/rsrc_nonstatic.c
+++ b/drivers/pcmcia/rsrc_nonstatic.c
@@ -191,15 +191,13 @@ static void do_io_probe(struct pcmcia_socket *s, unsigned int base,
int any;
u_char *b, hole, most;

- dev_printk(KERN_INFO, &s->dev, "cs: IO port probe %#x-%#x:",
- base, base+num-1);
+ dev_info(&s->dev, "cs: IO port probe %#x-%#x:", base, base+num - 1);

/* First, what does a floating port look like? */
b = kzalloc(256, GFP_KERNEL);
if (!b) {
printk("\n");
- dev_printk(KERN_ERR, &s->dev,
- "do_io_probe: unable to kmalloc 256 bytes");
+ dev_err(&s->dev, "do_io_probe: unable to kmalloc 256 bytes\n");
return;
}
for (i = base, most = 0; i < base+num; i += 8) {
@@ -413,8 +411,8 @@ static int do_mem_probe(struct pcmcia_socket *s, u_long base, u_long num,
struct socket_data *s_data = s->resource_data;
u_long i, j, bad, fail, step;

- dev_printk(KERN_INFO, &s->dev, "cs: memory probe 0x%06lx-0x%06lx:",
- base, base+num-1);
+ dev_info(&s->dev, "cs: memory probe 0x%06lx-0x%06lx:",
+ base, base + num - 1);
bad = fail = 0;
step = (num < 0x20000) ? 0x2000 : ((num>>4) & ~0x1fff);
/* don't allow too large steps */
@@ -495,7 +493,7 @@ static int validate_mem(struct pcmcia_socket *s, unsigned int probe_mask)
return 0;
if (s_data->mem_db_valid.next != &s_data->mem_db_valid)
return 0;
- dev_printk(KERN_NOTICE, &s->dev,
+ dev_notice(&s->dev,
"cs: warning: no high memory space available!\n");
return -ENODEV;
}
@@ -975,9 +973,9 @@ static int nonstatic_autoadd_resources(struct pcmcia_socket *s)
if (res == &ioport_resource)
continue;

- dev_printk(KERN_INFO, &s->cb_dev->dev,
- "pcmcia: parent PCI bridge window: %pR\n",
- res);
+ dev_info(&s->cb_dev->dev,
+ "pcmcia: parent PCI bridge window: %pR\n",
+ res);
if (!adjust_io(s, ADD_MANAGED_RESOURCE, res->start, res->end))
done |= IORESOURCE_IO;

@@ -990,9 +988,9 @@ static int nonstatic_autoadd_resources(struct pcmcia_socket *s)
if (res == &iomem_resource)
continue;

- dev_printk(KERN_INFO, &s->cb_dev->dev,
- "pcmcia: parent PCI bridge window: %pR\n",
- res);
+ dev_info(&s->cb_dev->dev,
+ "pcmcia: parent PCI bridge window: %pR\n",
+ res);
if (!adjust_memory(s, ADD_MANAGED_RESOURCE, res->start, res->end))
done |= IORESOURCE_MEM;
}
diff --git a/drivers/pcmcia/ti113x.h b/drivers/pcmcia/ti113x.h
index a717894..727e560 100644
--- a/drivers/pcmcia/ti113x.h
+++ b/drivers/pcmcia/ti113x.h
@@ -372,8 +372,8 @@ static void ti12xx_irqroute_func0(struct yenta_socket *socket)

mfunc = mfunc_old = config_readl(socket, TI122X_MFUNC);
devctl = config_readb(socket, TI113X_DEVICE_CONTROL);
- dev_printk(KERN_INFO, &socket->dev->dev,
- "TI: mfunc 0x%08x, devctl 0x%02x\n", mfunc, devctl);
+ dev_info(&socket->dev->dev,
+ "TI: mfunc 0x%08x, devctl 0x%02x\n", mfunc, devctl);

/* make sure PCI interrupts are enabled before probing */
ti_init(socket);
@@ -387,8 +387,8 @@ static void ti12xx_irqroute_func0(struct yenta_socket *socket)
* We're here which means PCI interrupts are _not_ delivered. try to
* find the right setting (all serial or parallel)
*/
- dev_printk(KERN_INFO, &socket->dev->dev,
- "TI: probing PCI interrupt failed, trying to fix\n");
+ dev_info(&socket->dev->dev,
+ "TI: probing PCI interrupt failed, trying to fix\n");

/* for serial PCI make sure MFUNC3 is set to IRQSER */
if ((devctl & TI113X_DCR_IMODE_MASK) == TI12XX_DCR_IMODE_ALL_SERIAL) {
@@ -412,8 +412,8 @@ static void ti12xx_irqroute_func0(struct yenta_socket *socket)

pci_irq_status = yenta_probe_cb_irq(socket);
if (pci_irq_status == 1) {
- dev_printk(KERN_INFO, &socket->dev->dev,
- "TI: all-serial interrupts ok\n");
+ dev_info(&socket->dev->dev,
+ "TI: all-serial interrupts ok\n");
mfunc_old = mfunc;
goto out;
}
@@ -428,8 +428,8 @@ static void ti12xx_irqroute_func0(struct yenta_socket *socket)
}

/* serial PCI interrupts not working fall back to parallel */
- dev_printk(KERN_INFO, &socket->dev->dev,
- "TI: falling back to parallel PCI interrupts\n");
+ dev_info(&socket->dev->dev,
+ "TI: falling back to parallel PCI interrupts\n");
devctl &= ~TI113X_DCR_IMODE_MASK;
devctl |= TI113X_DCR_IMODE_SERIAL; /* serial ISA could be right */
config_writeb(socket, TI113X_DEVICE_CONTROL, devctl);
@@ -460,8 +460,7 @@ static void ti12xx_irqroute_func0(struct yenta_socket *socket)
pci_irq_status = yenta_probe_cb_irq(socket);
if (pci_irq_status == 1) {
mfunc_old = mfunc;
- dev_printk(KERN_INFO, &socket->dev->dev,
- "TI: parallel PCI interrupts ok\n");
+ dev_info(&socket->dev->dev, "TI: parallel PCI interrupts ok\n");
} else {
/* not working, back to old value */
mfunc = mfunc_old;
@@ -473,9 +472,8 @@ static void ti12xx_irqroute_func0(struct yenta_socket *socket)
out:
if (pci_irq_status < 1) {
socket->cb_irq = 0;
- dev_printk(KERN_INFO, &socket->dev->dev,
- "Yenta TI: no PCI interrupts. Fish. "
- "Please report.\n");
+ dev_info(&socket->dev->dev,
+ "Yenta TI: no PCI interrupts. Fish. Please report.\n");
}
}

@@ -547,9 +545,8 @@ static void ti12xx_irqroute_func1(struct yenta_socket *socket)

mfunc = mfunc_old = config_readl(socket, TI122X_MFUNC);
devctl = config_readb(socket, TI113X_DEVICE_CONTROL);
- dev_printk(KERN_INFO, &socket->dev->dev,
- "TI: mfunc 0x%08x, devctl 0x%02x\n",
- mfunc, devctl);
+ dev_info(&socket->dev->dev, "TI: mfunc 0x%08x, devctl 0x%02x\n",
+ mfunc, devctl);

/* if IRQs are configured as tied, align irq of func1 with func0 */
sysctl = config_readl(socket, TI113X_SYSTEM_CONTROL);
@@ -568,8 +565,8 @@ static void ti12xx_irqroute_func1(struct yenta_socket *socket)
* We're here which means PCI interrupts are _not_ delivered. try to
* find the right setting
*/
- dev_printk(KERN_INFO, &socket->dev->dev,
- "TI: probing PCI interrupt failed, trying to fix\n");
+ dev_info(&socket->dev->dev,
+ "TI: probing PCI interrupt failed, trying to fix\n");

/* if all serial: set INTRTIE, probe again */
if ((devctl & TI113X_DCR_IMODE_MASK) == TI12XX_DCR_IMODE_ALL_SERIAL) {
@@ -578,8 +575,8 @@ static void ti12xx_irqroute_func1(struct yenta_socket *socket)
if (ti12xx_tie_interrupts(socket, &old_irq)) {
pci_irq_status = yenta_probe_cb_irq(socket);
if (pci_irq_status == 1) {
- dev_printk(KERN_INFO, &socket->dev->dev,
- "TI: all-serial interrupts, tied ok\n");
+ dev_info(&socket->dev->dev,
+ "TI: all-serial interrupts, tied ok\n");
goto out;
}

@@ -616,8 +613,8 @@ static void ti12xx_irqroute_func1(struct yenta_socket *socket)

pci_irq_status = yenta_probe_cb_irq(socket);
if (pci_irq_status == 1) {
- dev_printk(KERN_INFO, &socket->dev->dev,
- "TI: parallel PCI interrupts ok\n");
+ dev_info(&socket->dev->dev,
+ "TI: parallel PCI interrupts ok\n");
goto out;
}

@@ -632,8 +629,8 @@ static void ti12xx_irqroute_func1(struct yenta_socket *socket)
if (ti12xx_tie_interrupts(socket, &old_irq)) {
pci_irq_status = yenta_probe_cb_irq(socket);
if (pci_irq_status == 1) {
- dev_printk(KERN_INFO, &socket->dev->dev,
- "TI: parallel PCI interrupts, tied ok\n");
+ dev_info(&socket->dev->dev,
+ "TI: parallel PCI interrupts, tied ok\n");
goto out;
}

@@ -644,8 +641,8 @@ static void ti12xx_irqroute_func1(struct yenta_socket *socket)
out:
if (pci_irq_status < 1) {
socket->cb_irq = 0;
- dev_printk(KERN_INFO, &socket->dev->dev,
- "TI: no PCI interrupts. Fish. Please report.\n");
+ dev_info(&socket->dev->dev,
+ "TI: no PCI interrupts. Fish. Please report.\n");
}
}

@@ -849,13 +846,12 @@ static int ti12xx_override(struct yenta_socket *socket)
/* make sure that memory burst is active */
val_orig = val = config_readl(socket, TI113X_SYSTEM_CONTROL);
if (disable_clkrun && PCI_FUNC(socket->dev->devfn) == 0) {
- dev_printk(KERN_INFO, &socket->dev->dev,
- "Disabling CLKRUN feature\n");
+ dev_info(&socket->dev->dev, "Disabling CLKRUN feature\n");
val |= TI113X_SCR_KEEPCLK;
}
if (!(val & TI122X_SCR_MRBURSTUP)) {
- dev_printk(KERN_INFO, &socket->dev->dev,
- "Enabling burst memory read transactions\n");
+ dev_info(&socket->dev->dev,
+ "Enabling burst memory read transactions\n");
val |= TI122X_SCR_MRBURSTUP;
}
if (val_orig != val)
@@ -866,12 +862,12 @@ static int ti12xx_override(struct yenta_socket *socket)
* CSC interrupts to PCI rather than INTVAL.
*/
val = config_readb(socket, TI1250_DIAGNOSTIC);
- dev_printk(KERN_INFO, &socket->dev->dev,
- "Using %s to route CSC interrupts to PCI\n",
- (val & TI1250_DIAG_PCI_CSC) ? "CSCINT" : "INTVAL");
- dev_printk(KERN_INFO, &socket->dev->dev,
- "Routing CardBus interrupts to %s\n",
- (val & TI1250_DIAG_PCI_IREQ) ? "PCI" : "ISA");
+ dev_info(&socket->dev->dev,
+ "Using %s to route CSC interrupts to PCI\n",
+ (val & TI1250_DIAG_PCI_CSC) ? "CSCINT" : "INTVAL");
+ dev_info(&socket->dev->dev,
+ "Routing CardBus interrupts to %s\n",
+ (val & TI1250_DIAG_PCI_IREQ) ? "PCI" : "ISA");

/* do irqrouting, depending on function */
if (PCI_FUNC(socket->dev->devfn) == 0)
@@ -896,9 +892,9 @@ static int ti1250_override(struct yenta_socket *socket)
diag |= TI1250_DIAG_PCI_CSC | TI1250_DIAG_PCI_IREQ;

if (diag != old) {
- dev_printk(KERN_INFO, &socket->dev->dev,
- "adjusting diagnostic: %02x -> %02x\n",
- old, diag);
+ dev_info(&socket->dev->dev,
+ "adjusting diagnostic: %02x -> %02x\n",
+ old, diag);
config_writeb(socket, TI1250_DIAGNOSTIC, diag);
}

@@ -963,9 +959,9 @@ static void ene_tune_bridge(struct pcmcia_socket *sock, struct pci_bus *bus)
/* default to clear TLTEnable bit, old behaviour */
test_c9 &= ~ENE_TEST_C9_TLTENABLE;

- dev_printk(KERN_INFO, &socket->dev->dev,
- "EnE: chaning testregister 0xC9, %02x -> %02x\n",
- old_c9, test_c9);
+ dev_info(&socket->dev->dev,
+ "EnE: chaning testregister 0xC9, %02x -> %02x\n",
+ old_c9, test_c9);
config_writeb(socket, ENE_TEST_C9, test_c9);
}

diff --git a/drivers/pcmcia/yenta_socket.c b/drivers/pcmcia/yenta_socket.c
index 667678d..00a7628 100644
--- a/drivers/pcmcia/yenta_socket.c
+++ b/drivers/pcmcia/yenta_socket.c
@@ -712,10 +712,9 @@ static int yenta_allocate_res(struct yenta_socket *socket, int nr, unsigned type
pcibios_bus_to_resource(dev, res, &region);
if (pci_claim_resource(dev, PCI_BRIDGE_RESOURCES + nr) == 0)
return 0;
- dev_printk(KERN_INFO, &dev->dev,
- "Preassigned resource %d busy or not available, "
- "reconfiguring...\n",
- nr);
+ dev_info(&dev->dev,
+ "Preassigned resource %d busy or not available, reconfiguring...\n",
+ nr);
}

if (type & IORESOURCE_IO) {
@@ -738,9 +737,9 @@ static int yenta_allocate_res(struct yenta_socket *socket, int nr, unsigned type
return 1;
}

- dev_printk(KERN_INFO, &dev->dev,
- "no resource of type %x available, trying to continue...\n",
- type);
+ dev_info(&dev->dev,
+ "no resource of type %x available, trying to continue...\n",
+ type);
res->start = res->end = res->flags = 0;
return 0;
}
@@ -979,8 +978,8 @@ static int yenta_probe_cb_irq(struct yenta_socket *socket)
socket->probe_status = 0;

if (request_irq(socket->cb_irq, yenta_probe_handler, IRQF_SHARED, "yenta", socket)) {
- dev_printk(KERN_WARNING, &socket->dev->dev,
- "request_irq() in yenta_probe_cb_irq() failed!\n");
+ dev_warn(&socket->dev->dev,
+ "request_irq() in yenta_probe_cb_irq() failed!\n");
return -1;
}

@@ -1019,9 +1018,8 @@ static void yenta_get_socket_capabilities(struct yenta_socket *socket, u32 isa_i
else
socket->socket.irq_mask = 0;

- dev_printk(KERN_INFO, &socket->dev->dev,
- "ISA IRQ mask 0x%04x, PCI irq %d\n",
- socket->socket.irq_mask, socket->cb_irq);
+ dev_info(&socket->dev->dev, "ISA IRQ mask 0x%04x, PCI irq %d\n",
+ socket->socket.irq_mask, socket->cb_irq);
}

/*
@@ -1111,9 +1109,9 @@ static void yenta_fixup_parent_bridge(struct pci_bus *cardbus_bridge)

/* Show that the wanted subordinate number is not possible: */
if (cardbus_bridge->busn_res.end > upper_limit)
- dev_printk(KERN_WARNING, &cardbus_bridge->dev,
- "Upper limit for fixing this "
- "bridge's parent bridge: #%02x\n", upper_limit);
+ dev_warn(&cardbus_bridge->dev,
+ "Upper limit for fixing this bridge's parent bridge: #%02x\n",
+ upper_limit);

/* If we have room to increase the bridge's subordinate number, */
if (bridge_to_fix->busn_res.end < upper_limit) {
@@ -1122,11 +1120,11 @@ static void yenta_fixup_parent_bridge(struct pci_bus *cardbus_bridge)
unsigned char subordinate_to_assign =
min_t(int, cardbus_bridge->busn_res.end, upper_limit);

- dev_printk(KERN_INFO, &bridge_to_fix->dev,
- "Raising subordinate bus# of parent "
- "bus (#%02x) from #%02x to #%02x\n",
- bridge_to_fix->number,
- (int)bridge_to_fix->busn_res.end, subordinate_to_assign);
+ dev_info(&bridge_to_fix->dev,
+ "Raising subordinate bus# of parent bus (#%02x) from #%02x to #%02x\n",
+ bridge_to_fix->number,
+ (int)bridge_to_fix->busn_res.end,
+ subordinate_to_assign);

/* Save the new subordinate in the bus struct of the bridge */
bridge_to_fix->busn_res.end = subordinate_to_assign;
@@ -1153,8 +1151,7 @@ static int __devinit yenta_probe(struct pci_dev *dev, const struct pci_device_id
* Bail out if so.
*/
if (!dev->subordinate) {
- dev_printk(KERN_ERR, &dev->dev, "no bus associated! "
- "(try 'pci=assign-busses')\n");
+ dev_err(&dev->dev, "no bus associated! (try 'pci=assign-busses')\n");
return -ENODEV;
}

@@ -1189,7 +1186,7 @@ static int __devinit yenta_probe(struct pci_dev *dev, const struct pci_device_id
goto disable;

if (!pci_resource_start(dev, 0)) {
- dev_printk(KERN_ERR, &dev->dev, "No cardbus resource!\n");
+ dev_err(&dev->dev, "No cardbus resource!\n");
ret = -ENODEV;
goto release;
}
@@ -1208,8 +1205,8 @@ static int __devinit yenta_probe(struct pci_dev *dev, const struct pci_device_id
* report the subsystem vendor and device for help debugging
* the irq stuff...
*/
- dev_printk(KERN_INFO, &dev->dev, "CardBus bridge found [%04x:%04x]\n",
- dev->subsystem_vendor, dev->subsystem_device);
+ dev_info(&dev->dev, "CardBus bridge found [%04x:%04x]\n",
+ dev->subsystem_vendor, dev->subsystem_device);

yenta_config_init(socket);

@@ -1241,12 +1238,10 @@ static int __devinit yenta_probe(struct pci_dev *dev, const struct pci_device_id
socket->poll_timer.data = (unsigned long)socket;
socket->poll_timer.expires = jiffies + HZ;
add_timer(&socket->poll_timer);
- dev_printk(KERN_INFO, &dev->dev,
- "no PCI IRQ, CardBus support disabled for this "
- "socket.\n");
- dev_printk(KERN_INFO, &dev->dev,
- "check your BIOS CardBus, BIOS IRQ or ACPI "
- "settings.\n");
+ dev_info(&dev->dev,
+ "no PCI IRQ, CardBus support disabled for this socket\n");
+ dev_info(&dev->dev,
+ "check your BIOS CardBus, BIOS IRQ or ACPI settings\n");
} else {
socket->socket.features |= SS_CAP_CARDBUS;
}
@@ -1254,8 +1249,8 @@ static int __devinit yenta_probe(struct pci_dev *dev, const struct pci_device_id
/* Figure out what the dang thing can do for the PCMCIA layer... */
yenta_interrogate(socket);
yenta_get_socket_capabilities(socket, isa_interrupts);
- dev_printk(KERN_INFO, &dev->dev,
- "Socket status: %08x\n", cb_readl(socket, CB_SOCKET_STATE));
+ dev_info(&dev->dev,
+ "Socket status: %08x\n", cb_readl(socket, CB_SOCKET_STATE));

yenta_fixup_parent_bridge(dev->subordinate);

--
1.7.8.112.g3fd21

2012-10-28 08:08:38

by Joe Perches

[permalink] [raw]
Subject: [PATCH 06/16] dma: Convert dev_printk(KERN_<LEVEL> to dev_<level>(

dev_<level> calls take less code than dev_printk(KERN_<LEVEL>
and reducing object size is good.
Coalesce formats for easier grep.

Signed-off-by: Joe Perches <[email protected]>
---
drivers/dma/at_hdmac_regs.h | 8 +++---
drivers/dma/iop-adma.c | 45 +++++++++++++++----------------
drivers/dma/mv_xor.c | 62 ++++++++++++++++++------------------------
3 files changed, 53 insertions(+), 62 deletions(-)

diff --git a/drivers/dma/at_hdmac_regs.h b/drivers/dma/at_hdmac_regs.h
index 116e4ad..0eb3c13 100644
--- a/drivers/dma/at_hdmac_regs.h
+++ b/drivers/dma/at_hdmac_regs.h
@@ -369,10 +369,10 @@ static void vdbg_dump_regs(struct at_dma_chan *atchan) {}

static void atc_dump_lli(struct at_dma_chan *atchan, struct at_lli *lli)
{
- dev_printk(KERN_CRIT, chan2dev(&atchan->chan_common),
- " desc: s0x%x d0x%x ctrl0x%x:0x%x l0x%x\n",
- lli->saddr, lli->daddr,
- lli->ctrla, lli->ctrlb, lli->dscr);
+ dev_crit(chan2dev(&atchan->chan_common),
+ " desc: s0x%x d0x%x ctrl0x%x:0x%x l0x%x\n",
+ lli->saddr, lli->daddr,
+ lli->ctrla, lli->ctrlb, lli->dscr);
}


diff --git a/drivers/dma/iop-adma.c b/drivers/dma/iop-adma.c
index 79e3eba..e11d930 100644
--- a/drivers/dma/iop-adma.c
+++ b/drivers/dma/iop-adma.c
@@ -936,7 +936,7 @@ static irqreturn_t iop_adma_err_handler(int irq, void *data)
struct iop_adma_chan *chan = data;
unsigned long status = iop_chan_get_status(chan);

- dev_printk(KERN_ERR, chan->device->common.dev,
+ dev_err(chan->device->common.dev,
"error ( %s%s%s%s%s%s%s)\n",
iop_is_err_int_parity(status, chan) ? "int_parity " : "",
iop_is_err_mcu_abort(status, chan) ? "mcu_abort " : "",
@@ -1017,7 +1017,7 @@ static int __devinit iop_adma_memcpy_self_test(struct iop_adma_device *device)

if (iop_adma_status(dma_chan, cookie, NULL) !=
DMA_SUCCESS) {
- dev_printk(KERN_ERR, dma_chan->device->dev,
+ dev_err(dma_chan->device->dev,
"Self-test copy timed out, disabling\n");
err = -ENODEV;
goto free_resources;
@@ -1027,7 +1027,7 @@ static int __devinit iop_adma_memcpy_self_test(struct iop_adma_device *device)
dma_sync_single_for_cpu(&iop_chan->device->pdev->dev, dest_dma,
IOP_ADMA_TEST_SIZE, DMA_FROM_DEVICE);
if (memcmp(src, dest, IOP_ADMA_TEST_SIZE)) {
- dev_printk(KERN_ERR, dma_chan->device->dev,
+ dev_err(dma_chan->device->dev,
"Self-test copy failed compare, disabling\n");
err = -ENODEV;
goto free_resources;
@@ -1117,7 +1117,7 @@ iop_adma_xor_val_self_test(struct iop_adma_device *device)

if (iop_adma_status(dma_chan, cookie, NULL) !=
DMA_SUCCESS) {
- dev_printk(KERN_ERR, dma_chan->device->dev,
+ dev_err(dma_chan->device->dev,
"Self-test xor timed out, disabling\n");
err = -ENODEV;
goto free_resources;
@@ -1129,7 +1129,7 @@ iop_adma_xor_val_self_test(struct iop_adma_device *device)
for (i = 0; i < (PAGE_SIZE / sizeof(u32)); i++) {
u32 *ptr = page_address(dest);
if (ptr[i] != cmp_word) {
- dev_printk(KERN_ERR, dma_chan->device->dev,
+ dev_err(dma_chan->device->dev,
"Self-test xor failed compare, disabling\n");
err = -ENODEV;
goto free_resources;
@@ -1163,14 +1163,14 @@ iop_adma_xor_val_self_test(struct iop_adma_device *device)
msleep(8);

if (iop_adma_status(dma_chan, cookie, NULL) != DMA_SUCCESS) {
- dev_printk(KERN_ERR, dma_chan->device->dev,
+ dev_err(dma_chan->device->dev,
"Self-test zero sum timed out, disabling\n");
err = -ENODEV;
goto free_resources;
}

if (zero_sum_result != 0) {
- dev_printk(KERN_ERR, dma_chan->device->dev,
+ dev_err(dma_chan->device->dev,
"Self-test zero sum failed compare, disabling\n");
err = -ENODEV;
goto free_resources;
@@ -1187,7 +1187,7 @@ iop_adma_xor_val_self_test(struct iop_adma_device *device)
msleep(8);

if (iop_adma_status(dma_chan, cookie, NULL) != DMA_SUCCESS) {
- dev_printk(KERN_ERR, dma_chan->device->dev,
+ dev_err(dma_chan->device->dev,
"Self-test memset timed out, disabling\n");
err = -ENODEV;
goto free_resources;
@@ -1196,7 +1196,7 @@ iop_adma_xor_val_self_test(struct iop_adma_device *device)
for (i = 0; i < PAGE_SIZE/sizeof(u32); i++) {
u32 *ptr = page_address(dest);
if (ptr[i]) {
- dev_printk(KERN_ERR, dma_chan->device->dev,
+ dev_err(dma_chan->device->dev,
"Self-test memset failed compare, disabling\n");
err = -ENODEV;
goto free_resources;
@@ -1219,14 +1219,14 @@ iop_adma_xor_val_self_test(struct iop_adma_device *device)
msleep(8);

if (iop_adma_status(dma_chan, cookie, NULL) != DMA_SUCCESS) {
- dev_printk(KERN_ERR, dma_chan->device->dev,
+ dev_err(dma_chan->device->dev,
"Self-test non-zero sum timed out, disabling\n");
err = -ENODEV;
goto free_resources;
}

if (zero_sum_result != 1) {
- dev_printk(KERN_ERR, dma_chan->device->dev,
+ dev_err(dma_chan->device->dev,
"Self-test non-zero sum failed compare, disabling\n");
err = -ENODEV;
goto free_resources;
@@ -1579,15 +1579,14 @@ static int __devinit iop_adma_probe(struct platform_device *pdev)
goto err_free_iop_chan;
}

- dev_printk(KERN_INFO, &pdev->dev, "Intel(R) IOP: "
- "( %s%s%s%s%s%s%s)\n",
- dma_has_cap(DMA_PQ, dma_dev->cap_mask) ? "pq " : "",
- dma_has_cap(DMA_PQ_VAL, dma_dev->cap_mask) ? "pq_val " : "",
- dma_has_cap(DMA_XOR, dma_dev->cap_mask) ? "xor " : "",
- dma_has_cap(DMA_XOR_VAL, dma_dev->cap_mask) ? "xor_val " : "",
- dma_has_cap(DMA_MEMSET, dma_dev->cap_mask) ? "fill " : "",
- dma_has_cap(DMA_MEMCPY, dma_dev->cap_mask) ? "cpy " : "",
- dma_has_cap(DMA_INTERRUPT, dma_dev->cap_mask) ? "intr " : "");
+ dev_info(&pdev->dev, "Intel(R) IOP: ( %s%s%s%s%s%s%s)\n",
+ dma_has_cap(DMA_PQ, dma_dev->cap_mask) ? "pq " : "",
+ dma_has_cap(DMA_PQ_VAL, dma_dev->cap_mask) ? "pq_val " : "",
+ dma_has_cap(DMA_XOR, dma_dev->cap_mask) ? "xor " : "",
+ dma_has_cap(DMA_XOR_VAL, dma_dev->cap_mask) ? "xor_val " : "",
+ dma_has_cap(DMA_MEMSET, dma_dev->cap_mask) ? "fill " : "",
+ dma_has_cap(DMA_MEMCPY, dma_dev->cap_mask) ? "cpy " : "",
+ dma_has_cap(DMA_INTERRUPT, dma_dev->cap_mask) ? "intr " : "");

dma_async_device_register(dma_dev);
goto out;
@@ -1651,8 +1650,8 @@ static void iop_chan_start_null_memcpy(struct iop_adma_chan *iop_chan)
/* run the descriptor */
iop_chan_enable(iop_chan);
} else
- dev_printk(KERN_ERR, iop_chan->device->common.dev,
- "failed to allocate null descriptor\n");
+ dev_err(iop_chan->device->common.dev,
+ "failed to allocate null descriptor\n");
spin_unlock_bh(&iop_chan->lock);
}

@@ -1704,7 +1703,7 @@ static void iop_chan_start_null_xor(struct iop_adma_chan *iop_chan)
/* run the descriptor */
iop_chan_enable(iop_chan);
} else
- dev_printk(KERN_ERR, iop_chan->device->common.dev,
+ dev_err(iop_chan->device->common.dev,
"failed to allocate null descriptor\n");
spin_unlock_bh(&iop_chan->lock);
}
diff --git a/drivers/dma/mv_xor.c b/drivers/dma/mv_xor.c
index e362e2b..f9d09ae 100644
--- a/drivers/dma/mv_xor.c
+++ b/drivers/dma/mv_xor.c
@@ -206,9 +206,9 @@ static void mv_set_mode(struct mv_xor_chan *chan,
op_mode = XOR_OPERATION_MODE_MEMSET;
break;
default:
- dev_printk(KERN_ERR, chan->device->common.dev,
- "error: unsupported operation %d.\n",
- type);
+ dev_err(chan->device->common.dev,
+ "error: unsupported operation %d\n",
+ type);
BUG();
return;
}
@@ -828,28 +828,22 @@ static void mv_dump_xor_regs(struct mv_xor_chan *chan)
u32 val;

val = __raw_readl(XOR_CONFIG(chan));
- dev_printk(KERN_ERR, chan->device->common.dev,
- "config 0x%08x.\n", val);
+ dev_err(chan->device->common.dev, "config 0x%08x\n", val);

val = __raw_readl(XOR_ACTIVATION(chan));
- dev_printk(KERN_ERR, chan->device->common.dev,
- "activation 0x%08x.\n", val);
+ dev_err(chan->device->common.dev, "activation 0x%08x\n", val);

val = __raw_readl(XOR_INTR_CAUSE(chan));
- dev_printk(KERN_ERR, chan->device->common.dev,
- "intr cause 0x%08x.\n", val);
+ dev_err(chan->device->common.dev, "intr cause 0x%08x\n", val);

val = __raw_readl(XOR_INTR_MASK(chan));
- dev_printk(KERN_ERR, chan->device->common.dev,
- "intr mask 0x%08x.\n", val);
+ dev_err(chan->device->common.dev, "intr mask 0x%08x\n", val);

val = __raw_readl(XOR_ERROR_CAUSE(chan));
- dev_printk(KERN_ERR, chan->device->common.dev,
- "error cause 0x%08x.\n", val);
+ dev_err(chan->device->common.dev, "error cause 0x%08x\n", val);

val = __raw_readl(XOR_ERROR_ADDR(chan));
- dev_printk(KERN_ERR, chan->device->common.dev,
- "error addr 0x%08x.\n", val);
+ dev_err(chan->device->common.dev, "error addr 0x%08x\n", val);
}

static void mv_xor_err_interrupt_handler(struct mv_xor_chan *chan,
@@ -861,9 +855,9 @@ static void mv_xor_err_interrupt_handler(struct mv_xor_chan *chan,
return;
}

- dev_printk(KERN_ERR, chan->device->common.dev,
- "error on chan %d. intr cause 0x%08x.\n",
- chan->idx, intr_cause);
+ dev_err(chan->device->common.dev,
+ "error on chan %d. intr cause 0x%08x\n",
+ chan->idx, intr_cause);

mv_dump_xor_regs(chan);
BUG();
@@ -950,8 +944,8 @@ static int __devinit mv_xor_memcpy_self_test(struct mv_xor_device *device)

if (mv_xor_status(dma_chan, cookie, NULL) !=
DMA_SUCCESS) {
- dev_printk(KERN_ERR, dma_chan->device->dev,
- "Self-test copy timed out, disabling\n");
+ dev_err(dma_chan->device->dev,
+ "Self-test copy timed out, disabling\n");
err = -ENODEV;
goto free_resources;
}
@@ -960,8 +954,8 @@ static int __devinit mv_xor_memcpy_self_test(struct mv_xor_device *device)
dma_sync_single_for_cpu(&mv_chan->device->pdev->dev, dest_dma,
MV_XOR_TEST_SIZE, DMA_FROM_DEVICE);
if (memcmp(src, dest, MV_XOR_TEST_SIZE)) {
- dev_printk(KERN_ERR, dma_chan->device->dev,
- "Self-test copy failed compare, disabling\n");
+ dev_err(dma_chan->device->dev,
+ "Self-test copy failed compare, disabling\n");
err = -ENODEV;
goto free_resources;
}
@@ -1048,8 +1042,8 @@ mv_xor_xor_self_test(struct mv_xor_device *device)

if (mv_xor_status(dma_chan, cookie, NULL) !=
DMA_SUCCESS) {
- dev_printk(KERN_ERR, dma_chan->device->dev,
- "Self-test xor timed out, disabling\n");
+ dev_err(dma_chan->device->dev,
+ "Self-test xor timed out, disabling\n");
err = -ENODEV;
goto free_resources;
}
@@ -1060,10 +1054,9 @@ mv_xor_xor_self_test(struct mv_xor_device *device)
for (i = 0; i < (PAGE_SIZE / sizeof(u32)); i++) {
u32 *ptr = page_address(dest);
if (ptr[i] != cmp_word) {
- dev_printk(KERN_ERR, dma_chan->device->dev,
- "Self-test xor failed compare, disabling."
- " index %d, data %x, expected %x\n", i,
- ptr[i], cmp_word);
+ dev_err(dma_chan->device->dev,
+ "Self-test xor failed compare, disabling. index %d, data %x, expected %x\n",
+ i, ptr[i], cmp_word);
err = -ENODEV;
goto free_resources;
}
@@ -1212,12 +1205,11 @@ static int __devinit mv_xor_probe(struct platform_device *pdev)
goto err_free_dma;
}

- dev_printk(KERN_INFO, &pdev->dev, "Marvell XOR: "
- "( %s%s%s%s)\n",
- dma_has_cap(DMA_XOR, dma_dev->cap_mask) ? "xor " : "",
- dma_has_cap(DMA_MEMSET, dma_dev->cap_mask) ? "fill " : "",
- dma_has_cap(DMA_MEMCPY, dma_dev->cap_mask) ? "cpy " : "",
- dma_has_cap(DMA_INTERRUPT, dma_dev->cap_mask) ? "intr " : "");
+ dev_info(&pdev->dev, "Marvell XOR: ( %s%s%s%s)\n",
+ dma_has_cap(DMA_XOR, dma_dev->cap_mask) ? "xor " : "",
+ dma_has_cap(DMA_MEMSET, dma_dev->cap_mask) ? "fill " : "",
+ dma_has_cap(DMA_MEMCPY, dma_dev->cap_mask) ? "cpy " : "",
+ dma_has_cap(DMA_INTERRUPT, dma_dev->cap_mask) ? "intr " : "");

dma_async_device_register(dma_dev);
goto out;
@@ -1275,7 +1267,7 @@ static int mv_xor_shared_probe(struct platform_device *pdev)
struct mv_xor_shared_private *msp;
struct resource *res;

- dev_printk(KERN_NOTICE, &pdev->dev, "Marvell shared XOR driver\n");
+ dev_notice(&pdev->dev, "Marvell shared XOR driver\n");

msp = devm_kzalloc(&pdev->dev, sizeof(*msp), GFP_KERNEL);
if (!msp)
--
1.7.8.112.g3fd21

2012-10-28 08:08:47

by Joe Perches

[permalink] [raw]
Subject: [PATCH 07/16] gpu: Convert dev_printk(KERN_<LEVEL> to dev_<level>(

dev_<level> calls take less code than dev_printk(KERN_<LEVEL>
and reducing object size is good.
Coalesce multiline formats for easier grep.
Coalesce unnecessarily segmented formats on a single line too.
Remove trailing space after newline in a format.

Signed-off-by: Joe Perches <[email protected]>
---
drivers/gpu/drm/gma500/cdv_intel_crt.c | 3 +--
drivers/gpu/drm/gma500/cdv_intel_lvds.c | 7 +++----
drivers/gpu/drm/gma500/psb_intel_lvds.c | 7 +++----
drivers/gpu/drm/i915/intel_opregion.c | 8 ++++----
4 files changed, 11 insertions(+), 14 deletions(-)

diff --git a/drivers/gpu/drm/gma500/cdv_intel_crt.c b/drivers/gpu/drm/gma500/cdv_intel_crt.c
index 8c17534..33ee3f4 100644
--- a/drivers/gpu/drm/gma500/cdv_intel_crt.c
+++ b/drivers/gpu/drm/gma500/cdv_intel_crt.c
@@ -296,8 +296,7 @@ void cdv_intel_crt_init(struct drm_device *dev,
psb_intel_encoder->ddc_bus = psb_intel_i2c_create(dev,
i2c_reg, "CRTDDC_A");
if (!psb_intel_encoder->ddc_bus) {
- dev_printk(KERN_ERR, &dev->pdev->dev, "DDC bus registration "
- "failed.\n");
+ dev_err(&dev->pdev->dev, "DDC bus registration failed\n");
goto failed_ddc;
}

diff --git a/drivers/gpu/drm/gma500/cdv_intel_lvds.c b/drivers/gpu/drm/gma500/cdv_intel_lvds.c
index b362dd3..38184f6 100644
--- a/drivers/gpu/drm/gma500/cdv_intel_lvds.c
+++ b/drivers/gpu/drm/gma500/cdv_intel_lvds.c
@@ -686,8 +686,7 @@ void cdv_intel_lvds_init(struct drm_device *dev,
GPIOB,
"LVDSBLC_B");
if (!psb_intel_encoder->i2c_bus) {
- dev_printk(KERN_ERR,
- &dev->pdev->dev, "I2C bus registration failed.\n");
+ dev_err(&dev->pdev->dev, "I2C bus registration failed\n");
goto failed_blc_i2c;
}
psb_intel_encoder->i2c_bus->slave_addr = 0x2C;
@@ -708,8 +707,8 @@ void cdv_intel_lvds_init(struct drm_device *dev,
GPIOC,
"LVDSDDC_C");
if (!psb_intel_encoder->ddc_bus) {
- dev_printk(KERN_ERR, &dev->pdev->dev,
- "DDC bus registration " "failed.\n");
+ dev_err(&dev->pdev->dev,
+ "DDC bus registration failed\n");
goto failed_ddc;
}

diff --git a/drivers/gpu/drm/gma500/psb_intel_lvds.c b/drivers/gpu/drm/gma500/psb_intel_lvds.c
index 2a4c3a9..d1931cf 100644
--- a/drivers/gpu/drm/gma500/psb_intel_lvds.c
+++ b/drivers/gpu/drm/gma500/psb_intel_lvds.c
@@ -759,8 +759,7 @@ void psb_intel_lvds_init(struct drm_device *dev,
*/
lvds_priv->i2c_bus = psb_intel_i2c_create(dev, GPIOB, "LVDSBLC_B");
if (!lvds_priv->i2c_bus) {
- dev_printk(KERN_ERR,
- &dev->pdev->dev, "I2C bus registration failed.\n");
+ dev_err(&dev->pdev->dev, "I2C bus registration failed\n");
goto failed_blc_i2c;
}
lvds_priv->i2c_bus->slave_addr = 0x2C;
@@ -779,8 +778,8 @@ void psb_intel_lvds_init(struct drm_device *dev,
/* Set up the DDC bus. */
lvds_priv->ddc_bus = psb_intel_i2c_create(dev, GPIOC, "LVDSDDC_C");
if (!lvds_priv->ddc_bus) {
- dev_printk(KERN_ERR, &dev->pdev->dev,
- "DDC bus registration " "failed.\n");
+ dev_err(&dev->pdev->dev,
+ "DDC bus registration failed\n");
goto failed_ddc;
}

diff --git a/drivers/gpu/drm/i915/intel_opregion.c b/drivers/gpu/drm/i915/intel_opregion.c
index 5530413..fe31b23 100644
--- a/drivers/gpu/drm/i915/intel_opregion.c
+++ b/drivers/gpu/drm/i915/intel_opregion.c
@@ -366,8 +366,8 @@ static void intel_didl_outputs(struct drm_device *dev)

list_for_each_entry(acpi_cdev, &acpi_video_bus->children, node) {
if (i >= 8) {
- dev_printk(KERN_ERR, &dev->pdev->dev,
- "More than 8 outputs detected\n");
+ dev_err(&dev->pdev->dev,
+ "More than 8 outputs detected\n");
return;
}
status =
@@ -393,8 +393,8 @@ blind_set:
list_for_each_entry(connector, &dev->mode_config.connector_list, head) {
int output_type = ACPI_OTHER_OUTPUT;
if (i >= 8) {
- dev_printk(KERN_ERR, &dev->pdev->dev,
- "More than 8 outputs detected\n");
+ dev_err(&dev->pdev->dev,
+ "More than 8 outputs detected\n");
return;
}
switch (connector->connector_type) {
--
1.7.8.112.g3fd21

2012-10-28 08:09:00

by Joe Perches

[permalink] [raw]
Subject: [PATCH 08/16] i2c: Convert dev_printk(KERN_<LEVEL> to dev_<level>(

dev_<level> calls take less code than dev_printk(KERN_<LEVEL>
and reducing object size is good.
Coalesce formats for easier grep.

Signed-off-by: Joe Perches <[email protected]>
---
drivers/i2c/busses/i2c-piix4.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/i2c/busses/i2c-piix4.c b/drivers/i2c/busses/i2c-piix4.c
index 8bbd6ec..f7216ed 100644
--- a/drivers/i2c/busses/i2c-piix4.c
+++ b/drivers/i2c/busses/i2c-piix4.c
@@ -204,9 +204,8 @@ static int __devinit piix4_setup(struct pci_dev *PIIX4_dev,
*/
pci_write_config_byte(PIIX4_dev, SMBHSTCFG,
temp | 1);
- dev_printk(KERN_NOTICE, &PIIX4_dev->dev,
- "WARNING: SMBus interface has been "
- "FORCEFULLY ENABLED!\n");
+ dev_notice(&PIIX4_dev->dev,
+ "WARNING: SMBus interface has been FORCEFULLY ENABLED!\n");
} else {
dev_err(&PIIX4_dev->dev,
"Host SMBus controller not enabled!\n");
--
1.7.8.112.g3fd21

2012-10-28 08:09:20

by Joe Perches

[permalink] [raw]
Subject: [PATCH 09/16] wireless: Convert dev_printk(KERN_<LEVEL> to dev_<level>(

dev_<level> calls take less code than dev_printk(KERN_<LEVEL>
and reducing object size is good.
Coalesce formats for easier grep.

Signed-off-by: Joe Perches <[email protected]>
---
drivers/net/wireless/at76c50x-usb.c | 85 ++++++++++++++---------------
drivers/net/wireless/iwlegacy/common.h | 5 +-
drivers/net/wireless/iwlwifi/pcie/trans.c | 28 ++++------
3 files changed, 52 insertions(+), 66 deletions(-)

diff --git a/drivers/net/wireless/at76c50x-usb.c b/drivers/net/wireless/at76c50x-usb.c
index 99b9ddf..77fa428 100644
--- a/drivers/net/wireless/at76c50x-usb.c
+++ b/drivers/net/wireless/at76c50x-usb.c
@@ -379,7 +379,7 @@ static int at76_usbdfu_download(struct usb_device *udev, u8 *buf, u32 size,
manifest_sync_timeout);

if (!size) {
- dev_printk(KERN_ERR, &udev->dev, "FW buffer length invalid!\n");
+ dev_err(&udev->dev, "FW buffer length invalid!\n");
return -EINVAL;
}

@@ -391,8 +391,8 @@ static int at76_usbdfu_download(struct usb_device *udev, u8 *buf, u32 size,
if (need_dfu_state) {
ret = at76_dfu_get_state(udev, &dfu_state);
if (ret < 0) {
- dev_printk(KERN_ERR, &udev->dev,
- "cannot get DFU state: %d\n", ret);
+ dev_err(&udev->dev,
+ "cannot get DFU state: %d\n", ret);
goto exit;
}
need_dfu_state = 0;
@@ -407,9 +407,9 @@ static int at76_usbdfu_download(struct usb_device *udev, u8 *buf, u32 size,
dfu_timeout = at76_get_timeout(&dfu_stat_buf);
need_dfu_state = 0;
} else
- dev_printk(KERN_ERR, &udev->dev,
- "at76_dfu_get_status returned %d\n",
- ret);
+ dev_err(&udev->dev,
+ "at76_dfu_get_status returned %d\n",
+ ret);
break;

case STATE_DFU_DOWNLOAD_BUSY:
@@ -438,9 +438,9 @@ static int at76_usbdfu_download(struct usb_device *udev, u8 *buf, u32 size,
blockno++;

if (ret != bsize)
- dev_printk(KERN_ERR, &udev->dev,
- "at76_load_int_fw_block "
- "returned %d\n", ret);
+ dev_err(&udev->dev,
+ "at76_load_int_fw_block returned %d\n",
+ ret);
need_dfu_state = 1;
break;

@@ -1255,8 +1255,7 @@ static int at76_load_external_fw(struct usb_device *udev, struct fwentry *fwe)
at76_dbg(DBG_DEVSTART, "opmode %d", op_mode);

if (op_mode != OPMODE_NORMAL_NIC_WITHOUT_FLASH) {
- dev_printk(KERN_ERR, &udev->dev, "unexpected opmode %d\n",
- op_mode);
+ dev_err(&udev->dev, "unexpected opmode %d\n", op_mode);
return -EINVAL;
}

@@ -1275,9 +1274,9 @@ static int at76_load_external_fw(struct usb_device *udev, struct fwentry *fwe)
size, bsize, blockno);
ret = at76_load_ext_fw_block(udev, blockno, block, bsize);
if (ret != bsize) {
- dev_printk(KERN_ERR, &udev->dev,
- "loading %dth firmware block failed: %d\n",
- blockno, ret);
+ dev_err(&udev->dev,
+ "loading %dth firmware block failed: %d\n",
+ blockno, ret);
goto exit;
}
buf += bsize;
@@ -1293,8 +1292,8 @@ static int at76_load_external_fw(struct usb_device *udev, struct fwentry *fwe)
exit:
kfree(block);
if (ret < 0)
- dev_printk(KERN_ERR, &udev->dev,
- "downloading external firmware failed: %d\n", ret);
+ dev_err(&udev->dev,
+ "downloading external firmware failed: %d\n", ret);
return ret;
}

@@ -1308,8 +1307,8 @@ static int at76_load_internal_fw(struct usb_device *udev, struct fwentry *fwe)
need_remap ? 0 : 2 * HZ);

if (ret < 0) {
- dev_printk(KERN_ERR, &udev->dev,
- "downloading internal fw failed with %d\n", ret);
+ dev_err(&udev->dev,
+ "downloading internal fw failed with %d\n", ret);
goto exit;
}

@@ -1319,8 +1318,8 @@ static int at76_load_internal_fw(struct usb_device *udev, struct fwentry *fwe)
if (need_remap) {
ret = at76_remap(udev);
if (ret < 0) {
- dev_printk(KERN_ERR, &udev->dev,
- "sending REMAP failed with %d\n", ret);
+ dev_err(&udev->dev,
+ "sending REMAP failed with %d\n", ret);
goto exit;
}
}
@@ -1555,11 +1554,10 @@ static struct fwentry *at76_load_firmware(struct usb_device *udev,
at76_dbg(DBG_FW, "downloading firmware %s", fwe->fwname);
ret = request_firmware(&fwe->fw, fwe->fwname, &udev->dev);
if (ret < 0) {
- dev_printk(KERN_ERR, &udev->dev, "firmware %s not found!\n",
- fwe->fwname);
- dev_printk(KERN_ERR, &udev->dev,
- "you may need to download the firmware from "
- "http://developer.berlios.de/projects/at76c503a/\n");
+ dev_err(&udev->dev, "firmware %s not found!\n",
+ fwe->fwname);
+ dev_err(&udev->dev,
+ "you may need to download the firmware from http://developer.berlios.de/projects/at76c503a/\n");
goto exit;
}

@@ -1567,17 +1565,17 @@ static struct fwentry *at76_load_firmware(struct usb_device *udev,
fwh = (struct at76_fw_header *)(fwe->fw->data);

if (fwe->fw->size <= sizeof(*fwh)) {
- dev_printk(KERN_ERR, &udev->dev,
- "firmware is too short (0x%zx)\n", fwe->fw->size);
+ dev_err(&udev->dev,
+ "firmware is too short (0x%zx)\n", fwe->fw->size);
goto exit;
}

/* CRC currently not checked */
fwe->board_type = le32_to_cpu(fwh->board_type);
if (fwe->board_type != board_type) {
- dev_printk(KERN_ERR, &udev->dev,
- "board type mismatch, requested %u, got %u\n",
- board_type, fwe->board_type);
+ dev_err(&udev->dev,
+ "board type mismatch, requested %u, got %u\n",
+ board_type, fwe->board_type);
goto exit;
}

@@ -2150,8 +2148,7 @@ static int at76_alloc_urbs(struct at76_priv *priv,
}

if (!ep_in || !ep_out) {
- dev_printk(KERN_ERR, &interface->dev,
- "bulk endpoints missing\n");
+ dev_err(&interface->dev, "bulk endpoints missing\n");
return -ENXIO;
}

@@ -2161,15 +2158,14 @@ static int at76_alloc_urbs(struct at76_priv *priv,
priv->rx_urb = usb_alloc_urb(0, GFP_KERNEL);
priv->tx_urb = usb_alloc_urb(0, GFP_KERNEL);
if (!priv->rx_urb || !priv->tx_urb) {
- dev_printk(KERN_ERR, &interface->dev, "cannot allocate URB\n");
+ dev_err(&interface->dev, "cannot allocate URB\n");
return -ENOMEM;
}

buffer_size = sizeof(struct at76_tx_buffer) + MAX_PADDING_SIZE;
priv->bulk_out_buffer = kmalloc(buffer_size, GFP_KERNEL);
if (!priv->bulk_out_buffer) {
- dev_printk(KERN_ERR, &interface->dev,
- "cannot allocate output buffer\n");
+ dev_err(&interface->dev, "cannot allocate output buffer\n");
return -ENOMEM;
}

@@ -2230,8 +2226,7 @@ static int at76_init_new_device(struct at76_priv *priv,
/* MAC address */
ret = at76_get_hw_config(priv);
if (ret < 0) {
- dev_printk(KERN_ERR, &interface->dev,
- "cannot get MAC address\n");
+ dev_err(&interface->dev, "cannot get MAC address\n");
goto exit;
}

@@ -2358,8 +2353,8 @@ static int at76_probe(struct usb_interface *interface,
we get 204 with 2.4.23, Fiberline FL-WL240u (505A+RFMD2958) ??? */

if (op_mode == OPMODE_HW_CONFIG_MODE) {
- dev_printk(KERN_ERR, &interface->dev,
- "cannot handle a device in HW_CONFIG_MODE\n");
+ dev_err(&interface->dev,
+ "cannot handle a device in HW_CONFIG_MODE\n");
ret = -EBUSY;
goto error;
}
@@ -2371,9 +2366,9 @@ static int at76_probe(struct usb_interface *interface,
"downloading internal firmware\n");
ret = at76_load_internal_fw(udev, fwe);
if (ret < 0) {
- dev_printk(KERN_ERR, &interface->dev,
- "error %d downloading internal firmware\n",
- ret);
+ dev_err(&interface->dev,
+ "error %d downloading internal firmware\n",
+ ret);
goto error;
}
usb_put_dev(udev);
@@ -2408,8 +2403,8 @@ static int at76_probe(struct usb_interface *interface,
/* Re-check firmware version */
ret = at76_get_mib(udev, MIB_FW_VERSION, &fwv, sizeof(fwv));
if (ret < 0) {
- dev_printk(KERN_ERR, &interface->dev,
- "error %d getting firmware version\n", ret);
+ dev_err(&interface->dev,
+ "error %d getting firmware version\n", ret);
goto error;
}
}
@@ -2449,7 +2444,7 @@ static void at76_disconnect(struct usb_interface *interface)

wiphy_info(priv->hw->wiphy, "disconnecting\n");
at76_delete_device(priv);
- dev_printk(KERN_INFO, &interface->dev, "disconnected\n");
+ dev_info(&interface->dev, "disconnected\n");
}

/* Structure for registering this driver with the USB subsystem */
diff --git a/drivers/net/wireless/iwlegacy/common.h b/drivers/net/wireless/iwlegacy/common.h
index b4bb813..e254cba 100644
--- a/drivers/net/wireless/iwlegacy/common.h
+++ b/drivers/net/wireless/iwlegacy/common.h
@@ -2919,9 +2919,8 @@ do { \
#define IL_DBG(level, fmt, args...) \
do { \
if (il_get_debug_level(il) & level) \
- dev_printk(KERN_ERR, &il->hw->wiphy->dev, \
- "%c %s " fmt, in_interrupt() ? 'I' : 'U', \
- __func__ , ## args); \
+ dev_err(&il->hw->wiphy->dev, "%c %s " fmt, \
+ in_interrupt() ? 'I' : 'U', __func__ , ##args); \
} while (0)

#define il_print_hex_dump(il, level, p, len) \
diff --git a/drivers/net/wireless/iwlwifi/pcie/trans.c b/drivers/net/wireless/iwlwifi/pcie/trans.c
index f95d88d..4d9dfa7 100644
--- a/drivers/net/wireless/iwlwifi/pcie/trans.c
+++ b/drivers/net/wireless/iwlwifi/pcie/trans.c
@@ -699,13 +699,11 @@ static void iwl_apm_config(struct iwl_trans *trans)
PCI_CFG_LINK_CTRL_VAL_L1_EN) {
/* L1-ASPM enabled; disable(!) L0S */
iwl_set_bit(trans, CSR_GIO_REG, CSR_GIO_REG_VAL_L0S_ENABLED);
- dev_printk(KERN_INFO, trans->dev,
- "L1 Enabled; Disabling L0S\n");
+ dev_info(trans->dev, "L1 Enabled; Disabling L0S\n");
} else {
/* L1-ASPM disabled; enable(!) L0S */
iwl_clear_bit(trans, CSR_GIO_REG, CSR_GIO_REG_VAL_L0S_ENABLED);
- dev_printk(KERN_INFO, trans->dev,
- "L1 Disabled; Enabling L0S\n");
+ dev_info(trans->dev, "L1 Disabled; Enabling L0S\n");
}
trans->pm_support = !(lctl & PCI_CFG_LINK_CTRL_VAL_L0S_EN);
}
@@ -2150,34 +2148,29 @@ struct iwl_trans *iwl_trans_pcie_alloc(struct pci_dev *pdev,
DMA_BIT_MASK(32));
/* both attempts failed: */
if (err) {
- dev_printk(KERN_ERR, &pdev->dev,
- "No suitable DMA available.\n");
+ dev_err(&pdev->dev, "No suitable DMA available\n");
goto out_pci_disable_device;
}
}

err = pci_request_regions(pdev, DRV_NAME);
if (err) {
- dev_printk(KERN_ERR, &pdev->dev,
- "pci_request_regions failed\n");
+ dev_err(&pdev->dev, "pci_request_regions failed\n");
goto out_pci_disable_device;
}

trans_pcie->hw_base = pci_ioremap_bar(pdev, 0);
if (!trans_pcie->hw_base) {
- dev_printk(KERN_ERR, &pdev->dev, "pci_ioremap_bar failed\n");
+ dev_err(&pdev->dev, "pci_ioremap_bar failed\n");
err = -ENODEV;
goto out_pci_release_regions;
}

- dev_printk(KERN_INFO, &pdev->dev,
- "pci_resource_len = 0x%08llx\n",
- (unsigned long long) pci_resource_len(pdev, 0));
- dev_printk(KERN_INFO, &pdev->dev,
- "pci_resource_base = %p\n", trans_pcie->hw_base);
+ dev_info(&pdev->dev, "pci_resource_len = 0x%08llx\n",
+ (unsigned long long) pci_resource_len(pdev, 0));
+ dev_info(&pdev->dev, "pci_resource_base = %p\n", trans_pcie->hw_base);

- dev_printk(KERN_INFO, &pdev->dev,
- "HW Revision ID = 0x%X\n", pdev->revision);
+ dev_info(&pdev->dev, "HW Revision ID = 0x%X\n", pdev->revision);

/* We disable the RETRY_TIMEOUT register (0x41) to keep
* PCI Tx retries from interfering with C3 CPU state */
@@ -2185,8 +2178,7 @@ struct iwl_trans *iwl_trans_pcie_alloc(struct pci_dev *pdev,

err = pci_enable_msi(pdev);
if (err)
- dev_printk(KERN_ERR, &pdev->dev,
- "pci_enable_msi failed(0X%x)\n", err);
+ dev_err(&pdev->dev, "pci_enable_msi failed(0X%x)\n", err);

trans->dev = &pdev->dev;
trans_pcie->irq = pdev->irq;
--
1.7.8.112.g3fd21

2012-10-28 08:09:32

by Joe Perches

[permalink] [raw]
Subject: [PATCH 10/16] ethernet: Convert dev_printk(KERN_<LEVEL> to dev_<level>(

dev_<level> calls take less code than dev_printk(KERN_<LEVEL>
and reducing object size is good.
Coalesce formats for easier grep.

Signed-off-by: Joe Perches <[email protected]>
---
drivers/net/ethernet/chelsio/cxgb3/common.h | 7 +++----
drivers/net/ethernet/marvell/pxa168_eth.c | 7 +++----
2 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/drivers/net/ethernet/chelsio/cxgb3/common.h b/drivers/net/ethernet/chelsio/cxgb3/common.h
index df01b63..8c82248 100644
--- a/drivers/net/ethernet/chelsio/cxgb3/common.h
+++ b/drivers/net/ethernet/chelsio/cxgb3/common.h
@@ -42,10 +42,9 @@
#include <linux/mdio.h>
#include "version.h"

-#define CH_ERR(adap, fmt, ...) dev_err(&adap->pdev->dev, fmt, ## __VA_ARGS__)
-#define CH_WARN(adap, fmt, ...) dev_warn(&adap->pdev->dev, fmt, ## __VA_ARGS__)
-#define CH_ALERT(adap, fmt, ...) \
- dev_printk(KERN_ALERT, &adap->pdev->dev, fmt, ## __VA_ARGS__)
+#define CH_ERR(adap, fmt, ...) dev_err(&adap->pdev->dev, fmt, ##__VA_ARGS__)
+#define CH_WARN(adap, fmt, ...) dev_warn(&adap->pdev->dev, fmt, ##__VA_ARGS__)
+#define CH_ALERT(adap, fmt, ...) dev_alert(&adap->pdev->dev, fmt, ##__VA_ARGS__)

/*
* More powerful macro that selectively prints messages based on msg_enable.
diff --git a/drivers/net/ethernet/marvell/pxa168_eth.c b/drivers/net/ethernet/marvell/pxa168_eth.c
index 5948972..10d678d 100644
--- a/drivers/net/ethernet/marvell/pxa168_eth.c
+++ b/drivers/net/ethernet/marvell/pxa168_eth.c
@@ -1131,7 +1131,7 @@ static int pxa168_eth_open(struct net_device *dev)
err = request_irq(dev->irq, pxa168_eth_int_handler,
IRQF_DISABLED, dev->name, dev);
if (err) {
- dev_printk(KERN_ERR, &dev->dev, "can't assign irq\n");
+ dev_err(&dev->dev, "can't assign irq\n");
return -EAGAIN;
}
pep->rx_resource_err = 0;
@@ -1201,9 +1201,8 @@ static int pxa168_eth_change_mtu(struct net_device *dev, int mtu)
*/
pxa168_eth_stop(dev);
if (pxa168_eth_open(dev)) {
- dev_printk(KERN_ERR, &dev->dev,
- "fatal error on re-opening device after "
- "MTU change\n");
+ dev_err(&dev->dev,
+ "fatal error on re-opening device after MTU change\n");
}

return 0;
--
1.7.8.112.g3fd21

2012-10-28 08:09:44

by Joe Perches

[permalink] [raw]
Subject: [PATCH 11/16] pci: Convert dev_printk(KERN_<LEVEL> to dev_<level>(

dev_<level> calls take less code than dev_printk(KERN_<LEVEL>
and reducing object size is good.
Coalesce formats for easier grep.

Signed-off-by: Joe Perches <[email protected]>
---
drivers/pci/irq.c | 10 +++++-----
drivers/pci/pci-stub.c | 2 +-
drivers/pci/pcie/aspm.c | 7 ++-----
3 files changed, 8 insertions(+), 11 deletions(-)

diff --git a/drivers/pci/irq.c b/drivers/pci/irq.c
index e5f69a4..b008cf8 100644
--- a/drivers/pci/irq.c
+++ b/drivers/pci/irq.c
@@ -14,11 +14,11 @@ static void pci_note_irq_problem(struct pci_dev *pdev, const char *reason)
{
struct pci_dev *parent = to_pci_dev(pdev->dev.parent);

- dev_printk(KERN_ERR, &pdev->dev,
- "Potentially misrouted IRQ (Bridge %s %04x:%04x)\n",
- dev_name(&parent->dev), parent->vendor, parent->device);
- dev_printk(KERN_ERR, &pdev->dev, "%s\n", reason);
- dev_printk(KERN_ERR, &pdev->dev, "Please report to [email protected]\n");
+ dev_err(&pdev->dev,
+ "Potentially misrouted IRQ (Bridge %s %04x:%04x)\n",
+ dev_name(&parent->dev), parent->vendor, parent->device);
+ dev_err(&pdev->dev, "%s\n", reason);
+ dev_err(&pdev->dev, "Please report to [email protected]\n");
WARN_ON(1);
}

diff --git a/drivers/pci/pci-stub.c b/drivers/pci/pci-stub.c
index 775e933..6e47c51 100644
--- a/drivers/pci/pci-stub.c
+++ b/drivers/pci/pci-stub.c
@@ -28,7 +28,7 @@ MODULE_PARM_DESC(ids, "Initial PCI IDs to add to the stub driver, format is "

static int pci_stub_probe(struct pci_dev *dev, const struct pci_device_id *id)
{
- dev_printk(KERN_INFO, &dev->dev, "claimed by stub\n");
+ dev_info(&dev->dev, "claimed by stub\n");
return 0;
}

diff --git a/drivers/pci/pcie/aspm.c b/drivers/pci/pcie/aspm.c
index 213753b..3da9ecc 100644
--- a/drivers/pci/pcie/aspm.c
+++ b/drivers/pci/pcie/aspm.c
@@ -242,8 +242,7 @@ static void pcie_aspm_configure_common_clock(struct pcie_link_state *link)
return;

/* Training failed. Restore common clock configurations */
- dev_printk(KERN_ERR, &parent->dev,
- "ASPM: Could not configure common clock\n");
+ dev_err(&parent->dev, "ASPM: Could not configure common clock\n");
list_for_each_entry(child, &linkbus->devices, bus_list)
pcie_capability_write_word(child, PCI_EXP_LNKCTL,
child_reg[PCI_FUNC(child->devfn)]);
@@ -507,9 +506,7 @@ static int pcie_aspm_sanity_check(struct pci_dev *pdev)
*/
pcie_capability_read_dword(child, PCI_EXP_DEVCAP, &reg32);
if (!(reg32 & PCI_EXP_DEVCAP_RBER) && !aspm_force) {
- dev_printk(KERN_INFO, &child->dev, "disabling ASPM"
- " on pre-1.1 PCIe device. You can enable it"
- " with 'pcie_aspm=force'\n");
+ dev_info(&child->dev, "disabling ASPM on pre-1.1 PCIe device. You can enable it with 'pcie_aspm=force'\n");
return -EINVAL;
}
}
--
1.7.8.112.g3fd21

2012-10-28 08:10:18

by Joe Perches

[permalink] [raw]
Subject: [PATCH 12/16] scsi: Convert dev_printk(KERN_<LEVEL> to dev_<level>(

dev_<level> calls take less code than dev_printk(KERN_<LEVEL>
and reducing object size is good.
Coalesce formats for easier grep.

Signed-off-by: Joe Perches <[email protected]>
---
drivers/scsi/53c700.c | 2 +-
drivers/scsi/aic7xxx/aic79xx_osm_pci.c | 4 +-
drivers/scsi/aic7xxx/aic7xxx_osm_pci.c | 4 +-
drivers/scsi/aic94xx/aic94xx_tmf.c | 4 +-
drivers/scsi/bfa/bfad.c | 32 +++++------
drivers/scsi/fcoe/fcoe_sysfs.c | 3 +-
drivers/scsi/lasi700.c | 2 +-
drivers/scsi/libsas/sas_task.c | 9 +--
drivers/scsi/lpfc/lpfc_attr.c | 8 +-
drivers/scsi/lpfc/lpfc_debugfs.h | 6 +-
drivers/scsi/lpfc/lpfc_hbadisc.c | 4 +-
drivers/scsi/lpfc/lpfc_init.c | 45 +++++++--------
drivers/scsi/mpt2sas/mpt2sas_transport.c | 91 +++++++++++++++---------------
drivers/scsi/mvsas/mv_64xx.c | 2 +-
drivers/scsi/mvsas/mv_chips.h | 8 +-
drivers/scsi/mvsas/mv_init.c | 14 ++---
drivers/scsi/mvsas/mv_sas.c | 9 +--
drivers/scsi/pm8001/pm8001_init.c | 10 +--
drivers/scsi/pm8001/pm8001_sas.c | 4 +-
drivers/scsi/raid_class.c | 8 +-
drivers/scsi/scsi_scan.c | 3 +-
drivers/scsi/scsi_transport_fc.c | 31 ++++------
drivers/scsi/scsi_transport_sas.c | 7 +-
drivers/scsi/sni_53c710.c | 2 +-
drivers/scsi/zalon.c | 4 +-
25 files changed, 148 insertions(+), 168 deletions(-)

diff --git a/drivers/scsi/53c700.c b/drivers/scsi/53c700.c
index a3adfb4..eb0cc6e 100644
--- a/drivers/scsi/53c700.c
+++ b/drivers/scsi/53c700.c
@@ -395,7 +395,7 @@ NCR_700_detect(struct scsi_host_template *tpnt,
NCR_700_chip_reset(host);

if (scsi_add_host(host, dev)) {
- dev_printk(KERN_ERR, dev, "53c700: scsi_add_host failed\n");
+ dev_err(dev, "53c700: scsi_add_host failed\n");
scsi_host_put(host);
return NULL;
}
diff --git a/drivers/scsi/aic7xxx/aic79xx_osm_pci.c b/drivers/scsi/aic7xxx/aic79xx_osm_pci.c
index 3c85873..76d9390 100644
--- a/drivers/scsi/aic7xxx/aic79xx_osm_pci.c
+++ b/drivers/scsi/aic7xxx/aic79xx_osm_pci.c
@@ -105,8 +105,8 @@ ahd_linux_pci_dev_resume(struct pci_dev *pdev)
pci_restore_state(pdev);

if ((rc = pci_enable_device(pdev))) {
- dev_printk(KERN_ERR, &pdev->dev,
- "failed to enable device after resume (%d)\n", rc);
+ dev_err(&pdev->dev,
+ "failed to enable device after resume (%d)\n", rc);
return rc;
}

diff --git a/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c b/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c
index ee05e84..7a2de59 100644
--- a/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c
+++ b/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c
@@ -150,8 +150,8 @@ ahc_linux_pci_dev_resume(struct pci_dev *pdev)
pci_restore_state(pdev);

if ((rc = pci_enable_device(pdev))) {
- dev_printk(KERN_ERR, &pdev->dev,
- "failed to enable device after resume (%d)\n", rc);
+ dev_err(&pdev->dev,
+ "failed to enable device after resume (%d)\n", rc);
return rc;
}

diff --git a/drivers/scsi/aic94xx/aic94xx_tmf.c b/drivers/scsi/aic94xx/aic94xx_tmf.c
index cf90409..d5fb055 100644
--- a/drivers/scsi/aic94xx/aic94xx_tmf.c
+++ b/drivers/scsi/aic94xx/aic94xx_tmf.c
@@ -208,8 +208,8 @@ int asd_I_T_nexus_reset(struct domain_device *dev)
/* This is a bit of a problem: the sequencer is still suspended
* and is refusing to resume. Hope it will resume on a bigger hammer
* or the disk is lost */
- dev_printk(KERN_ERR, &phy->dev,
- "Failed to resume nexus after reset 0x%x\n", tmp_res);
+ dev_err(&phy->dev,
+ "Failed to resume nexus after reset 0x%x\n", tmp_res);

res = TMF_RESP_FUNC_FAILED;
out:
diff --git a/drivers/scsi/bfa/bfad.c b/drivers/scsi/bfa/bfad.c
index 895b0e5..75e0bcf 100644
--- a/drivers/scsi/bfa/bfad.c
+++ b/drivers/scsi/bfa/bfad.c
@@ -1501,9 +1501,8 @@ bfad_pci_error_detected(struct pci_dev *pdev, pci_channel_state_t state)
unsigned long flags;
pci_ers_result_t ret = PCI_ERS_RESULT_NONE;

- dev_printk(KERN_ERR, &pdev->dev,
- "error detected state: %d - flags: 0x%x\n",
- state, bfad->bfad_flags);
+ dev_err(&pdev->dev, "error detected state: %d - flags: 0x%x\n",
+ state, bfad->bfad_flags);

switch (state) {
case pci_channel_io_normal: /* non-fatal error */
@@ -1562,8 +1561,8 @@ restart_bfa(struct bfad_s *bfad)

/* Enable Interrupt and wait bfa_init completion */
if (bfad_setup_intr(bfad)) {
- dev_printk(KERN_WARNING, &pdev->dev,
- "%s: bfad_setup_intr failed\n", bfad->pci_name);
+ dev_warn(&pdev->dev,
+ "%s: bfad_setup_intr failed\n", bfad->pci_name);
bfa_sm_send_event(bfad, BFAD_E_INTR_INIT_FAILED);
return -1;
}
@@ -1576,8 +1575,8 @@ restart_bfa(struct bfad_s *bfad)
/* Set up interrupt handler for each vectors */
if ((bfad->bfad_flags & BFAD_MSIX_ON) &&
bfad_install_msix_handler(bfad))
- dev_printk(KERN_WARNING, &pdev->dev,
- "%s: install_msix failed.\n", bfad->pci_name);
+ dev_warn(&pdev->dev,
+ "%s: install_msix failed\n", bfad->pci_name);

bfad_init_timer(bfad);
wait_for_completion(&bfad->comp);
@@ -1595,12 +1594,11 @@ bfad_pci_slot_reset(struct pci_dev *pdev)
struct bfad_s *bfad = pci_get_drvdata(pdev);
u8 byte;

- dev_printk(KERN_ERR, &pdev->dev,
- "bfad_pci_slot_reset flags: 0x%x\n", bfad->bfad_flags);
+ dev_err(&pdev->dev,
+ "bfad_pci_slot_reset flags: 0x%x\n", bfad->bfad_flags);

if (pci_enable_device(pdev)) {
- dev_printk(KERN_ERR, &pdev->dev, "Cannot re-enable "
- "PCI device after reset.\n");
+ dev_err(&pdev->dev, "Cannot re-enable PCI device after reset\n");
return PCI_ERS_RESULT_DISCONNECT;
}

@@ -1613,8 +1611,8 @@ bfad_pci_slot_reset(struct pci_dev *pdev)
*/
pci_read_config_byte(pdev, 0x68, &byte);
if (byte == 0xff) {
- dev_printk(KERN_ERR, &pdev->dev,
- "slot_reset failed ... got another PCI error !\n");
+ dev_err(&pdev->dev,
+ "slot_reset failed ... got another PCI error !\n");
goto out_disable_device;
}

@@ -1631,8 +1629,8 @@ bfad_pci_slot_reset(struct pci_dev *pdev)
goto out_disable_device;

pci_enable_pcie_error_reporting(pdev);
- dev_printk(KERN_WARNING, &pdev->dev,
- "slot_reset completed flags: 0x%x!\n", bfad->bfad_flags);
+ dev_warn(&pdev->dev,
+ "slot_reset completed flags: 0x%x!\n", bfad->bfad_flags);

return PCI_ERS_RESULT_RECOVERED;

@@ -1647,7 +1645,7 @@ bfad_pci_mmio_enabled(struct pci_dev *pdev)
unsigned long flags;
struct bfad_s *bfad = pci_get_drvdata(pdev);

- dev_printk(KERN_INFO, &pdev->dev, "mmio_enabled\n");
+ dev_info(&pdev->dev, "mmio_enabled\n");

/* Fetch FW diagnostic information */
bfa_ioc_debug_save_ftrc(&bfad->bfa.ioc);
@@ -1672,7 +1670,7 @@ bfad_pci_resume(struct pci_dev *pdev)
unsigned long flags;
struct bfad_s *bfad = pci_get_drvdata(pdev);

- dev_printk(KERN_WARNING, &pdev->dev, "resume\n");
+ dev_warn(&pdev->dev, "resume\n");

/* wait until the link is online */
bfad_rport_online_wait(bfad);
diff --git a/drivers/scsi/fcoe/fcoe_sysfs.c b/drivers/scsi/fcoe/fcoe_sysfs.c
index 5e75168..daf7f74 100644
--- a/drivers/scsi/fcoe/fcoe_sysfs.c
+++ b/drivers/scsi/fcoe/fcoe_sysfs.c
@@ -701,8 +701,7 @@ static void fip_timeout_deleted_fcf(struct work_struct *work)
if (fcf->state != FCOE_FCF_STATE_DISCONNECTED)
goto out;

- dev_printk(KERN_ERR, &fcf->dev,
- "FIP fcf connection time out: removing fcf\n");
+ dev_err(&fcf->dev, "FIP fcf connection time out: removing fcf\n");

list_del(&fcf->peers);
fcf->state = FCOE_FCF_STATE_DELETED;
diff --git a/drivers/scsi/lasi700.c b/drivers/scsi/lasi700.c
index 23880f8..edc1f35 100644
--- a/drivers/scsi/lasi700.c
+++ b/drivers/scsi/lasi700.c
@@ -104,7 +104,7 @@ lasi700_probe(struct parisc_device *dev)

hostdata = kzalloc(sizeof(*hostdata), GFP_KERNEL);
if (!hostdata) {
- dev_printk(KERN_ERR, &dev->dev, "Failed to allocate host data\n");
+ dev_err(&dev->dev, "Failed to allocate host data\n");
return -ENOMEM;
}

diff --git a/drivers/scsi/libsas/sas_task.c b/drivers/scsi/libsas/sas_task.c
index a78e5bd..fab9719 100644
--- a/drivers/scsi/libsas/sas_task.c
+++ b/drivers/scsi/libsas/sas_task.c
@@ -23,11 +23,10 @@ void sas_ssp_task_response(struct device *dev, struct sas_task *task,
memcpy(tstat->buf, iu->sense_data, tstat->buf_valid_size);

if (iu->status != SAM_STAT_CHECK_CONDITION)
- dev_printk(KERN_WARNING, dev,
- "dev %llx sent sense data, but "
- "stat(%x) is not CHECK CONDITION\n",
- SAS_ADDR(task->dev->sas_addr),
- iu->status);
+ dev_warn(dev,
+ "dev %llx sent sense data, but stat(%x) is not CHECK CONDITION\n",
+ SAS_ADDR(task->dev->sas_addr),
+ iu->status);
}
else
/* when datapres contains corrupt/unknown value... */
diff --git a/drivers/scsi/lpfc/lpfc_attr.c b/drivers/scsi/lpfc/lpfc_attr.c
index ad16e54..304b4c2 100644
--- a/drivers/scsi/lpfc/lpfc_attr.c
+++ b/drivers/scsi/lpfc/lpfc_attr.c
@@ -2172,7 +2172,7 @@ lpfc_soft_wwpn_store(struct device *dev, struct device_attribute *attr,
if (phba->cfg_soft_wwnn)
fc_host_node_name(shost) = phba->cfg_soft_wwnn;

- dev_printk(KERN_NOTICE, &phba->pcidev->dev,
+ dev_notice(&phba->pcidev->dev,
"lpfc%d: Reinitializing to use soft_wwpn\n", phba->brd_no);

stat1 = lpfc_do_offline(phba, LPFC_EVT_OFFLINE);
@@ -2265,9 +2265,9 @@ lpfc_soft_wwnn_store(struct device *dev, struct device_attribute *attr,
}
phba->cfg_soft_wwnn = wwn_to_u64(wwnn);

- dev_printk(KERN_NOTICE, &phba->pcidev->dev,
- "lpfc%d: soft_wwnn set. Value will take effect upon "
- "setting of the soft_wwpn\n", phba->brd_no);
+ dev_notice(&phba->pcidev->dev,
+ "lpfc%d: soft_wwnn set. Value will take effect upon setting of the soft_wwpn\n",
+ phba->brd_no);

return count;
}
diff --git a/drivers/scsi/lpfc/lpfc_debugfs.h b/drivers/scsi/lpfc/lpfc_debugfs.h
index 8b2b6a3..b75ea8e 100644
--- a/drivers/scsi/lpfc/lpfc_debugfs.h
+++ b/drivers/scsi/lpfc/lpfc_debugfs.h
@@ -343,10 +343,8 @@ lpfc_debug_dump_q(struct lpfc_queue *q)
if (!q)
return;

- dev_printk(KERN_ERR, &(((q->phba))->pcidev)->dev,
- "%d: [qid:%d, type:%d, subtype:%d, "
- "qe_size:%d, qe_count:%d, "
- "host_index:%d, port_index:%d]\n",
+ dev_err(&(((q->phba))->pcidev)->dev,
+ "%d: [qid:%d, type:%d, subtype:%d, qe_size:%d, qe_count:%d, host_index:%d, port_index:%d]\n",
(q->phba)->brd_no,
q->queue_id, q->type, q->subtype,
q->entry_size, q->entry_count,
diff --git a/drivers/scsi/lpfc/lpfc_hbadisc.c b/drivers/scsi/lpfc/lpfc_hbadisc.c
index d7096ad..d7cd6ec 100644
--- a/drivers/scsi/lpfc/lpfc_hbadisc.c
+++ b/drivers/scsi/lpfc/lpfc_hbadisc.c
@@ -3844,8 +3844,8 @@ lpfc_register_remote_port(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp)

ndlp->rport = rport = fc_remote_port_add(shost, 0, &rport_ids);
if (!rport || !get_device(&rport->dev)) {
- dev_printk(KERN_WARNING, &phba->pcidev->dev,
- "Warning: fc_remote_port_add failed\n");
+ dev_warn(&phba->pcidev->dev,
+ "Warning: fc_remote_port_add failed\n");
return;
}

diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
index 7dc4218..e1a76bb 100644
--- a/drivers/scsi/lpfc/lpfc_init.c
+++ b/drivers/scsi/lpfc/lpfc_init.c
@@ -5952,16 +5952,15 @@ lpfc_sli_pci_mem_setup(struct lpfc_hba *phba)
/* Map HBA SLIM to a kernel virtual address. */
phba->slim_memmap_p = ioremap(phba->pci_bar0_map, bar0map_len);
if (!phba->slim_memmap_p) {
- dev_printk(KERN_ERR, &pdev->dev,
- "ioremap failed for SLIM memory.\n");
+ dev_err(&pdev->dev, "ioremap failed for SLIM memory\n");
goto out;
}

/* Map HBA Control Registers to a kernel virtual address. */
phba->ctrl_regs_memmap_p = ioremap(phba->pci_bar2_map, bar2map_len);
if (!phba->ctrl_regs_memmap_p) {
- dev_printk(KERN_ERR, &pdev->dev,
- "ioremap failed for HBA control registers.\n");
+ dev_err(&pdev->dev,
+ "ioremap failed for HBA control registers\n");
goto out_iounmap_slim;
}

@@ -6245,9 +6244,9 @@ lpfc_sli4_bar0_register_memmap(struct lpfc_hba *phba, uint32_t if_type)
break;
case LPFC_SLI_INTF_IF_TYPE_1:
default:
- dev_printk(KERN_ERR, &phba->pcidev->dev,
- "FATAL - unsupported SLI4 interface type - %d\n",
- if_type);
+ dev_err(&phba->pcidev->dev,
+ "FATAL - unsupported SLI4 interface type - %d\n",
+ if_type);
break;
}
}
@@ -7806,9 +7805,8 @@ lpfc_sli4_pci_mem_setup(struct lpfc_hba *phba)
phba->sli4_hba.conf_regs_memmap_p =
ioremap(phba->pci_bar0_map, bar0map_len);
if (!phba->sli4_hba.conf_regs_memmap_p) {
- dev_printk(KERN_ERR, &pdev->dev,
- "ioremap failed for SLI4 PCI config "
- "registers.\n");
+ dev_err(&pdev->dev,
+ "ioremap failed for SLI4 PCI config registers\n");
goto out;
}
/* Set up BAR0 PCI config space register memory map */
@@ -7817,16 +7815,15 @@ lpfc_sli4_pci_mem_setup(struct lpfc_hba *phba)
phba->pci_bar0_map = pci_resource_start(pdev, 1);
bar0map_len = pci_resource_len(pdev, 1);
if (if_type == LPFC_SLI_INTF_IF_TYPE_2) {
- dev_printk(KERN_ERR, &pdev->dev,
- "FATAL - No BAR0 mapping for SLI4, if_type 2\n");
+ dev_err(&pdev->dev,
+ "FATAL - No BAR0 mapping for SLI4, if_type 2\n");
goto out;
}
phba->sli4_hba.conf_regs_memmap_p =
ioremap(phba->pci_bar0_map, bar0map_len);
if (!phba->sli4_hba.conf_regs_memmap_p) {
- dev_printk(KERN_ERR, &pdev->dev,
- "ioremap failed for SLI4 PCI config "
- "registers.\n");
+ dev_err(&pdev->dev,
+ "ioremap failed for SLI4 PCI config registers\n");
goto out;
}
lpfc_sli4_bar0_register_memmap(phba, if_type);
@@ -7843,8 +7840,8 @@ lpfc_sli4_pci_mem_setup(struct lpfc_hba *phba)
phba->sli4_hba.ctrl_regs_memmap_p =
ioremap(phba->pci_bar1_map, bar1map_len);
if (!phba->sli4_hba.ctrl_regs_memmap_p) {
- dev_printk(KERN_ERR, &pdev->dev,
- "ioremap failed for SLI4 HBA control registers.\n");
+ dev_err(&pdev->dev,
+ "ioremap failed for SLI4 HBA control registers\n");
goto out_iounmap_conf;
}
lpfc_sli4_bar1_register_memmap(phba);
@@ -7861,8 +7858,8 @@ lpfc_sli4_pci_mem_setup(struct lpfc_hba *phba)
phba->sli4_hba.drbl_regs_memmap_p =
ioremap(phba->pci_bar2_map, bar2map_len);
if (!phba->sli4_hba.drbl_regs_memmap_p) {
- dev_printk(KERN_ERR, &pdev->dev,
- "ioremap failed for SLI4 HBA doorbell registers.\n");
+ dev_err(&pdev->dev,
+ "ioremap failed for SLI4 HBA doorbell registers\n");
goto out_iounmap_ctrl;
}
error = lpfc_sli4_bar2_register_memmap(phba, LPFC_VF0);
@@ -7906,9 +7903,9 @@ lpfc_sli4_pci_mem_unset(struct lpfc_hba *phba)
break;
case LPFC_SLI_INTF_IF_TYPE_1:
default:
- dev_printk(KERN_ERR, &phba->pcidev->dev,
- "FATAL - unsupported SLI4 interface type - %d\n",
- if_type);
+ dev_err(&phba->pcidev->dev,
+ "FATAL - unsupported SLI4 interface type - %d\n",
+ if_type);
break;
}
}
@@ -9336,7 +9333,7 @@ lpfc_io_slot_reset_s3(struct pci_dev *pdev)
struct lpfc_sli *psli = &phba->sli;
uint32_t intr_mode;

- dev_printk(KERN_INFO, &pdev->dev, "recovering from a slot reset.\n");
+ dev_info(&pdev->dev, "recovering from a slot reset\n");
if (pci_enable_device_mem(pdev)) {
printk(KERN_ERR "lpfc: Cannot re-enable "
"PCI device after reset.\n");
@@ -10084,7 +10081,7 @@ lpfc_io_slot_reset_s4(struct pci_dev *pdev)
struct lpfc_sli *psli = &phba->sli;
uint32_t intr_mode;

- dev_printk(KERN_INFO, &pdev->dev, "recovering from a slot reset.\n");
+ dev_info(&pdev->dev, "recovering from a slot reset\n");
if (pci_enable_device_mem(pdev)) {
printk(KERN_ERR "lpfc: Cannot re-enable "
"PCI device after reset.\n");
diff --git a/drivers/scsi/mpt2sas/mpt2sas_transport.c b/drivers/scsi/mpt2sas/mpt2sas_transport.c
index 8c2ffbe..5b9d16b 100644
--- a/drivers/scsi/mpt2sas/mpt2sas_transport.c
+++ b/drivers/scsi/mpt2sas/mpt2sas_transport.c
@@ -481,9 +481,8 @@ _transport_delete_port(struct MPT2SAS_ADAPTER *ioc,
enum sas_device_type device_type =
mpt2sas_port->remote_identify.device_type;

- dev_printk(KERN_INFO, &mpt2sas_port->port->dev,
- "remove: sas_addr(0x%016llx)\n",
- (unsigned long long) sas_address);
+ dev_info(&mpt2sas_port->port->dev, "remove: sas_addr(0x%016llx)\n",
+ (unsigned long long) sas_address);

ioc->logging_level |= MPT_DEBUG_TRANSPORT;
if (device_type == SAS_END_DEVICE)
@@ -508,9 +507,9 @@ _transport_delete_phy(struct MPT2SAS_ADAPTER *ioc,
{
u64 sas_address = mpt2sas_port->remote_identify.sas_address;

- dev_printk(KERN_INFO, &mpt2sas_phy->phy->dev,
- "remove: sas_addr(0x%016llx), phy(%d)\n",
- (unsigned long long) sas_address, mpt2sas_phy->phy_id);
+ dev_info(&mpt2sas_phy->phy->dev,
+ "remove: sas_addr(0x%016llx), phy(%d)\n",
+ (unsigned long long) sas_address, mpt2sas_phy->phy_id);

list_del(&mpt2sas_phy->port_siblings);
mpt2sas_port->num_phys--;
@@ -532,9 +531,9 @@ _transport_add_phy(struct MPT2SAS_ADAPTER *ioc, struct _sas_port *mpt2sas_port,
{
u64 sas_address = mpt2sas_port->remote_identify.sas_address;

- dev_printk(KERN_INFO, &mpt2sas_phy->phy->dev,
- "add: sas_addr(0x%016llx), phy(%d)\n", (unsigned long long)
- sas_address, mpt2sas_phy->phy_id);
+ dev_info(&mpt2sas_phy->phy->dev,
+ "add: sas_addr(0x%016llx), phy(%d)\n",
+ (unsigned long long)sas_address, mpt2sas_phy->phy_id);

list_add_tail(&mpt2sas_phy->port_siblings, &mpt2sas_port->phy_list);
mpt2sas_port->num_phys++;
@@ -719,11 +718,11 @@ mpt2sas_transport_port_add(struct MPT2SAS_ADAPTER *ioc, u16 handle,
list_for_each_entry(mpt2sas_phy, &mpt2sas_port->phy_list,
port_siblings) {
if ((ioc->logging_level & MPT_DEBUG_TRANSPORT))
- dev_printk(KERN_INFO, &port->dev, "add: handle(0x%04x)"
- ", sas_addr(0x%016llx), phy(%d)\n", handle,
- (unsigned long long)
- mpt2sas_port->remote_identify.sas_address,
- mpt2sas_phy->phy_id);
+ dev_info(&port->dev, "add: handle(0x%04x), sas_addr(0x%016llx), phy(%d)\n",
+ handle,
+ (unsigned long long)
+ mpt2sas_port->remote_identify.sas_address,
+ mpt2sas_phy->phy_id);
sas_port_add_phy(port, mpt2sas_phy->phy);
mpt2sas_phy->phy_belongs_to_port = 1;
}
@@ -741,10 +740,10 @@ mpt2sas_transport_port_add(struct MPT2SAS_ADAPTER *ioc, u16 handle,
ioc->name, __FILE__, __LINE__, __func__);
}
if ((ioc->logging_level & MPT_DEBUG_TRANSPORT))
- dev_printk(KERN_INFO, &rphy->dev, "add: handle(0x%04x), "
- "sas_addr(0x%016llx)\n", handle,
- (unsigned long long)
- mpt2sas_port->remote_identify.sas_address);
+ dev_info(&rphy->dev, "add: handle(0x%04x), sas_addr(0x%016llx)\n",
+ handle,
+ (unsigned long long)
+ mpt2sas_port->remote_identify.sas_address);
mpt2sas_port->rphy = rphy;
spin_lock_irqsave(&ioc->sas_node_lock, flags);
list_add_tail(&mpt2sas_port->port_list, &sas_node->sas_port_list);
@@ -823,11 +822,11 @@ mpt2sas_transport_port_remove(struct MPT2SAS_ADAPTER *ioc, u64 sas_address,
list_for_each_entry_safe(mpt2sas_phy, next_phy,
&mpt2sas_port->phy_list, port_siblings) {
if ((ioc->logging_level & MPT_DEBUG_TRANSPORT))
- dev_printk(KERN_INFO, &mpt2sas_port->port->dev,
- "remove: sas_addr(0x%016llx), phy(%d)\n",
- (unsigned long long)
- mpt2sas_port->remote_identify.sas_address,
- mpt2sas_phy->phy_id);
+ dev_info(&mpt2sas_port->port->dev,
+ "remove: sas_addr(0x%016llx), phy(%d)\n",
+ (unsigned long long)
+ mpt2sas_port->remote_identify.sas_address,
+ mpt2sas_phy->phy_id);
mpt2sas_phy->phy_belongs_to_port = 0;
sas_port_delete_phy(mpt2sas_port->port, mpt2sas_phy->phy);
list_del(&mpt2sas_phy->port_siblings);
@@ -890,14 +889,14 @@ mpt2sas_transport_add_host_phy(struct MPT2SAS_ADAPTER *ioc, struct _sas_phy
return -1;
}
if ((ioc->logging_level & MPT_DEBUG_TRANSPORT))
- dev_printk(KERN_INFO, &phy->dev,
- "add: handle(0x%04x), sas_addr(0x%016llx)\n"
- "\tattached_handle(0x%04x), sas_addr(0x%016llx)\n",
- mpt2sas_phy->handle, (unsigned long long)
- mpt2sas_phy->identify.sas_address,
- mpt2sas_phy->attached_handle,
- (unsigned long long)
- mpt2sas_phy->remote_identify.sas_address);
+ dev_info(&phy->dev,
+ "add: handle(0x%04x), sas_addr(0x%016llx)\n"
+ "\tattached_handle(0x%04x), sas_addr(0x%016llx)\n",
+ mpt2sas_phy->handle, (unsigned long long)
+ mpt2sas_phy->identify.sas_address,
+ mpt2sas_phy->attached_handle,
+ (unsigned long long)
+ mpt2sas_phy->remote_identify.sas_address);
mpt2sas_phy->phy = phy;
return 0;
}
@@ -958,14 +957,14 @@ mpt2sas_transport_add_expander_phy(struct MPT2SAS_ADAPTER *ioc, struct _sas_phy
return -1;
}
if ((ioc->logging_level & MPT_DEBUG_TRANSPORT))
- dev_printk(KERN_INFO, &phy->dev,
- "add: handle(0x%04x), sas_addr(0x%016llx)\n"
- "\tattached_handle(0x%04x), sas_addr(0x%016llx)\n",
- mpt2sas_phy->handle, (unsigned long long)
- mpt2sas_phy->identify.sas_address,
- mpt2sas_phy->attached_handle,
- (unsigned long long)
- mpt2sas_phy->remote_identify.sas_address);
+ dev_info(&phy->dev,
+ "add: handle(0x%04x), sas_addr(0x%016llx)\n"
+ "\tattached_handle(0x%04x), sas_addr(0x%016llx)\n",
+ mpt2sas_phy->handle, (unsigned long long)
+ mpt2sas_phy->identify.sas_address,
+ mpt2sas_phy->attached_handle,
+ (unsigned long long)
+ mpt2sas_phy->remote_identify.sas_address);
mpt2sas_phy->phy = phy;
return 0;
}
@@ -1015,13 +1014,13 @@ mpt2sas_transport_update_links(struct MPT2SAS_ADAPTER *ioc,
_transport_convert_phy_link_rate(link_rate);

if ((ioc->logging_level & MPT_DEBUG_TRANSPORT))
- dev_printk(KERN_INFO, &mpt2sas_phy->phy->dev,
- "refresh: parent sas_addr(0x%016llx),\n"
- "\tlink_rate(0x%02x), phy(%d)\n"
- "\tattached_handle(0x%04x), sas_addr(0x%016llx)\n",
- (unsigned long long)sas_address,
- link_rate, phy_number, handle, (unsigned long long)
- mpt2sas_phy->remote_identify.sas_address);
+ dev_info(&mpt2sas_phy->phy->dev,
+ "refresh: parent sas_addr(0x%016llx),\n"
+ "\tlink_rate(0x%02x), phy(%d)\n"
+ "\tattached_handle(0x%04x), sas_addr(0x%016llx)\n",
+ (unsigned long long)sas_address,
+ link_rate, phy_number, handle, (unsigned long long)
+ mpt2sas_phy->remote_identify.sas_address);
}

static inline void *
diff --git a/drivers/scsi/mvsas/mv_64xx.c b/drivers/scsi/mvsas/mv_64xx.c
index 8ba4722..33d870c 100644
--- a/drivers/scsi/mvsas/mv_64xx.c
+++ b/drivers/scsi/mvsas/mv_64xx.c
@@ -200,7 +200,7 @@ static int __devinit mvs_64xx_chip_reset(struct mvs_info *mvi)
break;
}
if (mr32(MVS_GBL_CTL) & HBA_RST) {
- dev_printk(KERN_ERR, mvi->dev, "HBA reset failed\n");
+ dev_err(mvi->dev, "HBA reset failed\n");
return -EBUSY;
}
return 0;
diff --git a/drivers/scsi/mvsas/mv_chips.h b/drivers/scsi/mvsas/mv_chips.h
index bcc4080..5cfe325 100644
--- a/drivers/scsi/mvsas/mv_chips.h
+++ b/drivers/scsi/mvsas/mv_chips.h
@@ -255,10 +255,10 @@ static inline void mvs_show_pcie_usage(struct mvs_info *mvi)
link_spd = (link_stat & PLS_LINK_SPD) >> PLS_LINK_SPD_OFFS;
if (link_spd >= 3)
link_spd = 0;
- dev_printk(KERN_INFO, mvi->dev,
- "mvsas: PCI-E x%u, Bandwidth Usage: %s Gbps\n",
- (link_stat & PLS_NEG_LINK_WD) >> PLS_NEG_LINK_WD_OFFS,
- spd[link_spd]);
+ dev_info(mvi->dev,
+ "mvsas: PCI-E x%u, Bandwidth Usage: %s Gbps\n",
+ (link_stat & PLS_NEG_LINK_WD) >> PLS_NEG_LINK_WD_OFFS,
+ spd[link_spd]);
}

static inline u32 mvs_hw_max_link_rate(void)
diff --git a/drivers/scsi/mvsas/mv_init.c b/drivers/scsi/mvsas/mv_init.c
index cc59dff..edd37c5 100644
--- a/drivers/scsi/mvsas/mv_init.c
+++ b/drivers/scsi/mvsas/mv_init.c
@@ -421,22 +421,21 @@ static int pci_go_64(struct pci_dev *pdev)
if (rc) {
rc = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
if (rc) {
- dev_printk(KERN_ERR, &pdev->dev,
- "64-bit DMA enable failed\n");
+ dev_err(&pdev->dev,
+ "64-bit DMA enable failed\n");
return rc;
}
}
} else {
rc = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
if (rc) {
- dev_printk(KERN_ERR, &pdev->dev,
- "32-bit DMA enable failed\n");
+ dev_err(&pdev->dev, "32-bit DMA enable failed\n");
return rc;
}
rc = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
if (rc) {
- dev_printk(KERN_ERR, &pdev->dev,
- "32-bit consistent DMA enable failed\n");
+ dev_err(&pdev->dev,
+ "32-bit consistent DMA enable failed\n");
return rc;
}
}
@@ -547,8 +546,7 @@ static int __devinit mvs_pci_init(struct pci_dev *pdev,
struct Scsi_Host *shost = NULL;
const struct mvs_chip_info *chip;

- dev_printk(KERN_INFO, &pdev->dev,
- "mvsas: driver version %s\n", DRV_VERSION);
+ dev_info(&pdev->dev, "mvsas: driver version %s\n", DRV_VERSION);
rc = pci_enable_device(pdev);
if (rc)
goto err_out_enable;
diff --git a/drivers/scsi/mvsas/mv_sas.c b/drivers/scsi/mvsas/mv_sas.c
index a3776d6..5a67f03 100644
--- a/drivers/scsi/mvsas/mv_sas.c
+++ b/drivers/scsi/mvsas/mv_sas.c
@@ -805,8 +805,7 @@ static int mvs_task_prep(struct sas_task *task, struct mvs_info *mvi, int is_tmf
rc = mvs_task_prep_ata(mvi, &tei);
break;
default:
- dev_printk(KERN_ERR, mvi->dev,
- "unknown sas_task proto: 0x%x\n",
+ dev_err(mvi->dev, "unknown sas_task proto: 0x%x\n",
task->task_proto);
rc = -EINVAL;
break;
@@ -836,7 +835,7 @@ err_out_tag:
mvs_tag_free(mvi, tag);
err_out:

- dev_printk(KERN_ERR, mvi->dev, "mvsas prep failed[%d]!\n", rc);
+ dev_err(mvi->dev, "mvsas prep failed[%d]!\n", rc);
if (!sas_protocol_ata(task->task_proto))
if (n_elem)
dma_unmap_sg(mvi->dev, task->scatter, n_elem,
@@ -895,7 +894,7 @@ static int mvs_task_exec(struct sas_task *task, const int num, gfp_t gfp_flags,
spin_lock_irqsave(&mvi->lock, flags);
rc = mvs_task_prep(task, mvi, is_tmf, tmf, &pass);
if (rc)
- dev_printk(KERN_ERR, mvi->dev, "mvsas exec failed[%d]!\n", rc);
+ dev_err(mvi->dev, "mvsas exec failed[%d]!\n", rc);

if (likely(pass))
MVS_CHIP_DISP->start_delivery(mvi, (mvi->tx_prod - 1) &
@@ -942,7 +941,7 @@ static int mvs_collector_task_exec(struct sas_task *task, const int num, gfp_t g
spin_lock_irqsave(&mvi->lock, flags);
rc = mvs_task_prep(t, mvi, is_tmf, tmf, &pass[mvi->id]);
if (rc)
- dev_printk(KERN_ERR, mvi->dev, "mvsas exec failed[%d]!\n", rc);
+ dev_err(mvi->dev, "mvsas exec failed[%d]!\n", rc);
spin_unlock_irqrestore(&mvi->lock, flags);
}

diff --git a/drivers/scsi/pm8001/pm8001_init.c b/drivers/scsi/pm8001/pm8001_init.c
index 0267c22..100f4b3 100644
--- a/drivers/scsi/pm8001/pm8001_init.c
+++ b/drivers/scsi/pm8001/pm8001_init.c
@@ -406,7 +406,7 @@ static int pci_go_44(struct pci_dev *pdev)
rc = pci_set_consistent_dma_mask(pdev,
DMA_BIT_MASK(32));
if (rc) {
- dev_printk(KERN_ERR, &pdev->dev,
+ dev_err(&pdev->dev,
"44-bit DMA enable failed\n");
return rc;
}
@@ -414,13 +414,12 @@ static int pci_go_44(struct pci_dev *pdev)
} else {
rc = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
if (rc) {
- dev_printk(KERN_ERR, &pdev->dev,
- "32-bit DMA enable failed\n");
+ dev_err(&pdev->dev, "32-bit DMA enable failed\n");
return rc;
}
rc = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
if (rc) {
- dev_printk(KERN_ERR, &pdev->dev,
+ dev_err(&pdev->dev,
"32-bit consistent DMA enable failed\n");
return rc;
}
@@ -624,8 +623,7 @@ static int __devinit pm8001_pci_probe(struct pci_dev *pdev,
struct Scsi_Host *shost = NULL;
const struct pm8001_chip_info *chip;

- dev_printk(KERN_INFO, &pdev->dev,
- "pm8001: driver version %s\n", DRV_VERSION);
+ dev_info(&pdev->dev, "pm8001: driver version %s\n", DRV_VERSION);
rc = pci_enable_device(pdev);
if (rc)
goto err_out_enable;
diff --git a/drivers/scsi/pm8001/pm8001_sas.c b/drivers/scsi/pm8001/pm8001_sas.c
index b961112..5ac4ed4 100644
--- a/drivers/scsi/pm8001/pm8001_sas.c
+++ b/drivers/scsi/pm8001/pm8001_sas.c
@@ -446,7 +446,7 @@ static int pm8001_task_exec(struct sas_task *task, const int num,
rc = pm8001_task_prep_ata(pm8001_ha, ccb);
break;
default:
- dev_printk(KERN_ERR, pm8001_ha->dev,
+ dev_err(pm8001_ha->dev,
"unknown sas_task proto: 0x%x\n",
t->task_proto);
rc = -EINVAL;
@@ -472,7 +472,7 @@ static int pm8001_task_exec(struct sas_task *task, const int num,
err_out_tag:
pm8001_tag_free(pm8001_ha, tag);
err_out:
- dev_printk(KERN_ERR, pm8001_ha->dev, "pm8001 exec failed[%d]!\n", rc);
+ dev_err(pm8001_ha->dev, "pm8001 exec failed[%d]!\n", rc);
if (!sas_protocol_ata(t->task_proto))
if (n_elem)
dma_unmap_sg(pm8001_ha->dev, t->scatter, n_elem,
diff --git a/drivers/scsi/raid_class.c b/drivers/scsi/raid_class.c
index 2c146b4..b9d1603 100644
--- a/drivers/scsi/raid_class.c
+++ b/drivers/scsi/raid_class.c
@@ -99,14 +99,14 @@ static int raid_remove(struct transport_container *tc, struct device *dev,
{
struct raid_data *rd = dev_get_drvdata(cdev);
struct raid_component *rc, *next;
- dev_printk(KERN_ERR, dev, "RAID REMOVE\n");
+ dev_err(dev, "RAID REMOVE\n");
dev_set_drvdata(cdev, NULL);
list_for_each_entry_safe(rc, next, &rd->component_list, node) {
list_del(&rc->node);
- dev_printk(KERN_ERR, rc->dev.parent, "RAID COMPONENT REMOVE\n");
+ dev_err(rc->dev.parent, "RAID COMPONENT REMOVE\n");
device_unregister(&rc->dev);
}
- dev_printk(KERN_ERR, dev, "RAID REMOVE DONE\n");
+ dev_err(dev, "RAID REMOVE DONE\n");
kfree(rd);
return 0;
}
@@ -215,7 +215,7 @@ static void raid_component_release(struct device *dev)
{
struct raid_component *rc =
container_of(dev, struct raid_component, dev);
- dev_printk(KERN_ERR, rc->dev.parent, "COMPONENT RELEASE\n");
+ dev_err(rc->dev.parent, "COMPONENT RELEASE\n");
put_device(rc->dev.parent);
kfree(rc);
}
diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c
index 3e58b22..d3743da 100644
--- a/drivers/scsi/scsi_scan.c
+++ b/drivers/scsi/scsi_scan.c
@@ -429,7 +429,8 @@ static struct scsi_target *scsi_alloc_target(struct device *parent,
error = shost->hostt->target_alloc(starget);

if(error) {
- dev_printk(KERN_ERR, dev, "target allocation failed, error %d\n", error);
+ dev_err(dev, "target allocation failed, error %d\n",
+ error);
/* don't want scsi_target_reap to do the final
* put because it will be under the host lock */
scsi_target_destroy(starget);
diff --git a/drivers/scsi/scsi_transport_fc.c b/drivers/scsi/scsi_transport_fc.c
index e894ca7..bafad1c 100644
--- a/drivers/scsi/scsi_transport_fc.c
+++ b/drivers/scsi/scsi_transport_fc.c
@@ -3143,9 +3143,8 @@ fc_timeout_deleted_rport(struct work_struct *work)
if ((rport->port_state == FC_PORTSTATE_ONLINE) &&
(rport->scsi_target_id != -1) &&
!(rport->roles & FC_PORT_ROLE_FCP_TARGET)) {
- dev_printk(KERN_ERR, &rport->dev,
- "blocked FC remote port time out: no longer"
- " a FCP target, removing starget\n");
+ dev_err(&rport->dev,
+ "blocked FC remote port time out: no longer a FCP target, removing starget\n");
spin_unlock_irqrestore(shost->host_lock, flags);
scsi_target_unblock(&rport->dev, SDEV_TRANSPORT_OFFLINE);
fc_queue_work(shost, &rport->stgt_delete_work);
@@ -3155,9 +3154,8 @@ fc_timeout_deleted_rport(struct work_struct *work)
/* NOOP state - we're flushing workq's */
if (rport->port_state != FC_PORTSTATE_BLOCKED) {
spin_unlock_irqrestore(shost->host_lock, flags);
- dev_printk(KERN_ERR, &rport->dev,
- "blocked FC remote port time out: leaving"
- " rport%s alone\n",
+ dev_err(&rport->dev,
+ "blocked FC remote port time out: leaving rport%s alone\n",
(rport->scsi_target_id != -1) ? " and starget" : "");
return;
}
@@ -3166,18 +3164,16 @@ fc_timeout_deleted_rport(struct work_struct *work)
(rport->scsi_target_id == -1)) {
list_del(&rport->peers);
rport->port_state = FC_PORTSTATE_DELETED;
- dev_printk(KERN_ERR, &rport->dev,
- "blocked FC remote port time out: removing"
- " rport%s\n",
+ dev_err(&rport->dev,
+ "blocked FC remote port time out: removing rport%s\n",
(rport->scsi_target_id != -1) ? " and starget" : "");
fc_queue_work(shost, &rport->rport_delete_work);
spin_unlock_irqrestore(shost->host_lock, flags);
return;
}

- dev_printk(KERN_ERR, &rport->dev,
- "blocked FC remote port time out: removing target and "
- "saving binding\n");
+ dev_err(&rport->dev,
+ "blocked FC remote port time out: removing target and saving binding\n");

list_move_tail(&rport->peers, &fc_host->rport_bindings);

@@ -3436,9 +3432,8 @@ fc_vport_setup(struct Scsi_Host *shost, int channel, struct device *pdev,
vport->flags &= ~FC_VPORT_CREATING;
spin_unlock_irqrestore(shost->host_lock, flags);

- dev_printk(KERN_NOTICE, pdev,
- "%s created via shost%d channel %d\n", dev_name(dev),
- shost->host_no, channel);
+ dev_notice(pdev, "%s created via shost%d channel %d\n",
+ dev_name(dev), shost->host_no, channel);

*ret_vport = vport;

@@ -3551,9 +3546,9 @@ fc_vport_sched_delete(struct work_struct *work)

stat = fc_vport_terminate(vport);
if (stat)
- dev_printk(KERN_ERR, vport->dev.parent,
- "%s: %s could not be deleted created via "
- "shost%d channel %d - error %d\n", __func__,
+ dev_err(vport->dev.parent,
+ "%s: %s could not be deleted created via shost%d channel %d - error %d\n",
+ __func__,
dev_name(&vport->dev), vport->shost->host_no,
vport->channel, stat);
}
diff --git a/drivers/scsi/scsi_transport_sas.c b/drivers/scsi/scsi_transport_sas.c
index f7565fc..86741cd 100644
--- a/drivers/scsi/scsi_transport_sas.c
+++ b/drivers/scsi/scsi_transport_sas.c
@@ -289,8 +289,7 @@ static int sas_host_setup(struct transport_container *tc, struct device *dev,
sas_host->next_port_id = 0;

if (sas_bsg_initialize(shost, NULL))
- dev_printk(KERN_ERR, dev, "fail to a bsg device %d\n",
- shost->host_no);
+ dev_err(dev, "fail to a bsg device %d\n", shost->host_no);

return 0;
}
@@ -1108,8 +1107,8 @@ void sas_port_add_phy(struct sas_port *port, struct sas_phy *phy)
/* If this trips, you added a phy that was already
* part of a different port */
if (unlikely(tmp != phy)) {
- dev_printk(KERN_ERR, &port->dev, "trying to add phy %s fails: it's already part of another port\n",
- dev_name(&phy->dev));
+ dev_err(&port->dev, "trying to add phy %s fails: it's already part of another port\n",
+ dev_name(&phy->dev));
BUG();
}
} else {
diff --git a/drivers/scsi/sni_53c710.c b/drivers/scsi/sni_53c710.c
index cf51432..6af585c 100644
--- a/drivers/scsi/sni_53c710.c
+++ b/drivers/scsi/sni_53c710.c
@@ -79,7 +79,7 @@ static int __devinit snirm710_probe(struct platform_device *dev)
base = res->start;
hostdata = kzalloc(sizeof(*hostdata), GFP_KERNEL);
if (!hostdata) {
- dev_printk(KERN_ERR, dev, "Failed to allocate host data\n");
+ dev_err(dev, "Failed to allocate host data\n");
return -ENOMEM;
}

diff --git a/drivers/scsi/zalon.c b/drivers/scsi/zalon.c
index 27e84e4..f89ab72 100644
--- a/drivers/scsi/zalon.c
+++ b/drivers/scsi/zalon.c
@@ -137,8 +137,8 @@ zalon_probe(struct parisc_device *dev)
return -ENODEV;

if (request_irq(dev->irq, ncr53c8xx_intr, IRQF_SHARED, "zalon", host)) {
- dev_printk(KERN_ERR, &dev->dev, "irq problem with %d, detaching\n ",
- dev->irq);
+ dev_err(&dev->dev, "irq problem with %d, detaching\n",
+ dev->irq);
goto fail;
}

--
1.7.8.112.g3fd21

2012-10-28 08:10:34

by Joe Perches

[permalink] [raw]
Subject: [PATCH 14/16] virtio: Convert dev_printk(KERN_<LEVEL> to dev_<level>(

dev_<level> calls take less code than dev_printk(KERN_<LEVEL>
and reducing object size is good.
Convert if (printk_ratelimit()) dev_printk to dev_<level>_ratelimited.

Signed-off-by: Joe Perches <[email protected]>
---
drivers/virtio/virtio_balloon.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c
index 0908e60..586395c 100644
--- a/drivers/virtio/virtio_balloon.c
+++ b/drivers/virtio/virtio_balloon.c
@@ -130,10 +130,9 @@ static void fill_balloon(struct virtio_balloon *vb, size_t num)
struct page *page = alloc_page(GFP_HIGHUSER | __GFP_NORETRY |
__GFP_NOMEMALLOC | __GFP_NOWARN);
if (!page) {
- if (printk_ratelimit())
- dev_printk(KERN_INFO, &vb->vdev->dev,
- "Out of puff! Can't get %zu pages\n",
- num);
+ dev_info_ratelimited(&vb->vdev->dev,
+ "Out of puff! Can't get %zu pages\n",
+ num);
/* Sleep for at least 1/5 of a second before retry. */
msleep(200);
break;
--
1.7.8.112.g3fd21

2012-10-28 08:10:45

by Joe Perches

[permalink] [raw]
Subject: [PATCH 15/16] watchdog: Convert dev_printk(KERN_<LEVEL> to dev_<level>(

dev_<level> calls take less code than dev_printk(KERN_<LEVEL>
and reducing object size is good.

Signed-off-by: Joe Perches <[email protected]>
---
drivers/watchdog/mpcore_wdt.c | 19 +++++++++----------
1 files changed, 9 insertions(+), 10 deletions(-)

diff --git a/drivers/watchdog/mpcore_wdt.c b/drivers/watchdog/mpcore_wdt.c
index 7c741dc..24388c2 100644
--- a/drivers/watchdog/mpcore_wdt.c
+++ b/drivers/watchdog/mpcore_wdt.c
@@ -80,8 +80,7 @@ static irqreturn_t mpcore_wdt_fire(int irq, void *arg)

/* Check it really was our interrupt */
if (readl(wdt->base + TWD_WDOG_INTSTAT)) {
- dev_printk(KERN_CRIT, wdt->dev,
- "Triggered - Reboot ignored.\n");
+ dev_crit(wdt->dev, "Triggered - Reboot ignored\n");
/* Clear the interrupt on the watchdog */
writel(1, wdt->base + TWD_WDOG_INTSTAT);
return IRQ_HANDLED;
@@ -123,7 +122,7 @@ static void mpcore_wdt_stop(struct mpcore_wdt *wdt)

static void mpcore_wdt_start(struct mpcore_wdt *wdt)
{
- dev_printk(KERN_INFO, wdt->dev, "enabling watchdog.\n");
+ dev_info(wdt->dev, "enabling watchdog\n");

/* This loads the count register but does NOT start the count yet */
mpcore_wdt_keepalive(wdt);
@@ -180,8 +179,8 @@ static int mpcore_wdt_release(struct inode *inode, struct file *file)
if (wdt->expect_close == 42)
mpcore_wdt_stop(wdt);
else {
- dev_printk(KERN_CRIT, wdt->dev,
- "unexpected close, not stopping watchdog!\n");
+ dev_crit(wdt->dev,
+ "unexpected close, not stopping watchdog!\n");
mpcore_wdt_keepalive(wdt);
}
clear_bit(0, &wdt->timer_alive);
@@ -351,9 +350,9 @@ static int __devinit mpcore_wdt_probe(struct platform_device *pdev)
ret = devm_request_irq(wdt->dev, wdt->irq, mpcore_wdt_fire, 0,
"mpcore_wdt", wdt);
if (ret) {
- dev_printk(KERN_ERR, wdt->dev,
- "cannot register IRQ%d for watchdog\n",
- wdt->irq);
+ dev_err(wdt->dev,
+ "cannot register IRQ%d for watchdog\n",
+ wdt->irq);
return ret;
}
}
@@ -365,9 +364,9 @@ static int __devinit mpcore_wdt_probe(struct platform_device *pdev)
mpcore_wdt_miscdev.parent = &pdev->dev;
ret = misc_register(&mpcore_wdt_miscdev);
if (ret) {
- dev_printk(KERN_ERR, wdt->dev,
+ dev_err(wdt->dev,
"cannot register miscdev on minor=%d (err=%d)\n",
- WATCHDOG_MINOR, ret);
+ WATCHDOG_MINOR, ret);
return ret;
}

--
1.7.8.112.g3fd21

2012-10-28 08:10:58

by Joe Perches

[permalink] [raw]
Subject: [PATCH 16/16] sound: Convert dev_printk(KERN_<LEVEL> to dev_<level>(

dev_<level> calls take less code than dev_printk(KERN_<LEVEL>
and reducing object size is good.
Coalesce multiline formats for easier grep.
Coalesce segmented single line formats too.

Signed-off-by: Joe Perches <[email protected]>
---
sound/pci/asihpi/hpidspcd.c | 22 +++++++++-------------
sound/pci/asihpi/hpioctl.c | 17 ++++++++---------
2 files changed, 17 insertions(+), 22 deletions(-)

diff --git a/sound/pci/asihpi/hpidspcd.c b/sound/pci/asihpi/hpidspcd.c
index 456a758..ac91637 100644
--- a/sound/pci/asihpi/hpidspcd.c
+++ b/sound/pci/asihpi/hpidspcd.c
@@ -49,14 +49,12 @@ short hpi_dsp_code_open(u32 adapter, void *os_data, struct dsp_code *dsp_code,
err = request_firmware(&firmware, fw_name, &dev->dev);

if (err || !firmware) {
- dev_printk(KERN_ERR, &dev->dev,
- "%d, request_firmware failed for %s\n", err,
- fw_name);
+ dev_err(&dev->dev, "%d, request_firmware failed for %s\n",
+ err, fw_name);
goto error1;
}
if (firmware->size < sizeof(header)) {
- dev_printk(KERN_ERR, &dev->dev, "Header size too small %s\n",
- fw_name);
+ dev_err(&dev->dev, "Header size too small %s\n", fw_name);
goto error2;
}
memcpy(&header, firmware->data, sizeof(header));
@@ -64,7 +62,7 @@ short hpi_dsp_code_open(u32 adapter, void *os_data, struct dsp_code *dsp_code,
if ((header.type != 0x45444F43) || /* "CODE" */
(header.adapter != adapter)
|| (header.size != firmware->size)) {
- dev_printk(KERN_ERR, &dev->dev,
+ dev_err(&dev->dev,
"Invalid firmware header size %d != file %zd\n",
header.size, firmware->size);
goto error2;
@@ -72,17 +70,15 @@ short hpi_dsp_code_open(u32 adapter, void *os_data, struct dsp_code *dsp_code,

if ((header.version >> 9) != (HPI_VER >> 9)) {
/* Consider even and subsequent odd minor versions to be compatible */
- dev_printk(KERN_ERR, &dev->dev,
- "Incompatible firmware version "
- "DSP image %X != Driver %X\n", header.version,
- HPI_VER);
+ dev_err(&dev->dev, "Incompatible firmware version DSP image %X != Driver %X\n",
+ header.version, HPI_VER);
goto error2;
}

if (header.version != HPI_VER) {
- dev_printk(KERN_INFO, &dev->dev,
- "Firmware: release version mismatch DSP image %X != Driver %X\n",
- header.version, HPI_VER);
+ dev_info(&dev->dev,
+ "Firmware: release version mismatch DSP image %X != Driver %X\n",
+ header.version, HPI_VER);
}

HPI_DEBUG_LOG(DEBUG, "dsp code %s opened\n", fw_name);
diff --git a/sound/pci/asihpi/hpioctl.c b/sound/pci/asihpi/hpioctl.c
index 6091562..8f96749 100644
--- a/sound/pci/asihpi/hpioctl.c
+++ b/sound/pci/asihpi/hpioctl.c
@@ -326,7 +326,7 @@ int __devinit asihpi_adapter_probe(struct pci_dev *pci_dev,
pci_dev->subsystem_device, pci_dev->devfn);

if (pci_enable_device(pci_dev) < 0) {
- dev_printk(KERN_ERR, &pci_dev->dev,
+ dev_err(&pci_dev->dev,
"pci_enable_device failed, disabling device\n");
return -EIO;
}
@@ -398,9 +398,8 @@ int __devinit asihpi_adapter_probe(struct pci_dev *pci_dev,
mutex_init(&adapters[adapter_index].mutex);
pci_set_drvdata(pci_dev, &adapters[adapter_index]);

- dev_printk(KERN_INFO, &pci_dev->dev,
- "probe succeeded for ASI%04X HPI index %d\n",
- adapter.adapter->type, adapter_index);
+ dev_info(&pci_dev->dev, "probe succeeded for ASI%04X HPI index %d\n",
+ adapter.adapter->type, adapter_index);

return 0;

@@ -448,11 +447,11 @@ void __devexit asihpi_adapter_remove(struct pci_dev *pci_dev)

pci_set_drvdata(pci_dev, NULL);
if (1)
- dev_printk(KERN_INFO, &pci_dev->dev,
- "remove %04x:%04x,%04x:%04x,%04x," " HPI index %d.\n",
- pci_dev->vendor, pci_dev->device,
- pci_dev->subsystem_vendor, pci_dev->subsystem_device,
- pci_dev->devfn, pa->adapter->index);
+ dev_info(&pci_dev->dev,
+ "remove %04x:%04x,%04x:%04x,%04x, HPI index %d\n",
+ pci_dev->vendor, pci_dev->device,
+ pci_dev->subsystem_vendor, pci_dev->subsystem_device,
+ pci_dev->devfn, pa->adapter->index);

memset(pa, 0, sizeof(*pa));
}
--
1.7.8.112.g3fd21

2012-10-28 08:11:58

by Joe Perches

[permalink] [raw]
Subject: [PATCH 13/16] usb: Convert dev_printk(KERN_<LEVEL> to dev_<level>(

dev_<level> calls take less code than dev_printk(KERN_<LEVEL>
and reducing object size is good.

Signed-off-by: Joe Perches <[email protected]>
---
drivers/usb/core/hub.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index 5b131b6..fbaf3c3 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -2055,7 +2055,7 @@ static void show_string(struct usb_device *udev, char *id, char *string)
{
if (!string)
return;
- dev_printk(KERN_INFO, &udev->dev, "%s: %s\n", id, string);
+ dev_info(&udev->dev, "%s: %s\n", id, string);
}

static void announce_device(struct usb_device *udev)
--
1.7.8.112.g3fd21

2012-10-28 08:59:11

by Takashi Iwai

[permalink] [raw]
Subject: Re: [PATCH 16/16] sound: Convert dev_printk(KERN_<LEVEL> to dev_<level>(

At Sun, 28 Oct 2012 01:05:54 -0700,
Joe Perches wrote:
>
> dev_<level> calls take less code than dev_printk(KERN_<LEVEL>
> and reducing object size is good.
> Coalesce multiline formats for easier grep.
> Coalesce segmented single line formats too.
>
> Signed-off-by: Joe Perches <[email protected]>

Thanks, applied.


Takashi

> ---
> sound/pci/asihpi/hpidspcd.c | 22 +++++++++-------------
> sound/pci/asihpi/hpioctl.c | 17 ++++++++---------
> 2 files changed, 17 insertions(+), 22 deletions(-)
>
> diff --git a/sound/pci/asihpi/hpidspcd.c b/sound/pci/asihpi/hpidspcd.c
> index 456a758..ac91637 100644
> --- a/sound/pci/asihpi/hpidspcd.c
> +++ b/sound/pci/asihpi/hpidspcd.c
> @@ -49,14 +49,12 @@ short hpi_dsp_code_open(u32 adapter, void *os_data, struct dsp_code *dsp_code,
> err = request_firmware(&firmware, fw_name, &dev->dev);
>
> if (err || !firmware) {
> - dev_printk(KERN_ERR, &dev->dev,
> - "%d, request_firmware failed for %s\n", err,
> - fw_name);
> + dev_err(&dev->dev, "%d, request_firmware failed for %s\n",
> + err, fw_name);
> goto error1;
> }
> if (firmware->size < sizeof(header)) {
> - dev_printk(KERN_ERR, &dev->dev, "Header size too small %s\n",
> - fw_name);
> + dev_err(&dev->dev, "Header size too small %s\n", fw_name);
> goto error2;
> }
> memcpy(&header, firmware->data, sizeof(header));
> @@ -64,7 +62,7 @@ short hpi_dsp_code_open(u32 adapter, void *os_data, struct dsp_code *dsp_code,
> if ((header.type != 0x45444F43) || /* "CODE" */
> (header.adapter != adapter)
> || (header.size != firmware->size)) {
> - dev_printk(KERN_ERR, &dev->dev,
> + dev_err(&dev->dev,
> "Invalid firmware header size %d != file %zd\n",
> header.size, firmware->size);
> goto error2;
> @@ -72,17 +70,15 @@ short hpi_dsp_code_open(u32 adapter, void *os_data, struct dsp_code *dsp_code,
>
> if ((header.version >> 9) != (HPI_VER >> 9)) {
> /* Consider even and subsequent odd minor versions to be compatible */
> - dev_printk(KERN_ERR, &dev->dev,
> - "Incompatible firmware version "
> - "DSP image %X != Driver %X\n", header.version,
> - HPI_VER);
> + dev_err(&dev->dev, "Incompatible firmware version DSP image %X != Driver %X\n",
> + header.version, HPI_VER);
> goto error2;
> }
>
> if (header.version != HPI_VER) {
> - dev_printk(KERN_INFO, &dev->dev,
> - "Firmware: release version mismatch DSP image %X != Driver %X\n",
> - header.version, HPI_VER);
> + dev_info(&dev->dev,
> + "Firmware: release version mismatch DSP image %X != Driver %X\n",
> + header.version, HPI_VER);
> }
>
> HPI_DEBUG_LOG(DEBUG, "dsp code %s opened\n", fw_name);
> diff --git a/sound/pci/asihpi/hpioctl.c b/sound/pci/asihpi/hpioctl.c
> index 6091562..8f96749 100644
> --- a/sound/pci/asihpi/hpioctl.c
> +++ b/sound/pci/asihpi/hpioctl.c
> @@ -326,7 +326,7 @@ int __devinit asihpi_adapter_probe(struct pci_dev *pci_dev,
> pci_dev->subsystem_device, pci_dev->devfn);
>
> if (pci_enable_device(pci_dev) < 0) {
> - dev_printk(KERN_ERR, &pci_dev->dev,
> + dev_err(&pci_dev->dev,
> "pci_enable_device failed, disabling device\n");
> return -EIO;
> }
> @@ -398,9 +398,8 @@ int __devinit asihpi_adapter_probe(struct pci_dev *pci_dev,
> mutex_init(&adapters[adapter_index].mutex);
> pci_set_drvdata(pci_dev, &adapters[adapter_index]);
>
> - dev_printk(KERN_INFO, &pci_dev->dev,
> - "probe succeeded for ASI%04X HPI index %d\n",
> - adapter.adapter->type, adapter_index);
> + dev_info(&pci_dev->dev, "probe succeeded for ASI%04X HPI index %d\n",
> + adapter.adapter->type, adapter_index);
>
> return 0;
>
> @@ -448,11 +447,11 @@ void __devexit asihpi_adapter_remove(struct pci_dev *pci_dev)
>
> pci_set_drvdata(pci_dev, NULL);
> if (1)
> - dev_printk(KERN_INFO, &pci_dev->dev,
> - "remove %04x:%04x,%04x:%04x,%04x," " HPI index %d.\n",
> - pci_dev->vendor, pci_dev->device,
> - pci_dev->subsystem_vendor, pci_dev->subsystem_device,
> - pci_dev->devfn, pa->adapter->index);
> + dev_info(&pci_dev->dev,
> + "remove %04x:%04x,%04x:%04x,%04x, HPI index %d\n",
> + pci_dev->vendor, pci_dev->device,
> + pci_dev->subsystem_vendor, pci_dev->subsystem_device,
> + pci_dev->devfn, pa->adapter->index);
>
> memset(pa, 0, sizeof(*pa));
> }
> --
> 1.7.8.112.g3fd21
>

2012-10-28 10:55:18

by Sergei Shtylyov

[permalink] [raw]
Subject: Re: [PATCH 00/16] treewide: Convert dev_printk(KERN_<LEVEL> to dev_<level>(

Hello.

On 28-10-2012 12:05, Joe Perches wrote:

> dev_<level> create smaller objects than dev_printk(KERN_<LEVEL>.
> Convert non-debug calls to this form.

> Joe Perches (16):
> tile: Convert dev_printk(KERN_<LEVEL> to dev_<level>(
[...]
> tile: Convert dev_printk(KERN_<LEVEL> to dev_<level>(
[...]
> tile: Convert dev_printk(KERN_<LEVEL> to dev_<level>(

Hm, somehow this patch is repeated thrice?

MBR, Sergei

2012-10-28 11:45:21

by Jean Delvare

[permalink] [raw]
Subject: Re: [PATCH 08/16] i2c: Convert dev_printk(KERN_<LEVEL> to dev_<level>(

Hi Joe,

On Sun, 28 Oct 2012 01:05:46 -0700, Joe Perches wrote:
> dev_<level> calls take less code than dev_printk(KERN_<LEVEL>
> and reducing object size is good.
> Coalesce formats for easier grep.
>
> Signed-off-by: Joe Perches <[email protected]>
> ---
> drivers/i2c/busses/i2c-piix4.c | 5 ++---
> 1 files changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/i2c/busses/i2c-piix4.c b/drivers/i2c/busses/i2c-piix4.c
> index 8bbd6ec..f7216ed 100644
> --- a/drivers/i2c/busses/i2c-piix4.c
> +++ b/drivers/i2c/busses/i2c-piix4.c
> @@ -204,9 +204,8 @@ static int __devinit piix4_setup(struct pci_dev *PIIX4_dev,
> */
> pci_write_config_byte(PIIX4_dev, SMBHSTCFG,
> temp | 1);
> - dev_printk(KERN_NOTICE, &PIIX4_dev->dev,
> - "WARNING: SMBus interface has been "
> - "FORCEFULLY ENABLED!\n");
> + dev_notice(&PIIX4_dev->dev,
> + "WARNING: SMBus interface has been FORCEFULLY ENABLED!\n");
> } else {
> dev_err(&PIIX4_dev->dev,
> "Host SMBus controller not enabled!\n");

Applied, thanks.

--
Jean Delvare

2012-10-28 12:26:29

by Joe Perches

[permalink] [raw]
Subject: Re: [PATCH 00/16] treewide: Convert dev_printk(KERN_<LEVEL> to dev_<level>(

On Sun, 2012-10-28 at 14:54 +0400, Sergei Shtylyov wrote:
> Hello.

Hi Sergei.

> On 28-10-2012 12:05, Joe Perches wrote:
>
> > dev_<level> create smaller objects than dev_printk(KERN_<LEVEL>.
> > Convert non-debug calls to this form.
>
> > Joe Perches (16):
> > tile: Convert dev_printk(KERN_<LEVEL> to dev_<level>(
> [...]
> > tile: Convert dev_printk(KERN_<LEVEL> to dev_<level>(
> [...]
> > tile: Convert dev_printk(KERN_<LEVEL> to dev_<level>(
>
> Hm, somehow this patch is repeated thrice?

Nope, I forgot to edit the 0000 file after I edited
patches locally when I noticed I forgot to update
the subject lines. Patches are corrected, 0000 not.

I don't think it's a bit deal, I could repost just the 0000
if you want though.

cheers, Joe


2012-10-28 12:54:48

by Chris Metcalf

[permalink] [raw]
Subject: Re: [PATCH 01/16] tile: Convert dev_printk(KERN_<LEVEL> to dev_<level>(

On 10/28/2012 4:05 AM, Joe Perches wrote:
> dev_<level> calls take less code than dev_printk(KERN_<LEVEL>
> and reducing object size is good.
> Coalesce formats for easier grep.
>
> Signed-off-by: Joe Perches <[email protected]>
> ---
> arch/tile/kernel/pci_gx.c | 15 ++++++---------
> 1 files changed, 6 insertions(+), 9 deletions(-)

Acked-by: Chris Metcalf <[email protected]>

--
Chris Metcalf, Tilera Corp.
http://www.tilera.com

2012-10-29 06:07:56

by Vinod Koul

[permalink] [raw]
Subject: Re: [PATCH 06/16] dma: Convert dev_printk(KERN_<LEVEL> to dev_<level>(

On Sun, 2012-10-28 at 01:05 -0700, Joe Perches wrote:
> dev_<level> calls take less code than dev_printk(KERN_<LEVEL>
> and reducing object size is good.
> Coalesce formats for easier grep.

Applied thanks

--
Vinod Koul
Intel Corp.

2012-11-01 01:01:57

by Rusty Russell

[permalink] [raw]
Subject: Re: [PATCH 14/16] virtio: Convert dev_printk(KERN_<LEVEL> to dev_<level>(

Joe Perches <[email protected]> writes:

> dev_<level> calls take less code than dev_printk(KERN_<LEVEL>
> and reducing object size is good.
> Convert if (printk_ratelimit()) dev_printk to dev_<level>_ratelimited.
>
> Signed-off-by: Joe Perches <[email protected]>

Applied.

Thanks,
Rusty.

2012-11-03 02:00:37

by David Miller

[permalink] [raw]
Subject: Re: [PATCH 10/16] ethernet: Convert dev_printk(KERN_<LEVEL> to dev_<level>(

From: Joe Perches <[email protected]>
Date: Sun, 28 Oct 2012 01:05:48 -0700

> dev_<level> calls take less code than dev_printk(KERN_<LEVEL>
> and reducing object size is good.
> Coalesce formats for easier grep.
>
> Signed-off-by: Joe Perches <[email protected]>

I forgot the other day so indicate that I applied this to
net-next, thanks.

2012-11-05 22:28:42

by Bjorn Helgaas

[permalink] [raw]
Subject: Re: [PATCH 11/16] pci: Convert dev_printk(KERN_<LEVEL> to dev_<level>(

On Sun, Oct 28, 2012 at 2:05 AM, Joe Perches <[email protected]> wrote:
> dev_<level> calls take less code than dev_printk(KERN_<LEVEL>
> and reducing object size is good.
> Coalesce formats for easier grep.
>
> Signed-off-by: Joe Perches <[email protected]>

I applied this to my pci/misc branch as v3.8 material. Thanks!

> ---
> drivers/pci/irq.c | 10 +++++-----
> drivers/pci/pci-stub.c | 2 +-
> drivers/pci/pcie/aspm.c | 7 ++-----
> 3 files changed, 8 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/pci/irq.c b/drivers/pci/irq.c
> index e5f69a4..b008cf8 100644
> --- a/drivers/pci/irq.c
> +++ b/drivers/pci/irq.c
> @@ -14,11 +14,11 @@ static void pci_note_irq_problem(struct pci_dev *pdev, const char *reason)
> {
> struct pci_dev *parent = to_pci_dev(pdev->dev.parent);
>
> - dev_printk(KERN_ERR, &pdev->dev,
> - "Potentially misrouted IRQ (Bridge %s %04x:%04x)\n",
> - dev_name(&parent->dev), parent->vendor, parent->device);
> - dev_printk(KERN_ERR, &pdev->dev, "%s\n", reason);
> - dev_printk(KERN_ERR, &pdev->dev, "Please report to [email protected]\n");
> + dev_err(&pdev->dev,
> + "Potentially misrouted IRQ (Bridge %s %04x:%04x)\n",
> + dev_name(&parent->dev), parent->vendor, parent->device);
> + dev_err(&pdev->dev, "%s\n", reason);
> + dev_err(&pdev->dev, "Please report to [email protected]\n");
> WARN_ON(1);
> }
>
> diff --git a/drivers/pci/pci-stub.c b/drivers/pci/pci-stub.c
> index 775e933..6e47c51 100644
> --- a/drivers/pci/pci-stub.c
> +++ b/drivers/pci/pci-stub.c
> @@ -28,7 +28,7 @@ MODULE_PARM_DESC(ids, "Initial PCI IDs to add to the stub driver, format is "
>
> static int pci_stub_probe(struct pci_dev *dev, const struct pci_device_id *id)
> {
> - dev_printk(KERN_INFO, &dev->dev, "claimed by stub\n");
> + dev_info(&dev->dev, "claimed by stub\n");
> return 0;
> }
>
> diff --git a/drivers/pci/pcie/aspm.c b/drivers/pci/pcie/aspm.c
> index 213753b..3da9ecc 100644
> --- a/drivers/pci/pcie/aspm.c
> +++ b/drivers/pci/pcie/aspm.c
> @@ -242,8 +242,7 @@ static void pcie_aspm_configure_common_clock(struct pcie_link_state *link)
> return;
>
> /* Training failed. Restore common clock configurations */
> - dev_printk(KERN_ERR, &parent->dev,
> - "ASPM: Could not configure common clock\n");
> + dev_err(&parent->dev, "ASPM: Could not configure common clock\n");
> list_for_each_entry(child, &linkbus->devices, bus_list)
> pcie_capability_write_word(child, PCI_EXP_LNKCTL,
> child_reg[PCI_FUNC(child->devfn)]);
> @@ -507,9 +506,7 @@ static int pcie_aspm_sanity_check(struct pci_dev *pdev)
> */
> pcie_capability_read_dword(child, PCI_EXP_DEVCAP, &reg32);
> if (!(reg32 & PCI_EXP_DEVCAP_RBER) && !aspm_force) {
> - dev_printk(KERN_INFO, &child->dev, "disabling ASPM"
> - " on pre-1.1 PCIe device. You can enable it"
> - " with 'pcie_aspm=force'\n");
> + dev_info(&child->dev, "disabling ASPM on pre-1.1 PCIe device. You can enable it with 'pcie_aspm=force'\n");
> return -EINVAL;
> }
> }
> --
> 1.7.8.112.g3fd21
>

2012-11-28 17:43:03

by Jeff Garzik

[permalink] [raw]
Subject: Re: [PATCH 02/16] ata: Convert dev_printk(KERN_<LEVEL> to dev_<level>(

On 10/28/2012 04:05 AM, Joe Perches wrote:
> dev_<level> calls take less code than dev_printk(KERN_<LEVEL>
> and reducing object size is good.
> Coalesce formats for easier grep.
>
> Signed-off-by: Joe Perches <[email protected]>
> ---
> drivers/ata/pata_cmd64x.c | 6 +++---
> 1 files changed, 3 insertions(+), 3 deletions(-)

applied