Message ID | 20211208163255.114660-71-hare@suse.de |
---|---|
State | New |
Headers | show |
Series | libata: rework logging, take II | expand |
On 2021/12/09 1:32, Hannes Reinecke wrote: > Convert pr_XXX() calls to structured logging. > > Signed-off-by: Hannes Reinecke <hare@suse.de> > --- > drivers/ata/pata_hpt3x2n.c | 11 +++++------ > 1 file changed, 5 insertions(+), 6 deletions(-) > > diff --git a/drivers/ata/pata_hpt3x2n.c b/drivers/ata/pata_hpt3x2n.c > index 48eef338e050..60e7d71328f6 100644 > --- a/drivers/ata/pata_hpt3x2n.c > +++ b/drivers/ata/pata_hpt3x2n.c > @@ -16,8 +16,6 @@ > * Work out best PLL policy > */ > Remove this blank line too ? > -#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt > - > #include <linux/kernel.h> > #include <linux/module.h> > #include <linux/pci.h> > @@ -420,7 +418,7 @@ static int hpt3x2n_pci_clock(struct pci_dev *pdev) > u16 sr; > u32 total = 0; > > - pr_warn("BIOS clock data not set\n"); > + dev_warn(&pdev->dev, "BIOS clock data not set\n"); > > /* This is the process the HPT371 BIOS is reported to use */ > for (i = 0; i < 128; i++) { > @@ -530,7 +528,8 @@ static int hpt3x2n_init_one(struct pci_dev *dev, const struct pci_device_id *id) > ppi[0] = &info_hpt372n; > break; > 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; > } > > @@ -579,11 +578,11 @@ static int hpt3x2n_init_one(struct pci_dev *dev, const struct pci_device_id *id) > pci_write_config_dword(dev, 0x5C, (f_high << 16) | f_low); > } > if (adjust == 8) { > - pr_err("DPLL did not stabilize!\n"); > + dev_err(&dev->dev, "DPLL did not stabilize!\n"); > return -ENODEV; > } > > - pr_info("bus clock %dMHz, using 66MHz DPLL\n", pci_mhz); > + dev_info(&dev->dev, "bus clock %dMHz, using 66MHz DPLL\n", pci_mhz); > > /* > * Set our private data up. We only need a few flags >
diff --git a/drivers/ata/pata_hpt3x2n.c b/drivers/ata/pata_hpt3x2n.c index 48eef338e050..60e7d71328f6 100644 --- a/drivers/ata/pata_hpt3x2n.c +++ b/drivers/ata/pata_hpt3x2n.c @@ -16,8 +16,6 @@ * Work out best PLL policy */ -#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt - #include <linux/kernel.h> #include <linux/module.h> #include <linux/pci.h> @@ -420,7 +418,7 @@ static int hpt3x2n_pci_clock(struct pci_dev *pdev) u16 sr; u32 total = 0; - pr_warn("BIOS clock data not set\n"); + dev_warn(&pdev->dev, "BIOS clock data not set\n"); /* This is the process the HPT371 BIOS is reported to use */ for (i = 0; i < 128; i++) { @@ -530,7 +528,8 @@ static int hpt3x2n_init_one(struct pci_dev *dev, const struct pci_device_id *id) ppi[0] = &info_hpt372n; break; 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; } @@ -579,11 +578,11 @@ static int hpt3x2n_init_one(struct pci_dev *dev, const struct pci_device_id *id) pci_write_config_dword(dev, 0x5C, (f_high << 16) | f_low); } if (adjust == 8) { - pr_err("DPLL did not stabilize!\n"); + dev_err(&dev->dev, "DPLL did not stabilize!\n"); return -ENODEV; } - pr_info("bus clock %dMHz, using 66MHz DPLL\n", pci_mhz); + dev_info(&dev->dev, "bus clock %dMHz, using 66MHz DPLL\n", pci_mhz); /* * Set our private data up. We only need a few flags
Convert pr_XXX() calls to structured logging. Signed-off-by: Hannes Reinecke <hare@suse.de> --- drivers/ata/pata_hpt3x2n.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-)