Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp1543037ybf; Sun, 1 Mar 2020 11:58:10 -0800 (PST) X-Google-Smtp-Source: APXvYqw5h8XikmPG7WnzhvMMzq2ym6bk15n+O5uKbK0hBJSdSqCoRdFaoQaFckd2gUO9Ta9e4K4U X-Received: by 2002:a54:468b:: with SMTP id k11mr9135241oic.134.1583092690545; Sun, 01 Mar 2020 11:58:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583092690; cv=none; d=google.com; s=arc-20160816; b=T5e5WT4LqqEJVe5+p+Pui4a2EUabMISc52vW514Gn+lGKlyRHdkYVT2UhmAUKGbeIm cMrifJz7AlOKhBJWmvNZ7kqggRGpYPiSffx3MrzAAFv/Q/fY3vV+LO5n7oAU3zy5nwkd M8G2fxBCtY8ydWcfNXrh4GmjQysQNmFftSUukBPY6NrCEaRQyo0Z4Ua1ocsHsItJouu6 4IalgR7DhWE+MtiN8Gvev08hYC77SVz6vOV4WRC0GRKJCSU0LhvN5nKPuurHa9IgYJ7s JjnZDHu0h9fBP6vMkZbq7K6gyN99GeI0ivAONHSCktbqva767NfeMmXEve5ygf2WsNwq EUUA== 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=6Dh4TXvY3GFDth/j0BtCwv5TUI0mTKbOlzfvfuCq3XY=; b=fHg7JDgmIORUfRoez2+gJMMnKGxio6EQi3kdzex0RnNElwEIPOSP8EwcR7qbvi/Nfk bdYcrwsD6sghKKmmtbzzxp6hIabuyN1uvaV1m81MIWLAiziij4w/su0aZchzfUJDvFqf CM7vTruUSERhBtjb6F8NBxopWqnkq+xpwxjIKbMNJvjbKpPD/mOhikDtaqY4G4Dc2jCu 6neO0K/SRyITBd7l5h2YskGa23uBJ5FDVIyEwuIynwgymqGpgTWS4hPwWU/uWZhpCVZz i1zBHixTuNqhaFxaD4D2NVRhD/mTPwhZ7OcvNGxKaW1y7nokYa1QAY24dzDEa823De4f sTWQ== 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 j33si5149854ota.21.2020.03.01.11.57.58; Sun, 01 Mar 2020 11:58:10 -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 S1726954AbgCAT5L (ORCPT + 99 others); Sun, 1 Mar 2020 14:57:11 -0500 Received: from wtarreau.pck.nerim.net ([62.212.114.60]:32077 "EHLO 1wt.eu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726838AbgCAT5A (ORCPT ); Sun, 1 Mar 2020 14:57:00 -0500 Received: (from willy@localhost) by pcw.home.local (8.15.2/8.15.2/Submit) id 021Ju4XY011201; Sun, 1 Mar 2020 20:56:04 +0100 From: Willy Tarreau To: Denis Efremov Cc: Jens Axboe , linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, Willy Tarreau , Ian Molton , Russell King , Linus Torvalds Subject: [PATCH v2 1/6] floppy: remove dead code for drives scanning on ARM Date: Sun, 1 Mar 2020 20:55:50 +0100 Message-Id: <20200301195555.11154-2-w@1wt.eu> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20200301195555.11154-1-w@1wt.eu> References: <20200301195555.11154-1-w@1wt.eu> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On ARM, function fd_scandrives pre-dates Git era, is #ifed 0 out, not used, and cannot even compile since it references an fdc variable that's not declared anywhere (supposed to be the global one that we're turning to current_fdc apparently). There was also an ifdefde out include of mach/floppy.h that does not exist anymore either. Let's get rid of them since they complicate the fixing of the driver. Cc: Ian Molton Cc: Russell King Cc: Linus Torvalds Signed-off-by: Willy Tarreau --- arch/arm/include/asm/floppy.h | 51 ------------------------------------------- 1 file changed, 51 deletions(-) diff --git a/arch/arm/include/asm/floppy.h b/arch/arm/include/asm/floppy.h index f4fe4d0..4655652 100644 --- a/arch/arm/include/asm/floppy.h +++ b/arch/arm/include/asm/floppy.h @@ -8,9 +8,6 @@ */ #ifndef __ASM_ARM_FLOPPY_H #define __ASM_ARM_FLOPPY_H -#if 0 -#include -#endif #define fd_outb(val,port) \ do { \ @@ -69,54 +66,6 @@ do { \ outb(new_dor, FD_DOR); \ } while (0) -/* - * Someday, we'll automatically detect which drives are present... - */ -static inline void fd_scandrives (void) -{ -#if 0 - int floppy, drive_count; - - fd_disable_irq(); - raw_cmd = &default_raw_cmd; - raw_cmd->flags = FD_RAW_SPIN | FD_RAW_NEED_SEEK; - raw_cmd->track = 0; - raw_cmd->rate = ?; - drive_count = 0; - for (floppy = 0; floppy < 4; floppy ++) { - current_drive = drive_count; - /* - * Turn on floppy motor - */ - if (start_motor(redo_fd_request)) - continue; - /* - * Set up FDC - */ - fdc_specify(); - /* - * Tell FDC to recalibrate - */ - output_byte(FD_RECALIBRATE); - LAST_OUT(UNIT(floppy)); - /* wait for command to complete */ - if (!successful) { - int i; - for (i = drive_count; i < 3; i--) - floppy_selects[fdc][i] = floppy_selects[fdc][i + 1]; - floppy_selects[fdc][3] = 0; - floppy -= 1; - } else - drive_count++; - } -#else - floppy_selects[0][0] = 0x10; - floppy_selects[0][1] = 0x21; - floppy_selects[0][2] = 0x23; - floppy_selects[0][3] = 0x33; -#endif -} - #define FDC1 (0x3f0) #define FLOPPY0_TYPE 4 -- 2.9.0