Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp446366ybb; Fri, 10 Apr 2020 03:22:06 -0700 (PDT) X-Google-Smtp-Source: APiQypIcJQ2oRM2z5zfmkZHGAspI+XjORBVEawvawg7Jr2vuIz4roBFFVINxNgqYkGaPI/UwlvQj X-Received: by 2002:a0c:ec47:: with SMTP id n7mr4293668qvq.209.1586514126439; Fri, 10 Apr 2020 03:22:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586514126; cv=none; d=google.com; s=arc-20160816; b=DS+6tEXQuUZ46oIag/ZINNjYOgfRKO08jb5HltOHbpXnHiI8tdrOtwNrZUQOtCKLGQ RtSdxA2oPWsQZOBq74eZ+ctUSFKmIY+rh1abZBNT5D655dggfkRvzmueoIH1+pmOGPM/ BuLYJhyhw071MI1dIMSimSraZXu7X/BOEZse702ShbT4LsDWeODf3l8CLi3DYMJwvYbg QD5Pfu1CYEPvTpeLWYvu84aaiyr2LTKTP0iMYHDpqx9DHE9GIguRWXLECeyuZFDv6/Z2 0hgBqAs1oPwHQS8vrY60t1pkF6CA01WNI7Tts4qRIItc7iAxXxKt+7wCO88K9zmCPaDa TcCQ== 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=38lsDuXEP3eIbzcCedOUQ4gA3ZGt5li2Z1QPgweirUk=; b=LulxygrN7LqbnG5vD38rry9blJo79K/dI9N7arwf6rUAs4TBiidBwL5kaX/m2NQXth bB3Po/xJEvBplPoGJS+Ef9T4ix9WUUa3NxrSMTxLcm+E/0NStzw49tWZgsQz7eka5yBn yLQJrKYrbvw3v8i8tC9NSiEnEPWjCL/cTRmZU7hI6HcRcvd06U7gkivEaD+Vm43wo4TN ZAng2AM2pFJsM4ysxDD5GxFjBNTcE/rCwsS4aHTssb4aIfdZzTGj9Qi60eyHfT28ljpQ rXu0BAZ1VCtS8+i0BYsXMRCzMI6C+flYsmLg+9HEdZuH1yrH6jbghyuvaF4jn+pxNagM fdnA== 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 m6si775092qvf.209.2020.04.10.03.21.51; Fri, 10 Apr 2020 03:22:06 -0700 (PDT) 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 S1726670AbgDJKTZ (ORCPT + 99 others); Fri, 10 Apr 2020 06:19:25 -0400 Received: from wtarreau.pck.nerim.net ([62.212.114.60]:34489 "EHLO 1wt.eu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725955AbgDJKTY (ORCPT ); Fri, 10 Apr 2020 06:19:24 -0400 Received: (from willy@localhost) by pcw.home.local (8.15.2/8.15.2/Submit) id 03AAJ90a014695; Fri, 10 Apr 2020 12:19:09 +0200 From: Willy Tarreau To: Denis Efremov Cc: Jens Axboe , linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, Willy Tarreau Subject: [PATCH 26/23] floppy: cleanup: get rid of current_reqD in favor of current_drive Date: Fri, 10 Apr 2020 12:19:03 +0200 Message-Id: <20200410101904.14652-2-w@1wt.eu> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20200410101904.14652-1-w@1wt.eu> References: <20200331094054.24441-23-w@1wt.eu> <20200410101904.14652-1-w@1wt.eu> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This macro equals -1 and is used as an alternative for current_drive when calling reschedule_timeout(), which in turn needs to remap it. This only adds obfuscation, let's simply use current_drive. Signed-off-by: Willy Tarreau --- drivers/block/floppy.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c index b102f55dfa5d..20646d4c5437 100644 --- a/drivers/block/floppy.c +++ b/drivers/block/floppy.c @@ -668,16 +668,12 @@ static struct output_log { static int output_log_pos; -#define current_reqD -1 #define MAXTIMEOUT -2 static void __reschedule_timeout(int drive, const char *message) { unsigned long delay; - if (drive == current_reqD) - drive = current_drive; - if (drive < 0 || drive >= N_DRIVE) { delay = 20UL * HZ; drive = 0; @@ -1960,7 +1956,7 @@ static void floppy_ready(void) static void floppy_start(void) { - reschedule_timeout(current_reqD, "floppy start"); + reschedule_timeout(current_drive, "floppy start"); scandrives(); debug_dcl(drive_params[current_drive].flags, @@ -2874,7 +2870,7 @@ static void redo_fd_request(void) } drive = (long)current_req->rq_disk->private_data; set_fdc(drive); - reschedule_timeout(current_reqD, "redo fd request"); + reschedule_timeout(current_drive, "redo fd request"); set_floppy(drive); raw_cmd = &default_raw_cmd; -- 2.20.1