Commit f06c13aa authored by Hannes Reinecke's avatar Hannes Reinecke Committed by Damien Le Moal

ata: pata_hpt37x: convert pr_XXX() calls

Convert pr_XXX() calls to structured logging.
Signed-off-by: default avatarHannes Reinecke <hare@suse.de>
Signed-off-by: default avatarDamien Le Moal <damien.lemoal@opensource.wdc.com>
parent f76ba003
...@@ -14,9 +14,6 @@ ...@@ -14,9 +14,6 @@
* TODO * TODO
* Look into engine reset on timeout errors. Should not be required. * Look into engine reset on timeout errors. Should not be required.
*/ */
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/pci.h> #include <linux/pci.h>
...@@ -231,7 +228,8 @@ static int hpt_dma_blacklisted(const struct ata_device *dev, char *modestr, ...@@ -231,7 +228,8 @@ static int hpt_dma_blacklisted(const struct ata_device *dev, char *modestr,
i = match_string(list, -1, model_num); i = match_string(list, -1, model_num);
if (i >= 0) { if (i >= 0) {
pr_warn("%s is not supported for %s\n", modestr, list[i]); ata_dev_warn(dev, "%s is not supported for %s\n",
modestr, list[i]);
return 1; return 1;
} }
return 0; return 0;
...@@ -864,7 +862,8 @@ static int hpt37x_init_one(struct pci_dev *dev, const struct pci_device_id *id) ...@@ -864,7 +862,8 @@ static int hpt37x_init_one(struct pci_dev *dev, const struct pci_device_id *id)
chip_table = &hpt372; chip_table = &hpt372;
break; break;
default: default:
pr_err("Unknown HPT366 subtype, please report (%d)\n", dev_err(&dev->dev,
"Unknown HPT366 subtype, please report (%d)\n",
rev); rev);
return -ENODEV; return -ENODEV;
} }
...@@ -905,7 +904,8 @@ static int hpt37x_init_one(struct pci_dev *dev, const struct pci_device_id *id) ...@@ -905,7 +904,8 @@ static int hpt37x_init_one(struct pci_dev *dev, const struct pci_device_id *id)
*ppi = &info_hpt374_fn1; *ppi = &info_hpt374_fn1;
break; break;
default: default:
pr_err("PCI table is bogus, please report (%d)\n", dev->device); dev_err(&dev->dev, "PCI table is bogus, please report (%d)\n",
dev->device);
return -ENODEV; return -ENODEV;
} }
/* Ok so this is a chip we support */ /* Ok so this is a chip we support */
...@@ -953,7 +953,7 @@ static int hpt37x_init_one(struct pci_dev *dev, const struct pci_device_id *id) ...@@ -953,7 +953,7 @@ static int hpt37x_init_one(struct pci_dev *dev, const struct pci_device_id *id)
u8 sr; u8 sr;
u32 total = 0; u32 total = 0;
pr_warn("BIOS has not set timing clocks\n"); dev_warn(&dev->dev, "BIOS has not set timing clocks\n");
/* This is the process the HPT371 BIOS is reported to use */ /* This is the process the HPT371 BIOS is reported to use */
for (i = 0; i < 128; i++) { for (i = 0; i < 128; i++) {
...@@ -1009,7 +1009,7 @@ static int hpt37x_init_one(struct pci_dev *dev, const struct pci_device_id *id) ...@@ -1009,7 +1009,7 @@ static int hpt37x_init_one(struct pci_dev *dev, const struct pci_device_id *id)
(f_high << 16) | f_low | 0x100); (f_high << 16) | f_low | 0x100);
} }
if (adjust == 8) { if (adjust == 8) {
pr_err("DPLL did not stabilize!\n"); dev_err(&dev->dev, "DPLL did not stabilize!\n");
return -ENODEV; return -ENODEV;
} }
if (dpll == 3) if (dpll == 3)
...@@ -1017,7 +1017,7 @@ static int hpt37x_init_one(struct pci_dev *dev, const struct pci_device_id *id) ...@@ -1017,7 +1017,7 @@ static int hpt37x_init_one(struct pci_dev *dev, const struct pci_device_id *id)
else else
private_data = (void *)hpt37x_timings_50; private_data = (void *)hpt37x_timings_50;
pr_info("bus clock %dMHz, using %dMHz DPLL\n", dev_info(&dev->dev, "bus clock %dMHz, using %dMHz DPLL\n",
MHz[clock_slot], MHz[dpll]); MHz[clock_slot], MHz[dpll]);
} else { } else {
private_data = (void *)chip_table->clocks[clock_slot]; private_data = (void *)chip_table->clocks[clock_slot];
...@@ -1032,7 +1032,7 @@ static int hpt37x_init_one(struct pci_dev *dev, const struct pci_device_id *id) ...@@ -1032,7 +1032,7 @@ static int hpt37x_init_one(struct pci_dev *dev, const struct pci_device_id *id)
if (clock_slot < 2 && ppi[0] == &info_hpt370a) if (clock_slot < 2 && ppi[0] == &info_hpt370a)
ppi[0] = &info_hpt370a_33; ppi[0] = &info_hpt370a_33;
pr_info("%s using %dMHz bus clock\n", dev_info(&dev->dev, "%s using %dMHz bus clock\n",
chip_table->name, MHz[clock_slot]); chip_table->name, MHz[clock_slot]);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment