Re: [PATCH 05/42] libata: move __func__ into ata_{port,link,dev}_dbg() helper

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

 



On 2/13/20 10:53 AM, Hannes Reinecke wrote:
> 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@xxxxxxx>

Reviewed-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@xxxxxxxxxxx>

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics

> ---
>  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);
>  




[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