lkml.org 
[lkml]   [2014]   [Aug]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    SubjectRe: [RFC PATCH 03/10] scsi/constants: Cleanup printk message in __scsi_print_command()
    From
    Date
    On Fri, 2014-08-08 at 11:50 +0000, Yoshihiro YUNOMAE wrote:
    > All bytes in CDB should be output after linebuf is filled because
    > "[%s] CDB: %s\n" message is output many times in loop.
    >
    > Signed-off-by: Yoshihiro YUNOMAE <yoshihiro.yunomae.ez@hitachi.com>
    > Cc: Hannes Reinecke <hare@suse.de>
    > Cc: Doug Gilbert <dgilbert@interlog.com>
    > Cc: Martin K. Petersen <martin.petersen@oracle.com>
    > Cc: Christoph Hellwig <hch@lst.de>
    > Cc: "James E.J. Bottomley" <JBottomley@parallels.com>
    > Cc: Hidehiro Kawai <hidehiro.kawai.ez@hitachi.com>
    > Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
    > ---
    > drivers/scsi/constants.c | 3 +--
    > 1 file changed, 1 insertion(+), 2 deletions(-)
    >
    > diff --git a/drivers/scsi/constants.c b/drivers/scsi/constants.c
    > index 9c38b8d..5956d4d 100644
    > --- a/drivers/scsi/constants.c
    > +++ b/drivers/scsi/constants.c
    > @@ -413,9 +413,8 @@ void __scsi_print_command(struct scsi_device *sdev, const char *prefix,
    >
    > hex_dump_to_buffer(cdb + i, linelen, 16, 1,
    > linebuf, sizeof(linebuf), false);
    > - sdev_printk(KERN_INFO, sdev, "[%s] CDB: %s\n",
    > - prefix, linebuf);
    > }
    > + sdev_printk(KERN_INFO, sdev, "[%s] CDB: %s\n", prefix, linebuf);
    > }
    > EXPORT_SYMBOL(__scsi_print_command);

    This doesn't look right -- In Hannes' tree what the code is doing is
    printing out a separate line for each 16 bytes of the CDB. You change
    will cause only the last (partial?) 16 bytes to be printed.

    -Ewan




    \
     
     \ /
      Last update: 2014-08-15 17:41    [W:4.027 / U:0.452 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site