From: "rae l" <crquan@gmail.com>
To: "Joe Perches" <joe@perches.com>
Cc: linux-ide@vger.kernel.org, linux-scsi@vger.kernel.org,
linux-kernel@vger.kernel.org,
"Randy Dunlap" <randy.dunlap@oracle.com>
Subject: Re: [PATCH 2/2] ide-scsi: use print_hex_dump from <linux/kernel.h>
Date: Mon, 26 Nov 2007 16:37:50 +0800 [thread overview]
Message-ID: <91b13c310711260037o7af4b11dt389bb209a075c25a@mail.gmail.com> (raw)
In-Reply-To: <1196062867.8948.25.camel@localhost>
On Nov 26, 2007 3:41 PM, Joe Perches <joe@perches.com> wrote:
> On Mon, 2007-11-26 at 15:16 +0800, Denis Cheng wrote:
> > diff --git a/drivers/scsi/ide-scsi.c b/drivers/scsi/ide-scsi.c
> > index 8d0244c..8f3fc1d 100644
> > --- a/drivers/scsi/ide-scsi.c
> > +++ b/drivers/scsi/ide-scsi.c
> > @@ -282,7 +272,7 @@ static int idescsi_check_condition(ide_drive_t *drive, struct request *failed_co
> > pc->scsi_cmd = ((idescsi_pc_t *) failed_command->special)->scsi_cmd;
> > if (test_bit(IDESCSI_LOG_CMD, &scsi->log)) {
> > printk ("ide-scsi: %s: queue cmd = ", drive->name);
> > - hexdump(pc->c, 6);
> > + print_hex_dump(KERN_DEBUG, "", DUMP_PREFIX_OFFSET, 16, 1, pc->c, 6, 1);
> > }
> > rq->rq_disk = scsi->disk;
> > return ide_do_drive_cmd(drive, rq, ide_preempt);
>
> Hi Denis.
>
> These aren't really equivalent. You need to look at the
> line above to determine if a KERN_ prefix needs to be
> used at all.
>
> You should probably use print_hex_dump_bytes here.
I know this is different from the original hexdump in ide-scsi.c, I
just want to tell someone that there's a good implementation of
hexdump in kernel.h, and I think the default KERN_DEBUG and
print_hex_dump is more informative and has better output. However,
anyone want more precise control on debug message could make her/his
improvements with print_hex_dump.
>
> cheers, Joe
>
>
--
Denis Cheng
next prev parent reply other threads:[~2007-11-26 8:38 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-26 7:16 Denis Cheng
[not found] ` <1196062867.8948.25.camel@localhost>
2007-11-26 8:37 ` rae l [this message]
2007-11-26 13:25 ` Matthew Wilcox
2007-11-26 16:54 ` Randy Dunlap
2007-11-27 9:31 ` Andrew Morton
2007-11-27 19:34 ` Joe Perches
2007-11-27 20:34 ` Bartlomiej Zolnierkiewicz
2007-11-27 21:02 ` Bartlomiej Zolnierkiewicz
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=91b13c310711260037o7af4b11dt389bb209a075c25a@mail.gmail.com \
--to=crquan@gmail.com \
--cc=joe@perches.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=randy.dunlap@oracle.com \
/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
Powered by JetHome