Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp522007ybf; Sat, 29 Feb 2020 09:00:10 -0800 (PST) X-Google-Smtp-Source: APXvYqzQhcTl4WMnOVemI4+wKuRGphHkxHedwA33IVYR8O4SfMmH7BhPwK/plB/Fh0Sn6L/pwU6h X-Received: by 2002:a05:6830:114f:: with SMTP id x15mr1311216otq.306.1582995610043; Sat, 29 Feb 2020 09:00:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582995610; cv=none; d=google.com; s=arc-20160816; b=HzjNCohrEH266lWInlWF/AZAmB1w4JsW2eLgFM/rG8ye/UQyIH9km1K2rHAIKMvBeH yW21FczsWQF9FnlHoXBYQezHDMLm3zky3WAjhqjeghLv4UHoUthukURLsUnvuS8Ij9OI x569TJvAMnKOZY5bMLlBs50b+O5wGM9lfUTKvzFroCzFAUbbdwznNKuyE1QM0WuQiMPR YJ6bRQrH9lvrp3tD89DkSnWFOhJGa5kNT5J+OFCChfvquBtzQVCyLP3sDFkP/6pWh59J 1cG3MwvvVdkql+pe3WvZlREMn4PBzEaqhZF6tsYbLdmEdVxmJNgD+4Q4AZG+WtNkTAAw /Uig== 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:subject:autocrypt:from:references:cc:to; bh=p/EJnUXjKK9tSG671VjWXjth9Z02XftSAg9w+XBqvv4=; b=MpIWLXSGT8OiO2EXTalVBR/Dz4wT9Oye69dgJJnbjxbSFOs3gtUEDqQ5PevV8PpHT5 obWME3vxzERMsFrVvinMRBw0ZkbuwvTEEGePoMhEIyTcjWLSn4G13v12+PSMQeYFycBK vCzH1UUVCN+6LJw44cXEa0pPTf2tmjP5QLm3oAd9f+m+W1zzmQjZ231dKcZXQv7FxL6b bIL0rS/fdK+RygTVa8C4vaHFm8upbFaBAgam3AAiWnnWhn/o5H+r4sustioDLXBRbSZc GMa4o7DWI+ygANyenrTQfmgovL8pLEa8pTlfNVKJDfu4vILBEk0scbOrG7C+/eNBsfbg /JFQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f14si3270549oto.46.2020.02.29.08.59.28; Sat, 29 Feb 2020 09:00:09 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727390AbgB2QjC (ORCPT + 99 others); Sat, 29 Feb 2020 11:39:02 -0500 Received: from mail-lj1-f195.google.com ([209.85.208.195]:40942 "EHLO mail-lj1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727349AbgB2QjC (ORCPT ); Sat, 29 Feb 2020 11:39:02 -0500 Received: by mail-lj1-f195.google.com with SMTP id 143so6836313ljj.7; Sat, 29 Feb 2020 08:39:00 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:cc:references:from:autocrypt:subject :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=p/EJnUXjKK9tSG671VjWXjth9Z02XftSAg9w+XBqvv4=; b=nTg53mvGV9xu7jQvAUd8wTlUspQWJI+qHEBUb+iEDHCVnmflm4xbn/G2WKNOfg2+3p U/UBT/mb4yAytkY2dgZpzLU1jfFd9JWDp8NRyVE3WWRVivQuazBSPIQFGdcDmO1XFGPJ HlR7Lq1fiAHv4GByoxf9Q5U/Cv8TMk5pG5REcCIhlhaKffB4FG6Pg/ZTw4VOvjMyJBy/ xo7D5NssD5tctLJ6MVqP3wrGUT30mGmbxdNptx4BegiXdlKnQLyg1AxESqtud8OM92s4 4P5xclJc4u4ZEX5yNz+3ige/lNpb0Qtn14YoebOwZzZ9we3NXcVox3DVKBGtD/teiY8c 5+QA== X-Gm-Message-State: ANhLgQ3kvVxVW4rTWv+j1c1HCTstK2Ay+8EntiKkrmaJwzz2DuwUtDqH vAqR4N0M3FPzya/5Q+ie7JmisrC3 X-Received: by 2002:a2e:9a0e:: with SMTP id o14mr2818777lji.63.1582994339307; Sat, 29 Feb 2020 08:38:59 -0800 (PST) Received: from [10.68.32.192] (broadband-188-32-48-208.ip.moscow.rt.ru. [188.32.48.208]) by smtp.gmail.com with ESMTPSA id 19sm7287556lfp.86.2020.02.29.08.38.57 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 29 Feb 2020 08:38:58 -0800 (PST) To: Willy Tarreau , Linus Torvalds Cc: Jens Axboe , linux-block@vger.kernel.org, linux-kernel@vger.kernel.org References: <20200224212352.8640-1-w@1wt.eu> <20200226080732.1913-1-w@1wt.eu> <20200226080732.1913-2-w@1wt.eu> 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 QEIlCTe5SO3h5sozpXeWS916VwwCuf8oov6706yC4MlmAqsQpBdoihQEA7zgh+pk10sCvviX FYM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jb 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 Subject: Re: [PATCH 12/16] floppy: remove incomplete support for second FDC from ARM code Message-ID: <5a753f4c-5e30-ccf9-ab26-a3a1a1d7ff4c@linux.com> Date: Sat, 29 Feb 2020 19:38:56 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <20200226080732.1913-2-w@1wt.eu> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 2/26/20 11:07 AM, Willy Tarreau wrote: > The ARM code was written with the apparent hope to one day support > a second FDC except that the code was incomplete and only touches > the first one, which is also reflected by N_FDC==1. However this > made its fd_outb() macro artificially depend on the global or local > "fdc" variable. > > Let's get rid of this and make it explicit it doesn't rely on this > variable anymore. > > Signed-off-by: Willy Tarreau > --- > arch/arm/include/asm/floppy.h | 11 +++++------ > 1 file changed, 5 insertions(+), 6 deletions(-) > > diff --git a/arch/arm/include/asm/floppy.h b/arch/arm/include/asm/floppy.h > index 4655652..f683953 100644 > --- a/arch/arm/include/asm/floppy.h > +++ b/arch/arm/include/asm/floppy.h > @@ -50,17 +50,16 @@ static inline int fd_dma_setup(void *data, unsigned int length, > * to a non-zero track, and then restoring it to track 0. If an error occurs, > * then there is no floppy drive present. [to be put back in again] > */ > -static unsigned char floppy_selects[2][4] = > +static unsigned char floppy_selects[4] = > { > { 0x10, 0x21, 0x23, 0x33 }, > - { 0x10, 0x21, 0x23, 0x33 } > }; > You need remove curly braces here, e.g. static unsigned char floppy_selects[4] = { 0x10, 0x21, 0x23, 0x33 }; > #define fd_setdor(dor) \ > do { \ > int new_dor = (dor); \ > if (new_dor & 0xf0) \ > - new_dor = (new_dor & 0x0c) | floppy_selects[fdc][new_dor & 3]; \ > + new_dor = (new_dor & 0x0c) | floppy_selects[new_dor & 3]; \ > else \ > new_dor &= 0x0c; \ > outb(new_dor, FD_DOR); \ > @@ -84,9 +83,9 @@ do { \ > */ > static void driveswap(int *ints, int dummy, int dummy2) > { > - floppy_selects[0][0] ^= floppy_selects[0][1]; > - floppy_selects[0][1] ^= floppy_selects[0][0]; > - floppy_selects[0][0] ^= floppy_selects[0][1]; > + floppy_selects[0] ^= floppy_selects[1]; > + floppy_selects[1] ^= floppy_selects[0]; > + floppy_selects[0] ^= floppy_selects[1]; What do you think about using swap macro (kernel.h) here? > } > > #define EXTRA_FLOPPY_PARAMS ,{ "driveswap", &driveswap, NULL, 0, 0 } > Denis