Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp4625039ybv; Wed, 26 Feb 2020 00:08:18 -0800 (PST) X-Google-Smtp-Source: APXvYqxznxXrpW7VoPRIk9sQFalUm+XfRbxeczLtO5fCgntGslhHyiaeyiztC70Lmrg9B0MKxkL6 X-Received: by 2002:a05:6830:1d8b:: with SMTP id y11mr2153705oti.4.1582704498090; Wed, 26 Feb 2020 00:08:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582704498; cv=none; d=google.com; s=arc-20160816; b=Qsm4N15nShOgSUv0vuSlSLX9BEwwIB7vVYgNpK98WRWz9tFt7NFWmaxdOwbbIoa1Hq I/49iiolKJeEPxF57nUpymm7cKkIvxAJULyA1E4bLTkCZCwewFj6U6ojgnHIaWGYE/fK ncjxSVGJqyn6AitvLiISdGea0rwm2A9Li0z4SNRez6drORfFjdbhY8WfKrZ0N8En/Y0g Q8WQ/99F81n5teer8iZ5kL/mWpSY9o1lVEiBO4TKamO6eWTIJ8eIfmUOzZe+7pYiYd/y UDtN0wEWA0wSRBldvjS1mryZo1MdROFfl0XXnWVAh6Bybrfzytan00k+SUQ4iTFQJ4It MLWw== 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=h7HDGi03zsX2v+A8wt4l0l2u/t7W0DQuCuV64bV5fqs=; b=QP5B6wzHHzebzsiphoPZYV1lByYmG5o0ea2eHCRcyU7ZxnXRnqer7GpcHN22Q+BCai kStZYEZw8n67esow/6PCrFplWvwntAW53arvaLJou8cmB6DOc1AVapt6+volk2zXHVN8 fmKDnSUl7dRtOrEsv7FrKhtIpt8toKzWo1x/bDz73Enak+1z8DkUG0mCfJBPYrK9KPFc ZB/XV936s/gY/Fs59YO4C27fSzCKhmL4HGflSAcuTyAGsvyf4n/VyzbxD1bmoU6f5/ad wgtIphV6iJS5gxlE3ipQduWyDwESStoJc6wGbr1pSSrvxkBPDneRb17BTkDxo5xNEKOV arJA== 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 z24si885413otm.135.2020.02.26.00.08.06; Wed, 26 Feb 2020 00:08:18 -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 S1727357AbgBZIH7 (ORCPT + 99 others); Wed, 26 Feb 2020 03:07:59 -0500 Received: from wtarreau.pck.nerim.net ([62.212.114.60]:31563 "EHLO 1wt.eu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727276AbgBZIH7 (ORCPT ); Wed, 26 Feb 2020 03:07:59 -0500 Received: (from willy@localhost) by pcw.home.local (8.15.2/8.15.2/Submit) id 01Q87i8Z001959; 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 11/16] floppy: remove dead code for drives scanning on ARM Date: Wed, 26 Feb 2020 09:07:27 +0100 Message-Id: <20200226080732.1913-1-w@1wt.eu> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20200224212352.8640-1-w@1wt.eu> References: <20200224212352.8640-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. 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