Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp2214811ybz; Sun, 26 Apr 2020 13:46:49 -0700 (PDT) X-Google-Smtp-Source: APiQypKbLYDpkszfGNTRMY7TuX3bVrvVjmG23iXSMjP3dmrUpLyT02eCmYCtzXeZEx5CPzc9Lycd X-Received: by 2002:a17:906:3e52:: with SMTP id t18mr16460672eji.204.1587934009673; Sun, 26 Apr 2020 13:46:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587934009; cv=none; d=google.com; s=arc-20160816; b=fDPVm/xjBGtaP1ha7jYuq+YPLE3UwzfTA2vwAOP7IgqLobfGBEQG9gnk05KEdIW+iW G/QuGXRZtIkZq3Cpz7nB0yNIljbmmjYBcQSzWC6xPNoJvKTLh3catyvfxPDiPm2ot/DH z6tCtgIT5ccWvYWwzEJGtm14zyh94buleP7XjVeEOaCJQyqi3Jjyd3gyp/iJ3DnFCNoU J0aWl1H4oxR6BovDg21kOxZpV+l0dzOwetQOPlGZIYjonILVvvvA9wpjHQPbQMAQOPQ7 ccn0BpzC+ahSwEmCq19r9tlWKC0aCvhxqGCN9DIJRaXxZiIMLj+IPwcGIIMn6GI7IcX/ T/5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:autocrypt:from:references:cc:to:subject; bh=9ZZNwPbq/C41ede2jP9NihjpFNfOYrifeVd3ObGtsSI=; b=JLeHomBEB7qP0T9qYQKtUWtZJAD7UerKk9Ee/+yh66fw0Uce+DXugT5yRwuckS1vVW mJlYRJO8bfH5vws3rqLkXtuEBG9n66kAcwPBRxe0SDPWUmJl5kxkJH2X1dxKcwl0nqu5 f/Ey54KzL1hjDVXY2euTsIo3Ike9kZ1DOpL0ugQ0N0UUFUxgCKX1S1/2kxH9ByFbdkBd gDeFZi4HkN3LVo7dERizct9WOJuBM6N04JtX9BQSpHxPhcaf/cjveV7H2Jv2QDr9o/fh XYwLPFD/BcS6nfyaPzilnDsQRB3af5DRl+gN4hflb9Zlv9PjCIfi5Y0QQaLQUt9VjrIS tV9w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k7si6930316ejq.480.2020.04.26.13.46.26; Sun, 26 Apr 2020 13:46:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726199AbgDZUpG (ORCPT + 99 others); Sun, 26 Apr 2020 16:45:06 -0400 Received: from mail-lj1-f196.google.com ([209.85.208.196]:34870 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726176AbgDZUpF (ORCPT ); Sun, 26 Apr 2020 16:45:05 -0400 Received: by mail-lj1-f196.google.com with SMTP id g4so15464209ljl.2; Sun, 26 Apr 2020 13:45:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:autocrypt :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=9ZZNwPbq/C41ede2jP9NihjpFNfOYrifeVd3ObGtsSI=; b=ThghEj0izijvCAKo8NxO9GCu9JRQu5ZXu4sWSLcgbz3DUcJm+E2ArbE3+FaTCEj2mj iybqsH0dYf9Bcm/+KxtpkKmd14xdt7pfEFC84ZwWnwvX4F39Pk3+67IWrg+Fii1sKFak AkZpcz/W0lgA1rzMVo54Bi2r1EKJGFbNka1zZEYu4fh5SJyOFE7UyLEk2N4iRegWXg8m YoRnSt7aLFZ5oFkBxAxeEocQTm6QAVSXpJRJUnYkcppcWI+dcc+6zDL3gLo/+ke+UxE3 hJA12uncJNNQQJOhdaEKxP0gDt17vF6vDrFun93UgSbo2dJW+g+ytj+qSmENA+3NmcPE FmsA== X-Gm-Message-State: AGi0PubPgHbAYZKfaRj6VCEb50BT7vuXn/f0L76f+I7mvlxDSiUH5Ibn H9bj5WApFCDmEVCoJYK8kK08YffHlaY= X-Received: by 2002:a05:651c:48a:: with SMTP id s10mr11654189ljc.226.1587933902425; Sun, 26 Apr 2020 13:45:02 -0700 (PDT) Received: from [192.168.8.103] ([213.87.147.211]) by smtp.gmail.com with ESMTPSA id q23sm9095692lji.92.2020.04.26.13.45.00 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 26 Apr 2020 13:45:01 -0700 (PDT) Subject: Re: [PATCH v2 2/3] floppy: add defines for sizes of cmd & reply buffers of floppy_raw_cmd To: Joe Perches , linux-block@vger.kernel.org Cc: Willy Tarreau , Christoph Hellwig , linux-kernel@vger.kernel.org References: <20200426130728.63399-1-efremov@linux.com> <20200426130728.63399-3-efremov@linux.com> <6a051ca29c9017f1c6fefc5d2894c8dd4542a208.camel@perches.com> From: Denis Efremov Autocrypt: addr=efremov@linux.com; keydata= mQINBFsJUXwBEADDnzbOGE/X5ZdHqpK/kNmR7AY39b/rR+2Wm/VbQHV+jpGk8ZL07iOWnVe1 ZInSp3Ze+scB4ZK+y48z0YDvKUU3L85Nb31UASB2bgWIV+8tmW4kV8a2PosqIc4wp4/Qa2A/ Ip6q+bWurxOOjyJkfzt51p6Th4FTUsuoxINKRMjHrs/0y5oEc7Wt/1qk2ljmnSocg3fMxo8+ y6IxmXt5tYvt+FfBqx/1XwXuOSd0WOku+/jscYmBPwyrLdk/pMSnnld6a2Fp1zxWIKz+4VJm QEIlCTe5SO3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z7vHJuijRNUZR2mntwiKotgLV95yL0dPyZxvOPPnbjF0cCtHfdKhXIt7Syzjb M8k2fmSF0FM+89/hP11aRrs6+qMHSd/s3N3j0hR2Uxsski8q6x+LxU1aHS0FFkSl0m8SiazA Gd1zy4pXC2HhCHstF24Nu5iVLPRwlxFS/+o3nB1ZWTwu8I6s2ZF5TAgBfEONV5MIYH3fOb5+ r/HYPye7puSmQ2LCXy7X5IIsnAoxSrcFYq9nGfHNcXhm5x6WjYC0Kz8l4lfwWo8PIpZ8x57v gTH1PI5R4WdRQijLxLCW/AaiuoEYuOLAoW481XtZb0GRRe+Tm9z/fCbkEveyPiDK7oZahBM7 QdWEEV8mqJoOZ3xxqMlJrxKM9SDF+auB4zWGz5jGzCDAx/0qMUrVn2+v8i4oEKW6IUdV7axW Nk9a+EF5JSTbfv0JBYeSHK3WRklSYLdsMRhaCKhSbwo8Xgn/m6a92fKd3NnObvRe76iIEMSw 60iagNE6AFFzuF/GvoIHb2oDUIX4z+/D0TBWH9ADNptmuE+LZnlPUAAEzRgUFtlN5LtJP8ph Message-ID: <24165d38-3144-ed4a-3118-4fecf8ad86ed@linux.com> Date: Sun, 26 Apr 2020 23:44:58 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <6a051ca29c9017f1c6fefc5d2894c8dd4542a208.camel@perches.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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