All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hannes Reinecke <hare@suse.de>
To: Jens Axboe <axboe@kernel.dk>
Cc: Tejun Heo <tj@kernel.org>,
	Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
	linux-ide@vger.kernel.org, Hannes Reinecke <hare@suse.de>
Subject: [PATCH 05/40] libata: move __func__ into ata_{port,link,dev}_dbg() helper
Date: Tue,  3 Mar 2020 10:37:38 +0100	[thread overview]
Message-ID: <20200303093813.18523-6-hare@suse.de> (raw)
In-Reply-To: <20200303093813.18523-1-hare@suse.de>

Move the __func__ argument into the ata_{port,link,dev}_dbg()
helper and drop the explicit argument from the caller.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
---
 drivers/ata/libata-acpi.c | 14 ++++++--------
 drivers/ata/libata-core.c |  9 ++++-----
 drivers/ata/libata-sff.c  |  2 +-
 include/linux/libata.h    |  6 +++---
 4 files changed, 14 insertions(+), 17 deletions(-)

diff --git a/drivers/ata/libata-acpi.c b/drivers/ata/libata-acpi.c
index 9a7c25252e50..d5bcf5718fd3 100644
--- a/drivers/ata/libata-acpi.c
+++ b/drivers/ata/libata-acpi.c
@@ -419,8 +419,7 @@ static int ata_dev_get_GTF(struct ata_device *dev, struct ata_acpi_gtf **gtf)
 	output.pointer = NULL;	/* ACPI-CA sets this; save/free it later */
 
 	if (ata_msg_probe(ap))
