Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp4625155ybv; Wed, 26 Feb 2020 00:08:25 -0800 (PST) X-Google-Smtp-Source: APXvYqxkRlylzlJ3RvCZAbxsL5Ewtpg8UAbksp3GITqvKIkr3ShlBgoWB25MLPvUYggpWfybWr0A X-Received: by 2002:a9d:784b:: with SMTP id c11mr1889185otm.246.1582704505772; Wed, 26 Feb 2020 00:08:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582704505; cv=none; d=google.com; s=arc-20160816; b=Mvd1YDznN+YvMuYzxxD6kKuc42knmCHHCjecDDjT7KTjgHVGQsbLi4nP2bbu4wag31 j/tgf4QSWuC+jYIFM3kR5QZX/k5rMFIdPWSx76zOb6fYYY1O155fxlHYavh2KFQX70Ob K4DfrPK0WAwDbnLesqg2Tp1AJ5g2g6HC6yCjwJA7gMEvyCEI7gNsND78J5X6641Aa9et B5nG8+RKfZblRAYxPiF0r8UTBhJqlh0JiAbayC/YjkxPbYWg9JY42zPo+bdfN6OLWnhj bMTRbWOYJTS3hwlJx7lpmXtu0vxIo7ApiMi/pyQ1OFOEg8/nucW8BtMhsdcrtqSZvsfb UZXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=RE/NxgaIc493LdxWKr5Lp8gJTyVFNeCgzyZsJ6DEXdw=; b=RMHKbXkwjkidY39PH8xf02LdL5vo1KipGoodT7hI39pC3GRNUfDDv8poHrD7uP2Gxb TD0y85Yj9qpF7NP4wlM28VMkPIIpC/bgZ+BrjuIICNClCoHBm8VC+3IVPV48gh348jlr 5EVw4wfJVz4HzwYzvcG7Vc9SMT2O1PzdOa1eWIwyIYTTeX3WsGo935ihtQK10FQScfz8 X8EIv6Vkqqd27NaVq7iuMqpZUDcfhY0kOWWieI9r1Dj5zXiCeo5m/41sNcbvaIHevj+v o3d0pXAKu3GtdAvFqKPvcOxSuZcM36hVQ6FjbbS723R6IcfMHK4ahx0XAPYKWG6b7dq9 t7Zw== 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 t25si821261oic.183.2020.02.26.00.08.13; Wed, 26 Feb 2020 00:08:25 -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 S1727483AbgBZIIE (ORCPT + 99 others); Wed, 26 Feb 2020 03:08:04 -0500 Received: from wtarreau.pck.nerim.net ([62.212.114.60]:31564 "EHLO 1wt.eu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727442AbgBZIID (ORCPT ); Wed, 26 Feb 2020 03:08:03 -0500 Received: (from willy@localhost) by pcw.home.local (8.15.2/8.15.2/Submit) id 01Q87iE5001960; Wed, 26 Feb 2020 09:07:44 +0100 From: Willy Tarreau To: Denis Efremov , Linus Torvalds Cc: Jens Axboe , linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, Willy Tarreau Subject: [PATCH 12/16] floppy: remove incomplete support for second FDC from ARM code Date: Wed, 26 Feb 2020 09:07:28 +0100 Message-Id: <20200226080732.1913-2-w@1wt.eu> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20200226080732.1913-1-w@1wt.eu> References: <20200224212352.8640-1-w@1wt.eu> <20200226080732.1913-1-w@1wt.eu> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 } }; #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]; } #define EXTRA_FLOPPY_PARAMS ,{ "driveswap", &driveswap, NULL, 0, 0 } -- 2.9.0