[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <24165d38-3144-ed4a-3118-4fecf8ad86ed@linux.com>
Date: Sun, 26 Apr 2020 23:44:58 +0300
From: Denis Efremov <efremov@...ux.com>
To: Joe Perches <joe@...ches.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 4/26/20 11:28 PM, Joe Perches wrote:
> 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.
>
Yes, you are right. Thanks for catching. I will resend the patches.
Denis
Powered by blists - more mailing lists