-		ata_dev_dbg(dev, "%s: ENTER: port#: %d\n",
-			    __func__, ap->port_no);
+		ata_dev_dbg(dev, "ENTER: port#: %d\n", ap->port_no);
 
 	/* _GTF has no input parameters */
 	status = acpi_evaluate_object(ata_dev_acpi_handle(dev), "_GTF", NULL,
@@ -438,8 +437,7 @@ static int ata_dev_get_GTF(struct ata_device *dev, struct ata_acpi_gtf **gtf)
 
 	if (!output.length || !output.pointer) {
 		if (ata_msg_probe(ap))
-			ata_dev_dbg(dev, "%s: Run _GTF: length or ptr is NULL (0x%llx, 0x%p)\n",
-				    __func__,
+			ata_dev_dbg(dev, "Run _GTF: length or ptr is NULL (0x%llx, 0x%p)\n",
 				    (unsigned long long)output.length,
 				    output.pointer);
 		rc = -EINVAL;
@@ -465,8 +463,8 @@ static int ata_dev_get_GTF(struct ata_device *dev, struct ata_acpi_gtf **gtf)
 	if (gtf) {
 		*gtf = (void *)out_obj->buffer.pointer;
 		if (ata_msg_probe(ap))
-			ata_dev_dbg(dev, "%s: returning gtf=%p, gtf_count=%d\n",
-				    __func__, *gtf, rc);
+			ata_dev_dbg(dev, "returning gtf=%p, gtf_count=%d\n",
+				    *gtf, rc);
 	}
 	return rc;
 
@@ -780,8 +778,8 @@ static int ata_acpi_push_id(struct ata_device *dev)
 	union acpi_object in_params[1];
 
 	if (ata_msg_probe(ap))
-		ata_dev_dbg(dev, "%s: ix = %d, port#: %d\n",
-			    __func__, dev->devno, ap->port_no);
+		ata_dev_dbg(dev, "ix = %d, port#: %d\n",
+			    dev->devno, ap->port_no);
 
 	/* Give the drive Identify data to the drive via the _SDD method */
 	/* _SDD: set up input parameters */
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 5bf6e4da218a..3a8af0fef540 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -1846,7 +1846,7 @@ int ata_dev_read_id(struct ata_device *dev, unsigned int *p_class,
 	int rc;
 
 	if (ata_msg_ctl(ap))
-		ata_dev_dbg(dev, "%s: ENTER\n", __func__);
+		ata_dev_dbg(dev, "ENTER\n");
 
 retry:
 	ata_tf_init(dev, &tf);
@@ -2447,7 +2447,7 @@ int ata_dev_configure(struct ata_device *dev)
 	}
 
 	if (ata_msg_probe(ap))
-		ata_dev_dbg(dev, "%s: ENTER\n", __func__);
+		ata_dev_dbg(dev, "ENTER\n");
 
 	/* set horkage */
 	dev->horkage |= ata_dev_blacklisted(dev);
@@ -2498,9 +2498,8 @@ int ata_dev_configure(struct ata_device *dev)
 	/* print device capabilities */
 	if (ata_msg_probe(ap))
 		ata_dev_dbg(dev,
-			    "%s: cfg 49:%04x 82:%04x 83:%04x 84:%04x "
+			    "cfg 49:%04x 82:%04x 83:%04x 84:%04x "
 			    "85:%04x 86:%04x 87:%04x 88:%04x\n",
-			    __func__,
 			    id[49], id[82], id[83], id[84],
 			    id[85], id[86], id[87], id[88]);
 
@@ -2767,7 +2766,7 @@ int ata_dev_configure(struct ata_device *dev)
 
 err_out_nosup:
 	if (ata_msg_probe(ap))
-		ata_dev_dbg(dev, "%s: EXIT, err\n", __func__);
+		ata_dev_dbg(dev, "EXIT, err\n");
 	return rc;
 }
 
diff --git a/drivers/ata/libata-sff.c b/drivers/ata/libata-sff.c
index 038db94216a9..277398427e4e 100644
--- a/drivers/ata/libata-sff.c
+++ b/drivers/ata/libata-sff.c
@@ -1266,7 +1266,7 @@ void ata_sff_flush_pio_task(struct ata_port *ap)
 	ap->sff_pio_task_link = NULL;
 
 	if (ata_msg_ctl(ap))
-		ata_port_dbg(ap, "%s: EXIT\n", __func__);
+		ata_port_dbg(ap, "EXIT\n");
 }
 
 static void ata_sff_pio_task(struct work_struct *work)
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 6b1ffb78a410..508f501095c9 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -1424,7 +1424,7 @@ static inline int sata_srst_pmp(struct ata_link *link)
 #define ata_port_info(ap, fmt, ...)				\
 	dev_info(&ap->tdev, fmt, ##__VA_ARGS__)
 #define ata_port_dbg(ap, fmt, ...)				\
-	dev_dbg(&ap->tdev, fmt, ##__VA_ARGS__)
+	dev_dbg(&ap->tdev, "%s: " fmt, __func__, ##__VA_ARGS__)
 
 #define ata_link_err(link, fmt, ...)				\
 	dev_err(&link->tdev, fmt, ##__VA_ARGS__)
@@ -1435,7 +1435,7 @@ static inline int sata_srst_pmp(struct ata_link *link)
 #define ata_link_info(link, fmt, ...)				\
 	dev_info(&link->tdev, fmt, ##__VA_ARGS__)
 #define ata_link_dbg(link, fmt, ...)				\
-	dev_dbg(&link->tdev, fmt, ##__VA_ARGS__)
+	dev_dbg(&link->tdev, "%s: " fmt, __func__, ##__VA_ARGS__)
 
 #define ata_dev_err(dev, fmt, ...)				\
 	dev_err(&dev->tdev, fmt, ##__VA_ARGS__)
@@ -1446,7 +1446,7 @@ static inline int sata_srst_pmp(struct ata_link *link)
 #define ata_dev_info(dev, fmt, ...)				\
 	dev_info(&dev->tdev, fmt, ##__VA_ARGS__)
 #define ata_dev_dbg(dev, fmt, ...)				\
-	dev_dbg(&dev->tdev, fmt, ##__VA_ARGS__)
+	dev_dbg(&dev->tdev, "%s: " fmt, __func__, ##__VA_ARGS__)
 
 void ata_print_version(const struct device *dev, const char *version);
 
-- 
2.16.4


  parent reply	other threads:[~2020-03-03  9:39 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-03  9:37 [PATCHv3 00/40] ata: kill ATA_DEBUG Hannes Reinecke
2020-03-03  9:37 ` [PATCH 01/40] libata: drop BPRINTK() Hannes Reinecke
2020-03-03  9:37 ` [PATCH 02/40] libata.h: whitespace and indentation fixes Hannes Reinecke
2020-03-03  9:37 ` [PATCH 03/40] libata-transport: Whitespace cleanup Hannes Reinecke
2020-03-03  9:37 ` [PATCH 04/40] libata: move ata_{port,link,dev}_dbg to standard dev_XXX() macros Hannes Reinecke
2020-03-24 13:26   ` Geert Uytterhoeven
2020-03-25 14:56     ` Bartlomiej Zolnierkiewicz
2020-03-25 15:34       ` Geert Uytterhoeven
2020-03-25 15:45         ` Bartlomiej Zolnierkiewicz
2020-03-25 16:54           ` Hannes Reinecke
2020-03-03  9:37 ` Hannes Reinecke [this message]
2020-03-03  9:37 ` [PATCH 06/40] libata: remove pointless debugging messages Hannes Reinecke
2020-03-03  9:37 ` [PATCH 07/40] ata_piix: remove " Hannes Reinecke
2020-03-03  9:37 ` [PATCH 08/40] libata-core: remove pointless " Hannes Reinecke
2020-03-03  9:37 ` [PATCH 09/40] libata: Add ata_port_classify() helper Hannes Reinecke
2020-03-03  9:37 ` [PATCH 10/40] libata: move ata_dump_id() to dynamic debugging Hannes Reinecke
2020-03-03  9:37 ` [PATCH 11/40] libata: sanitize ATA_HORKAGE_DUMP_ID Hannes Reinecke
2020-03-03  9:37 ` [PATCH 12/40] sata_mv: replace DPRINTK with 'pci_dump' module parameter Hannes Reinecke
2020-03-03  9:37 ` [PATCH 13/40] sata_mv: kill 'port' argument in mv_dump_all_regs() Hannes Reinecke
2020-03-03  9:37 ` [PATCH 14/40] sata_sx4: move DPRINTK to VPRINTK Hannes Reinecke
2020-03-03  9:37 ` [PATCH 15/40] libata: add reset tracepoints Hannes Reinecke
2020-03-03  9:37 ` [PATCH 16/40] libata: drop DPRINTK() calls in reset Hannes Reinecke
2020-03-03  9:37 ` [PATCH 17/40] libata: tracepoints for bus-master DMA Hannes Reinecke
2020-03-03  9:37 ` [PATCH 18/40] libata: drop debugging statements " Hannes Reinecke
2020-03-03  9:37 ` [PATCH 19/40] pata_octeon_cf: add bmdma tracepoints and drop DPRINTK() calls Hannes Reinecke
2020-03-03  9:37 ` [PATCH 20/40] pata_arasan_cf: use generic tracepoints Hannes Reinecke
2020-03-03  9:37 ` [PATCH 21/40] sata_dwc_460ex: " Hannes Reinecke
2020-03-06  5:49   ` kbuild test robot
2020-03-03  9:37 ` [PATCH 22/40] sata_nv: " Hannes Reinecke
2020-03-03  9:37 ` [PATCH 23/40] libata-sff: tracepoints for HSM state machine Hannes Reinecke
2020-03-03  9:37 ` [PATCH 24/40] libata-sff: add tracepoints for ata_sff_flush_pio_task() Hannes Reinecke
2020-03-03  9:37 ` [PATCH 25/40] libata-scsi: drop DPRINTK calls for cdb translation Hannes Reinecke
2020-03-03  9:37 ` [PATCH 26/40] libata: add tracepoints for ATA error handling Hannes Reinecke
2020-03-03  9:38 ` [PATCH 27/40] libata: drop DPRINTK() calls during " Hannes Reinecke
2020-03-03  9:38 ` [PATCH 28/40] libata-eh: remove DPRINTK() calls for request sense Hannes Reinecke
2020-03-03  9:38 ` [PATCH 29/40] pata_octeon_cf: move DPRINTK to VPRINTK Hannes Reinecke
2020-03-03  9:38 ` [PATCH 30/40] pdc_adma: " Hannes Reinecke
2020-03-03  9:38 ` [PATCH 31/40] sata_rcar: " Hannes Reinecke
2020-03-03  9:38 ` [PATCH 32/40] sata_qstor: " Hannes Reinecke
2020-03-03  9:38 ` [PATCH 33/40] pata_pdc2027x: Replace PDPRINTK() with standard ata logging Hannes Reinecke
2020-03-03  9:38 ` [PATCH 34/40] sata_nv: move DPRINTK to ata debugging Hannes Reinecke
2020-03-03  9:38 ` [PATCH 35/40] sata_fsl: " Hannes Reinecke
2020-03-13 14:43   ` Guenter Roeck
2020-03-03  9:38 ` [PATCH 36/40] libata-core: " Hannes Reinecke
2020-03-03  9:38 ` [PATCH 37/40] libata: remove DPRINTK() macro Hannes Reinecke
2020-03-03  9:38 ` [PATCH 38/40] libata: kill ATA_MSG_INFO Hannes Reinecke
2020-03-03  9:38 ` [PATCH 39/40] libata: kill ATA_MSG_CTL Hannes Reinecke
2020-03-03  9:38 ` [PATCH 40/40] libata: remove references to ATA_DEBUG Hannes Reinecke
2020-03-12 14:04 ` [PATCHv3 00/40] ata: kill ATA_DEBUG Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200303093813.18523-6-hare@suse.de \
    --to=hare@suse.de \
    --cc=axboe@kernel.dk \
    --cc=b.zolnierkie@samsung.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=tj@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.