Re: [PATCH v2 2/3] floppy: add defines for sizes of cmd & reply buffers of floppy_raw_cmd

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.





[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux