linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sergei.shtylyov@gmail.com>
To: Ondrej Zary <linux@zary.sk>,
	Damien Le Moal <damien.lemoal@opensource.wdc.com>
Cc: Christoph Hellwig <hch@lst.de>, Jens Axboe <axboe@kernel.dk>,
	Tim Waugh <tim@cyberelk.net>,
	linux-block@vger.kernel.org, linux-parport@lists.infradead.org,
	linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 08/12] pata_parport: use dev_* and print_hex_* instead of printk
Date: Tue, 14 Feb 2023 23:55:05 +0300	[thread overview]
Message-ID: <a51aa862-e713-5b7a-d86a-bebca092a54c@gmail.com> (raw)
In-Reply-To: <20230211144232.15138-9-linux@zary.sk>

Hello again! :-)

   Resending the mail from Gmail account, as OMP account doesn't work ATM... :-/

On 2/11/23 5:42 PM, Ondrej Zary wrote:

> Use dev_info/dev_err/dev_dbg/print_hex_* instead of printk.
> Remove version print from log_adapter and meaningless VERSION defines.

   Sounds like this needs to be in a separate patch...

> Remove now useless verbose parameter of bpck6 module.

   This one too...

> Signed-off-by: Ondrej Zary <linux@zary.sk>
[...]

> diff --git a/drivers/ata/pata_parport/bpck.c b/drivers/ata/pata_parport/bpck.c
> index 89160a94b30e..d5bc419b2ab3 100644
> --- a/drivers/ata/pata_parport/bpck.c
> +++ b/drivers/ata/pata_parport/bpck.c
[...]
> @@ -421,24 +416,12 @@ static void bpck_log_adapter(struct pi_adapter *pi)
>  {	char	*mode_string[5] = { "4-bit","8-bit","EPP-8",
>  				    "EPP-16","EPP-32" };
>  	char scratch[128];
> -#ifdef DUMP_EEPROM
> -	int i;
> -#endif
>  
>  	bpck_read_eeprom(pi,scratch);
> -
> -#ifdef DUMP_EEPROM
> -	   for(i=0;i<128;i++)
> -		if ((scratch[i] < ' ') || (scratch[i] > '~'))
> -		    scratch[i] = '.';
> -	   printk("bpck EEPROM: %64.64s\n", scratch);
> -	   printk("             %64.64s\n", &scratch[64]);
> -#endif
> -
> -	printk("bpck %s, backpack %8.8s unit %d",
> -		BPCK_VERSION, &scratch[110], pi->unit);
> -	printk(" at 0x%x, mode %d (%s), delay %d\n",pi->port,
> -		pi->mode,mode_string[pi->mode],pi->delay);
> +	print_hex_dump_bytes("bpck EEPROM: ", DUMP_PREFIX_NONE, scratch, 128);

   Conversion to print_hex_dump_bytes() deserved its own patch, IMHO...

> +	dev_info(&pi->dev, "backpack %8.8s unit %d at 0x%x, mode %d (%s), delay %d\n",
> +		 &scratch[110], pi->unit, pi->port, pi->mode,
> +		 mode_string[pi->mode], pi->delay);
>  }
>  
>  static struct pi_protocol bpck = {
[...]
> diff --git a/drivers/ata/pata_parport/frpw.c b/drivers/ata/pata_parport/frpw.c
> index 9b8db1122154..92b359460e34 100644
> --- a/drivers/ata/pata_parport/frpw.c
> +++ b/drivers/ata/pata_parport/frpw.c
[...]
> @@ -272,11 +266,9 @@ static void frpw_log_adapter(struct pi_adapter *pi)
>  {       char    *mode_string[6] = {"4-bit","8-bit","EPP",
>  				   "EPP-8","EPP-16","EPP-32"};
>  
> -	printk("frpw %s, Freecom (%s) adapter at 0x%x, ",
> -		FRPW_VERSION,((pi->private%2) == 0)?"Xilinx":"ASIC",pi->port);
> -        printk("mode %d (%s), delay %d\n",pi->mode,
> -		mode_string[pi->mode],pi->delay);
> -
> +	dev_info(&pi->dev, "Freecom (%s) adapter at 0x%x, mode %d (%s), delay %d\n",
> +		 ((pi->private % 2) == 0) ? "Xilinx":"ASIC",

   Need to add the spaces around ':' as you added spaces around '?'...

[...]

MBR, Sergey

  reply	other threads:[~2023-02-14 20:55 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-11 14:42 [PATCH 0/12] pata_parport: protocol drivers cleanups Ondrej Zary
2023-02-11 14:42 ` [PATCH 01/12] pata_parport: Remove pi_swab16 and pi_swab32 Ondrej Zary
2023-02-11 19:01   ` Sergey Shtylyov
2023-02-11 14:42 ` [PATCH 02/12] pata_parport: Introduce module_pata_parport_driver macro Ondrej Zary
2023-02-12 12:19   ` Sergey Shtylyov
2023-02-12 18:19     ` Ondrej Zary
2023-02-11 14:42 ` [PATCH 03/12] pata_parport: remove devtype from struct pi_adapter Ondrej Zary
2023-02-11 19:11   ` Sergey Shtylyov
2023-02-11 20:47     ` Ondrej Zary
2023-02-12 12:17       ` Damien Le Moal
2023-02-11 14:42 ` [PATCH 04/12] pata_parport: remove device " Ondrej Zary
2023-02-12 17:36   ` Sergey Shtylyov
2023-02-11 14:42 ` [PATCH 05/12] pata_parport: remove typedef struct PIA Ondrej Zary
2023-02-13 20:08   ` Sergey Shtylyov
2023-02-11 14:42 ` [PATCH 06/12] pata_parport: remove verbose parameter from log_adapter() Ondrej Zary
2023-02-11 20:43   ` Sergey Shtylyov
2023-02-11 14:42 ` [PATCH 07/12] pata_parport: remove scratch " Ondrej Zary
2023-02-12 17:14   ` Sergey Shtylyov
2023-02-11 14:42 ` [PATCH 08/12] pata_parport: use dev_* and print_hex_* instead of printk Ondrej Zary
2023-02-14 20:55   ` Sergei Shtylyov [this message]
2023-02-11 14:42 ` [PATCH 09/12] pata_parport: remove verbose parameter from test_proto() Ondrej Zary
2023-02-11 19:56   ` Sergey Shtylyov
2023-02-11 14:42 ` [PATCH 10/12] pata_parport: remove scratch " Ondrej Zary
2023-02-12 17:47   ` Sergey Shtylyov
2023-02-11 14:42 ` [PATCH 11/12] pata_parport: remove obsolete changelogs Ondrej Zary
2023-02-13 20:42   ` Sergey Shtylyov
2023-02-11 14:42 ` [PATCH 12/12] pata_parport: move pata_parport.h to drivers/ata/pata_parport Ondrej Zary
2023-02-13 20:51   ` Sergey Shtylyov
2023-02-11 20:59 ` [PATCH 0/12] pata_parport: protocol drivers cleanups Sergey Shtylyov

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=a51aa862-e713-5b7a-d86a-bebca092a54c@gmail.com \
    --to=sergei.shtylyov@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=damien.lemoal@opensource.wdc.com \
    --cc=hch@lst.de \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-parport@lists.infradead.org \
    --cc=linux@zary.sk \
    --cc=tim@cyberelk.net \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).