mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "rae l" <crquan@gmail.com>
To: "Richard Knutsson" <ricknu-0@student.ltu.se>
Cc: "Herbert Xu" <herbert@gondor.apana.org.au>,
	linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org,
	dengxw@163.com, "Randy Dunlap" <randy.dunlap@oracle.com>,
	"Joe Perches" <joe@perches.com>
Subject: Re: [PATCH] [RESEND] crypto test: use print_hex_dump from kernel.h instead
Date: Tue, 27 Nov 2007 13:03:29 +0800	[thread overview]
Message-ID: <91b13c310711262103w781b3047k6338acda56837c0@mail.gmail.com> (raw)
In-Reply-To: <474B87F1.2060109@student.ltu.se>

On Nov 27, 2007 10:58 AM, Richard Knutsson <ricknu-0@student.ltu.se> wrote:
...
> > +     print_hex_dump(KERN_CONT, "", DUMP_PREFIX_OFFSET,
> > +                     16, 1,
> > +                     buf, len, 0);
> >
> Not important, but why use '0' instead of 'false'?
after read http://lkml.org/lkml/2006/7/27/281, I agreed with you.
this is refreshed patch against the lastest cryptodev tree.

Cc: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Denis Cheng <crquan@gmail.com>
---
 crypto/tcrypt.c |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/crypto/tcrypt.c b/crypto/tcrypt.c
index 1e12b86..ae762c2 100644
--- a/crypto/tcrypt.c
+++ b/crypto/tcrypt.c
@@ -87,12 +87,11 @@ static char *check[] = {
 	"camellia", "seed", "salsa20", NULL
 };

-static void hexdump(unsigned char *buf, unsigned int len)
+static inline void hexdump(unsigned char *buf, unsigned int len)
 {
-	while (len--)
-		printk("%02x", *buf++);
-
-	printk("\n");
+	print_hex_dump(KERN_CONT, "", DUMP_PREFIX_OFFSET,
+			16, 1,
+			buf, len, false);
 }

 static void tcrypt_complete(struct crypto_async_request *req, int err)

-- 
Denis Cheng

  reply	other threads:[~2007-11-27  5:03 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-26  7:13 [PATCH 1/2] crypto test: use print_hex_dump from <linux/kernel.h> Denis Cheng
2007-11-26 14:39 ` Herbert Xu
2007-11-26 17:28   ` [PATCH] [RESEND] crypto test: use print_hex_dump from <linux/kernel.h> instead Denis Cheng
2007-11-26 18:01     ` Joe Perches
2007-11-27  1:35       ` Herbert Xu
2007-11-27  2:47         ` [PATCH] [RESEND] crypto test: use print_hex_dump from kernel.h instead Denis Cheng
2007-11-27  2:58           ` Richard Knutsson
2007-11-27  5:03             ` rae l [this message]
2007-11-27  9:26               ` Andrew Morton
2007-11-29 11:13                 ` Herbert Xu
2007-11-30  1:20                   ` rae l
2007-11-30  6:00                     ` Herbert Xu
2007-11-27  1:05     ` [PATCH] [RESEND] crypto test: use print_hex_dump from <linux/kernel.h> instead Herbert Xu

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=91b13c310711262103w781b3047k6338acda56837c0@mail.gmail.com \
    --to=crquan@gmail.com \
    --cc=dengxw@163.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=joe@perches.com \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=randy.dunlap@oracle.com \
    --cc=ricknu-0@student.ltu.se \
    /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

all inboxes | Powered by JetHome®