Re: [PATCH 19/24] libata: Use ata_port_printk() in ata_dump_id()

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

 



On 12/13/18 11:47 AM, Hannes Reinecke wrote:
> Use ata_port_printk() in ata_dump_id(), dropping DPRINTK usage there.

Wouldn't it be better to pass and use 'dev' instead of 'ap'
(the function prints device's id block)?

Why does it convert DPRINTK() to ata_port_printk() and not dev_dbg()?

Also please preserve __func__ printing in the conversion.

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

> Signed-off-by: Hannes Reinecke <hare@xxxxxxxx>
> ---
>  drivers/ata/libata-core.c | 13 ++++++++-----
>  1 file changed, 8 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
> index a36f24de399b..914520254215 100644
> --- a/drivers/ata/libata-core.c
> +++ b/drivers/ata/libata-core.c
> @@ -1438,9 +1438,10 @@ static int ata_hpa_resize(struct ata_device *dev)
>   *	caller.
>   */
>  
> -static inline void ata_dump_id(const u16 *id)
> +static inline void ata_dump_id(struct ata_port *ap, const u16 *id)
>  {
> -	DPRINTK("49==0x%04x  "
> +	ata_port_printk(ap, KERN_DEBUG,
> +		"49==0x%04x  "
>  		"53==0x%04x  "
>  		"63==0x%04x  "
>  		"64==0x%04x  "
> @@ -1450,7 +1451,8 @@ static inline void ata_dump_id(const u16 *id)
>  		id[63],
>  		id[64],
>  		id[75]);
> -	DPRINTK("80==0x%04x  "
> +	ata_port_printk(ap, KERN_DEBUG,
> +		"80==0x%04x  "
>  		"81==0x%04x  "
>  		"82==0x%04x  "
>  		"83==0x%04x  "
> @@ -1460,7 +1462,8 @@ static inline void ata_dump_id(const u16 *id)
>  		id[82],
>  		id[83],
>  		id[84]);
> -	DPRINTK("88==0x%04x  "
> +	ata_port_printk(ap, KERN_DEBUG,
> +		"88==0x%04x  "
>  		"93==0x%04x\n",
>  		id[88],
>  		id[93]);
> @@ -2542,7 +2545,7 @@ int ata_dev_configure(struct ata_device *dev)
>  	xfer_mask = ata_id_xfermask(id);
>  
>  	if (ata_msg_probe(ap))
> -		ata_dump_id(id);
> +		ata_dump_id(ap, id);
>  
>  	/* SCSI only uses 4-char revisions, dump full 8 chars from ATA */
>  	ata_id_c_string(dev->id, fwrevbuf, ATA_ID_FW_REV,



[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