Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp3170934ybv; Mon, 24 Feb 2020 19:47:02 -0800 (PST) X-Google-Smtp-Source: APXvYqz3ycadzMM+P5ofYWihRIufHmN4K/ckGXaiy2FEHl36OrrXNsa+J+q/2UhyUlLe/FRvjv8d X-Received: by 2002:aca:d502:: with SMTP id m2mr1819836oig.41.1582602421939; Mon, 24 Feb 2020 19:47:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582602421; cv=none; d=google.com; s=arc-20160816; b=ni54WNNw2LheP4/OCio9+2kI0/fAJaFJPpMnu0QHMWr81E2cX3kaQv5Qrdaee/Z5Qc UZVyuwlE5kpLo/CbAzrcABD4MlV1MIfQ2Y1Pmju+YPBpVuzUQhvszYG08Wh3rs/z8FG4 85BuvEL0DrbfEzfJ6PUm0jih8AIsRWf6c61V30udNk2m6lpUX11FUmk6wb1wt4L7Cfiv b1UodNQQ/gjS8af5TmBe/vwKnDIz0wPeSTzuGhmT6nkqirb7/XRTw+TgNFrejftgD4H6 6zmEiJIN8AXYPNMGf8nH43lojrZ3Wau/4GtZrqebBGturq2fwDECX9UmxTfY9iY+ubn8 RnQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=n19m3tiXcZOcoQN157YzVjonXF0hAdmGQ8bmvMPcuBk=; b=qDil/uig9hXyUqHNgYkTeI4TS8/kUBWBDgBD7nV1bqqm5vlZiMWEgpH/Ou7srXqku3 pXFG8hcbawr9//Pc1W2O3YJDpI7L22/2QQjsrrKxYG2iesJSXTK4xJMyJEIMk7JiA63y KjHFnpzMZUebTwSpNter9QllgrU9vuTz6Kwv9wqZPKZ3IpAoMvTp487GikCUybgDhXml 89ij2FuucZnwyMBbrwwxuiuafO/VdNC1pa4IC+SoTPTsanI1tGlKSsMEjo32bicEzwqo tPJB1ixVQh9m2WOJRJXLk+B3KluO3Ir9L/mQVnbpmwZDl3QqFfBO56wbS27WbdFnG9cj JGxw== 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 w2si7210008otq.31.2020.02.24.19.46.49; Mon, 24 Feb 2020 19:47:01 -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 S1728911AbgBYDpi (ORCPT + 99 others); Mon, 24 Feb 2020 22:45:38 -0500 Received: from wtarreau.pck.nerim.net ([62.212.114.60]:31503 "EHLO 1wt.eu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728903AbgBYDpi (ORCPT ); Mon, 24 Feb 2020 22:45:38 -0500 Received: (from willy@localhost) by pcw.home.local (8.15.2/8.15.2/Submit) id 01P3jTMA008979; Tue, 25 Feb 2020 04:45:29 +0100 Date: Tue, 25 Feb 2020 04:45:29 +0100 From: Willy Tarreau To: Denis Efremov Cc: Linus Torvalds , Jens Axboe , Linux Kernel Mailing List , linux-block Subject: Re: [PATCH 01/10] floppy: cleanup: expand macro FDCS Message-ID: <20200225034529.GA8908@1wt.eu> References: <20200224212352.8640-1-w@1wt.eu> <20200224212352.8640-2-w@1wt.eu> <28e72058-021d-6de0-477e-6038a10d96da@linux.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <28e72058-021d-6de0-477e-6038a10d96da@linux.com> User-Agent: Mutt/1.6.1 (2016-04-27) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 25, 2020 at 02:13:42AM +0300, Denis Efremov wrote: > On 2/25/20 12:53 AM, Linus Torvalds wrote: > > So I'd like to see that second step that does the > > > > -static int fdc; /* current fdc */ > > +static int current_fdc; > > > > change. > > > > We already call the global 'drive' variable 'current_drive', so it > > really is 'fdc' that is misnamed and ambiguous because it then has two > > different cases: the global 'fdc' and then the various shadowing local > > 'fdc' variables (or function arguments). > > > > Mind adding that too? Slightly less automatic, I agree, because then > > you really do have to disambiguate between the "is this the shadowed > > use of a local 'fdc'" case or the "this is the global 'fdc' use" case. I definitely agree. I first wanted to be sure the patches were acceptable as a principle, but disambiguating the variables is easy to do now. > > Can coccinelle do that? I could do it by hand, I did quite a bit of manual changes and checks already and the driver is not that long. > Willy, if you don't want to spend your time with this code anymore I can > prepare pat?hes for the second step. I know coccinelle and could try > to automate this transformation. At first sight your patches look > good to me. I will answer to the top email after more accurate review. OK, it's as you like. If you think you can do the change quickly, feel free to do so, otherwise it should not take me more than one hour. In any case as previously mentioned I still have the hardware in a usable state if you want me to recheck anything. Cheers, Willy