linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Denis Efremov <efremov@linux.com>
To: Joe Perches <joe@perches.com>, linux-block@vger.kernel.org
Cc: Willy Tarreau <w@1wt.eu>, Christoph Hellwig <hch@infradead.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 2/3] floppy: add defines for sizes of cmd & reply buffers of floppy_raw_cmd
Date: Sun, 26 Apr 2020 23:44:58 +0300	[thread overview]
Message-ID: <24165d38-3144-ed4a-3118-4fecf8ad86ed@linux.com> (raw)
In-Reply-To: <6a051ca29c9017f1c6fefc5d2894c8dd4542a208.camel@perches.com>



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
 

  reply	other threads:[~2020-04-26 20:45 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-26 13:07 [PATCH v2 0/3] floppy: suppress UBSAN warning in setup_rw_floppy() Denis Efremov
2020-04-26 13:07 ` [PATCH v2 1/3] floppy: add FD_AUTODETECT_SIZE define for struct floppy_drive_params Denis Efremov
2020-04-26 20:24   ` Joe Perches
2020-04-27  5:48   ` Christoph Hellwig
2020-04-26 13:07 ` [PATCH v2 2/3] floppy: add defines for sizes of cmd & reply buffers of floppy_raw_cmd Denis Efremov
2020-04-26 20:28   ` Joe Perches
2020-04-26 20:44     ` Denis Efremov [this message]
2020-04-27  5:50   ` Christoph Hellwig
2020-04-26 13:07 ` [PATCH v2 3/3] floppy: suppress UBSAN warning in setup_rw_floppy() Denis Efremov
2020-04-26 23:19   ` Joe Perches
2020-04-27  5:50   ` Christoph Hellwig

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=24165d38-3144-ed4a-3118-4fecf8ad86ed@linux.com \
    --to=efremov@linux.com \
    --cc=hch@infradead.org \
    --cc=joe@perches.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=w@1wt.eu \
    /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;
as well as URLs for NNTP newsgroup(s).