Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp2204534ybz; Sun, 26 Apr 2020 13:31:07 -0700 (PDT) X-Google-Smtp-Source: APiQypKdz+CBX8D8Neql8Dk9a5KeGVfq2oEnaKwcpA7z9Qo9XHCpRtXT8pMY5E6czEIUgoGYjKVv X-Received: by 2002:aa7:dd84:: with SMTP id g4mr12191407edv.257.1587933067798; Sun, 26 Apr 2020 13:31:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587933067; cv=none; d=google.com; s=arc-20160816; b=oCWWjBztH21I+BFlKTnlRfi0Aot4Zj77BL9sy3h7PP5kIJxaAuoTOXv7JLI6vK4Er/ bOgq7qHcSSiA2DiBhI/UXbPczg9RLjAEXH7hJLrqUG1nrV9V60M3rgnrft3Q+o+zmHI6 FgRuzIwKUHyy0yY1I9zDEH2JuMRZcoFLgeYmx1fkA97Z/9murO11O7XEmg3zHrbQSsxx hbHCB6W8bWxPqYaNZWK77rkHXkq2897tm5RKSyhaCC69GS4jqpa3dtYDE/R0qrpBpa+Z kpLp86QoTmQsb9H+bhjtwUgVlcVXX13Dd9Mg+uxg62VIe55jjU0dEhjkoR8rOuEy3tOs gAxA== 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:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=Dk6zYgjsO3HkV4VDQ3b84iLXl2uhT3qSo4Sr5+DIqi0=; b=xO/zvZjEcXMC1sYZkSDj7M6FMrqX7tem7MTkTWe+zcJluhjyj+Tx/kZyS/tk2a3ItB DOdYWvGaMrDcewBprAvq89m3IpdA7OKJ33g5xvOIyDeEGx/n7SV4tsV+LuGH6DuqHwxn JEl8TjmfMK4OPBiZpJbQjgbfsO4exto2/SEESX6PVhPWc7U4qW1wSppg8Isdqg7BMpdw GV2ubo6E77+eQrO/xxHvomJ6AF1PU0dM9T9o4X6c2E+BVF/eWgs1FNXEYlUpvRS9zaF1 zZe28Ber5ImpPZaUXVPxAYWDV0M7zIWSal9jxQHhLnETjF/bszoRQ1tacVdbN+egRO96 8LNA== 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.30.44; Sun, 26 Apr 2020 13:31:07 -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 S1726250AbgDZU2S (ORCPT + 99 others); Sun, 26 Apr 2020 16:28:18 -0400 Received: from smtprelay0208.hostedemail.com ([216.40.44.208]:50652 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726176AbgDZU2R (ORCPT ); Sun, 26 Apr 2020 16:28:17 -0400 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay08.hostedemail.com (Postfix) with ESMTP id E605C182CED5B; Sun, 26 Apr 2020 20:28:16 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,,RULES_HIT:41:355:379:599:968:973:988:989:1260:1277:1311:1313:1314:1345:1359:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2198:2199:2393:2559:2562:2828:3138:3139:3140:3141:3142:3352:3622:3865:3866:3867:3868:3871:3872:4321:4605:5007:6119:6120:6248:7901:7903:10004:10400:10848:11026:11232:11473:11658:11914:12296:12297:12740:12760:12895:13069:13255:13311:13357:13439:14659:14721:14777:21080:21433:21524:21627:21990:30034:30054:30056:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:1,LUA_SUMMARY:none X-HE-Tag: bomb38_8261953751d37 X-Filterd-Recvd-Size: 1958 Received: from XPS-9350.home (unknown [47.151.136.130]) (Authenticated sender: joe@perches.com) by omf03.hostedemail.com (Postfix) with ESMTPA; Sun, 26 Apr 2020 20:28:15 +0000 (UTC) Message-ID: <6a051ca29c9017f1c6fefc5d2894c8dd4542a208.camel@perches.com> Subject: Re: [PATCH v2 2/3] floppy: add defines for sizes of cmd & reply buffers of floppy_raw_cmd From: Joe Perches To: Denis Efremov , linux-block@vger.kernel.org Cc: Willy Tarreau , Christoph Hellwig , linux-kernel@vger.kernel.org Date: Sun, 26 Apr 2020 13:28:14 -0700 In-Reply-To: <20200426130728.63399-3-efremov@linux.com> References: <20200426130728.63399-1-efremov@linux.com> <20200426130728.63399-3-efremov@linux.com> Content-Type: text/plain; charset="ISO-8859-1" User-Agent: Evolution 3.36.1-2 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.