From: Ondrej Zary <linux@zary.sk>
To: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Cc: Christoph Hellwig <hch@lst.de>,
Sergey Shtylyov <s.shtylyov@omp.ru>, 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: [PATCH 12/18] pata_parport: use print_hex_*
Date: Wed, 15 Feb 2023 00:00:04 +0100 [thread overview]
Message-ID: <20230214230010.20318-13-linux@zary.sk> (raw)
In-Reply-To: <20230214230010.20318-1-linux@zary.sk>
Use print_hex_* for debug dumps.
Signed-off-by: Ondrej Zary <linux@zary.sk>
---
drivers/ata/pata_parport/bpck.c | 22 ++++------------------
drivers/ata/pata_parport/epat.c | 2 +-
drivers/ata/pata_parport/epia.c | 2 +-
drivers/ata/pata_parport/friq.c | 2 +-
drivers/ata/pata_parport/frpw.c | 2 +-
5 files changed, 8 insertions(+), 22 deletions(-)
diff --git a/drivers/ata/pata_parport/bpck.c b/drivers/ata/pata_parport/bpck.c
index 1cba098b4b82..dec24983d140 100644
--- a/drivers/ata/pata_parport/bpck.c
+++ b/drivers/ata/pata_parport/bpck.c
@@ -334,12 +334,9 @@ static int bpck_test_proto(struct pi_adapter *pi, char *scratch, int verbose)
}
- if (verbose) {
- printk("bpck: 0x%x unit %d mode %d: ",
- pi->port, pi->unit, pi->mode);
- for (i=0;i<TEST_LEN;i++) printk("%3d",buf[i]);
- printk("\n");
- }
+ dev_dbg(&pi->dev, "bpck: 0x%x unit %d mode %d: ",
+ pi->port, pi->unit, pi->mode);
+ print_hex_dump_debug("bpck: ", DUMP_PREFIX_NONE, TEST_LEN, 1, buf, TEST_LEN, false);
e = 0;
for (i=0;i<TEST_LEN;i++) if (buf[i] != (i+1)) e++;
@@ -421,20 +418,9 @@ 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
-
+ print_hex_dump_bytes("bpck EEPROM: ", DUMP_PREFIX_NONE, scratch, 128);
dev_info(&pi->dev, "bpck %s, backpack %8.8s unit %d",
BPCK_VERSION, &scratch[110], pi->unit);
dev_info(&pi->dev, " at 0x%x, mode %d (%s), delay %d\n", pi->port,
diff --git a/drivers/ata/pata_parport/epat.c b/drivers/ata/pata_parport/epat.c
index 389faa6ae49d..b08ed2f86668 100644
--- a/drivers/ata/pata_parport/epat.c
+++ b/drivers/ata/pata_parport/epat.c
@@ -280,7 +280,7 @@ static int epat_test_proto(struct pi_adapter *pi, char *scratch, int verbose)
epat_disconnect(pi);
dev_dbg(&pi->dev, "epat: port 0x%x, mode %d, ccr %x, test=(%d,%d,%d)\n",
- pi->port, pi->mode, cc, e[0], e[1], f);
+ pi->port, pi->mode, cc, e[0], e[1], f);
return (e[0] && e[1]) || f;
}
diff --git a/drivers/ata/pata_parport/epia.c b/drivers/ata/pata_parport/epia.c
index 48d12f56c501..32bec3449338 100644
--- a/drivers/ata/pata_parport/epia.c
+++ b/drivers/ata/pata_parport/epia.c
@@ -263,7 +263,7 @@ static int epia_test_proto(struct pi_adapter *pi, char *scratch, int verbose)
epia_disconnect(pi);
dev_dbg(&pi->dev, "epia: port 0x%x, mode %d, test=(%d,%d,%d)\n",
- pi->port, pi->mode, e[0], e[1], f);
+ pi->port, pi->mode, e[0], e[1], f);
return (e[0] && e[1]) || f;
diff --git a/drivers/ata/pata_parport/friq.c b/drivers/ata/pata_parport/friq.c
index ec564e7cb930..9e3ec64896f2 100644
--- a/drivers/ata/pata_parport/friq.c
+++ b/drivers/ata/pata_parport/friq.c
@@ -208,7 +208,7 @@ static int friq_test_proto(struct pi_adapter *pi, char *scratch, int verbose)
friq_disconnect(pi);
dev_dbg(&pi->dev, "friq: port 0x%x, mode %d, test=(%d,%d,%d)\n",
- pi->port, pi->mode, e[0], e[1], r);
+ pi->port, pi->mode, e[0], e[1], r);
return (r || (e[0] && e[1]));
}
diff --git a/drivers/ata/pata_parport/frpw.c b/drivers/ata/pata_parport/frpw.c
index 5ea16a247257..c12c8aa9707c 100644
--- a/drivers/ata/pata_parport/frpw.c
+++ b/drivers/ata/pata_parport/frpw.c
@@ -257,7 +257,7 @@ static int frpw_test_proto(struct pi_adapter *pi, char *scratch, int verbose)
frpw_disconnect(pi);
dev_dbg(&pi->dev, "frpw: port 0x%x, chip %ld, mode %d, test=(%d,%d,%d)\n",
- pi->port, (pi->private%2), pi->mode, e[0], e[1], r);
+ pi->port, (pi->private%2), pi->mode, e[0], e[1], r);
return (r || (e[0] && e[1]));
}
--
Ondrej Zary
next prev parent reply other threads:[~2023-02-14 23:00 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-14 22:59 [PATCH v2 0/18] pata_parport: protocol drivers fixes and cleanups Ondrej Zary
2023-02-14 22:59 ` [PATCH 01/18] pata_parport: fix EPAT C7/C8 Kconfig Ondrej Zary
2023-02-15 17:19 ` Sergey Shtylyov
2023-02-14 22:59 ` [PATCH 02/18] pata_parport: probe all units automatically Ondrej Zary
2023-02-14 22:59 ` [PATCH 03/18] pata_parport: Remove pi_swab16 and pi_swab32 Ondrej Zary
2023-02-14 22:59 ` [PATCH 04/18] pata_parport: remove useless printks at module_init of bpck6 Ondrej Zary
2023-02-14 22:59 ` [PATCH 05/18] pata_parport: Introduce module_pata_parport_driver macro Ondrej Zary
2023-02-14 22:59 ` [PATCH 06/18] pata_parport: remove devtype from struct pi_adapter Ondrej Zary
2023-02-14 22:59 ` [PATCH 07/18] pata_parport: remove device " Ondrej Zary
2023-02-14 23:00 ` [PATCH 08/18] pata_parport: remove typedef struct PIA Ondrej Zary
2023-02-14 23:00 ` [PATCH 09/18] pata_parport: remove verbose parameter from log_adapter() Ondrej Zary
2023-02-14 23:00 ` [PATCH 10/18] pata_parport: remove scratch " Ondrej Zary
2023-02-14 23:00 ` [PATCH 11/18] pata_parport: use dev_* instead of printk Ondrej Zary
2023-02-14 23:00 ` Ondrej Zary [this message]
2023-02-14 23:00 ` [PATCH 13/18] pata_parport: simplify log_adapter prints, remove VERSION defines Ondrej Zary
2023-02-14 23:00 ` [PATCH 14/18] pata_parport: remove bpck6 verbose parameter Ondrej Zary
2023-02-14 23:00 ` [PATCH 15/18] pata_parport: remove verbose parameter from test_proto() Ondrej Zary
2023-02-14 23:00 ` [PATCH 16/18] pata_parport: remove scratch " Ondrej Zary
2023-02-14 23:00 ` [PATCH 17/18] pata_parport: remove obsolete changelogs Ondrej Zary
2023-02-14 23:00 ` [PATCH 18/18] pata_parport: move pata_parport.h to drivers/ata/pata_parport Ondrej Zary
2023-02-14 23:50 ` [PATCH v2 0/18] pata_parport: protocol drivers fixes and cleanups Damien Le Moal
2023-02-15 17:14 ` Sergey Shtylyov
2023-02-15 19:45 [PATCH v3 " Ondrej Zary
2023-02-15 19:45 ` [PATCH 12/18] pata_parport: use print_hex_* Ondrej Zary
2023-02-18 17:04 ` Sergey Shtylyov
2023-02-18 22:01 [PATCH v4 0/18] pata_parport: protocol drivers fixes and cleanups Ondrej Zary
2023-02-18 22:01 ` [PATCH 12/18] pata_parport: use print_hex_* Ondrej Zary
2023-02-19 8:59 ` Sergey Shtylyov
2023-03-06 17:27 [PATCH RESEND v4 0/18] pata_parport: protocol drivers fixes and cleanups Ondrej Zary
2023-03-06 17:27 ` [PATCH 12/18] pata_parport: use print_hex_* Ondrej Zary
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=20230214230010.20318-13-linux@zary.sk \
--to=linux@zary.sk \
--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=s.shtylyov@omp.ru \
--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).