[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6a051ca29c9017f1c6fefc5d2894c8dd4542a208.camel@perches.com>
Date: Sun, 26 Apr 2020 13:28:14 -0700
From: Joe Perches <joe@...ches.com>
To: Denis Efremov <efremov@...ux.com>, linux-block@...r.kernel.org
Cc: Willy Tarreau <w@....eu>, Christoph Hellwig <hch@...radead.org>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 2/3] floppy: add defines for sizes of cmd & reply
buffers of floppy_raw_cmd
On Sun, 2020-04-26 at 16:07 +0300, Denis Efremov wrote:
> Use FD_RAW_CMD_SIZE, FD_RAW_REPLY_SIZE defines instead of magic numbers
> for cmd & reply buffers of struct floppy_raw_cmd. Remove local to
> floppy.c MAX_REPLIES define, as it is now FD_RAW_REPLY_SIZE.
> FD_RAW_CMD_FULLSIZE added as we allow command to also fill reply_count
> and reply fields.
[]
> diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c
[]
> @@ -1847,7 +1846,7 @@ static void show_floppy(int fdc)
> output_log[(i + output_log_pos) % OLOGSIZE].jiffies);
> pr_info("last result at %lu\n", resultjiffies);
> pr_info("last redo_fd_request at %lu\n", lastredo);
> - print_hex_dump(KERN_INFO, "", DUMP_PREFIX_NONE, 16, 1,
> + print_hex_dump(KERN_INFO, "", DUMP_PREFIX_NONE, FD_RAW_REPLY_SIZE, 1,
> reply_buffer, resultsize, true);
FD_RAW_REPLY_SIZE happens to be 16, but it's misleading
to use it here.
This use of 16 is not for FD_RAW_REPLY_SIZE, but the
width of the line
being dumped, and this value must be
either 16 or 32.
Powered by blists - more mailing lists