Re: [PATCH 20/24] pata_pdc202xx_old: move DPRINTK to ata debugging

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 12/14/18 9:15 AM, Sergei Shtylyov wrote:
Hello!

On 13.12.2018 13:47, Hannes Reinecke wrote:

Replace all DPRINTK calls with the ata_XXX_dbg functions.

Signed-off-by: Hannes Reinecke <hare@xxxxxxxx>
---
  drivers/ata/pata_pdc202xx_old.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/ata/pata_pdc202xx_old.c b/drivers/ata/pata_pdc202xx_old.c
index 9001991d2830..6d52b1bb1b9e 100644
--- a/drivers/ata/pata_pdc202xx_old.c
+++ b/drivers/ata/pata_pdc202xx_old.c
@@ -37,7 +37,7 @@ static int pdc2026x_cable_detect(struct ata_port *ap)
  static void pdc202xx_exec_command(struct ata_port *ap,
                    const struct ata_taskfile *tf)
  {
-    DPRINTK("ata%u: cmd 0x%X\n", ap->print_id, tf->command);
+    ata_port_dbg(ap, "ata%u: cmd 0x%X\n", ap->print_id, tf->command);

    Mhm, you remove printing of ap->print_id in the other patches...

[...]

MBR, Sergei

Correct.

dev_dbg (and, by inference, ata_port_dbg()) does it for you as it grabs the device name.
Which is formatted using 'ap->print_id' :

int ata_tport_add(struct device *parent,
		  struct ata_port *ap)
{
	int error;
	struct device *dev = &ap->tdev;

	device_initialize(dev);
	dev->type = &ata_port_type;

	dev->parent = parent;
	ata_host_get(ap->host);
	dev->release = ata_tport_release;
	dev_set_name(dev, "ata%d", ap->print_id);
	transport_setup_device(dev);
	ata_acpi_bind_port(ap);

Cheers,

Hannes
--
Dr. Hannes Reinecke		               zSeries & Storage
hare@xxxxxxxx			               +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)



[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux