All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dzmitry Sledneu <dzmitry.sledneu@gmail.com>
To: Joe Perches <joe@perches.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-kernel@vger.kernel.org, devel@driverdev.osuosl.org
Subject: [PATCH v3 1/2] staging: gs_fpgaboot: Use print_hex_dump_bytes instead of pr_info
Date: Tue, 07 Oct 2014 17:53:20 +0200	[thread overview]
Message-ID: <54340C70.9070505@gmail.com> (raw)
In-Reply-To: <1412695842.2916.49.camel@joe-AO725>

From: Joe Perches <joe@perches.com>

Use print_hex_dump_bytes instead of pr_info

Signed-off-by: Dzmitry Sledneu <dzmitry.sledneu@gmail.com>
Reviewed-by: Insop Song <insop.song@gainspeed.com>

---
 drivers/staging/gs_fpgaboot/gs_fpgaboot.c | 25 ++-----------------------
 1 file changed, 2 insertions(+), 23 deletions(-)

diff --git a/drivers/staging/gs_fpgaboot/gs_fpgaboot.c b/drivers/staging/gs_fpgaboot/gs_fpgaboot.c
index 6aa9d7c..9764a9a 100644
--- a/drivers/staging/gs_fpgaboot/gs_fpgaboot.c
+++ b/drivers/staging/gs_fpgaboot/gs_fpgaboot.c
@@ -46,27 +46,6 @@ static char	*file = "xlinx_fpga_firmware.bit";
 module_param(file, charp, S_IRUGO);
 MODULE_PARM_DESC(file, "Xilinx FPGA firmware file.");
 
-#ifdef DEBUG_FPGA
-static void datadump(char *msg, void *m, int n)
-{
-	int i;
-	unsigned char *c;
-
-	pr_info("=== %s ===\n", msg);
-
-	c = m;
-
-	for (i = 0; i < n; i++) {
-		if ((i&0xf) == 0)
-			pr_info(KERN_INFO "\n  0x%4x: ", i);
-
-		pr_info("%02X ", c[i]);
-	}
-
-	pr_info("\n");
-}
-#endif /* DEBUG_FPGA */
-
 static void read_bitstream(char *bitdata, char *buf, int *offset, int rdsize)
 {
 	memcpy(buf, bitdata + *offset, rdsize);
@@ -220,9 +199,9 @@ static int gs_download_image(struct fpgaimage *fimage, enum wbus bus_bytes)
 	size = fimage->lendata;
 
 #ifdef DEBUG_FPGA
-	datadump("bitfile sample", bitdata, 0x100);
+	print_hex_dump_bytes("bitfile sample: ", DUMP_PREFIX_OFFSET,
+			     bitdata, 0x100);
 #endif /* DEBUG_FPGA */
-
 	if (!xl_supported_prog_bus_width(bus_bytes)) {
 		pr_err("unsupported program bus width %d\n",
 				bus_bytes);
-- 
2.1.2


  reply	other threads:[~2014-10-07 15:53 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-07 14:37 [PATCH 001/002] staging: gs_fpgaboot: Fix "Possible unnecessary KERN_INFO" checkpatch.pl warning Dzmitry Sledneu
2014-10-07 14:39 ` [PATCH 002/002] staging: gs_fpgaboot: Fix "Possible unnecessary 'out of memory' message" " Dzmitry Sledneu
2014-10-07 15:23   ` [PATCH v2 1/2] staging: gs_fpgaboot: Fix "Possible unnecessary KERN_INFO" " Dzmitry Sledneu
2014-10-07 15:24     ` [PATCH v2 2/2] staging: gs_fpgaboot: Fix "Possible unnecessary 'out of memory' message" " Dzmitry Sledneu
2014-10-07 15:30     ` [PATCH v2 1/2] staging: gs_fpgaboot: Fix "Possible unnecessary KERN_INFO" " Joe Perches
2014-10-07 15:53       ` Dzmitry Sledneu [this message]
2014-10-07 15:54         ` [PATCH v3 2/2] staging: gs_fpgaboot: Fix "Possible unnecessary 'out of memory' message" " Dzmitry Sledneu
2014-10-08 22:48           ` Greg Kroah-Hartman
2014-10-09  7:20             ` Dzmitry Sledneu
2014-10-09  7:22               ` [PATCH v4] staging: gs_fpgaboot: Fix "out of memory" error handling Dzmitry Sledneu

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=54340C70.9070505@gmail.com \
    --to=dzmitry.sledneu@gmail.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.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.