[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c181b184-1785-b221-76fa-4313bbada09d@linux.com>
Date: Tue, 25 Feb 2020 10:14:40 +0300
From: Denis Efremov <efremov@...ux.com>
To: Willy Tarreau <w@....eu>
Cc: Jens Axboe <axboe@...nel.dk>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
linux-block <linux-block@...r.kernel.org>,
Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: [PATCH 01/10] floppy: cleanup: expand macro FDCS
On 2/25/20 6:45 AM, Willy Tarreau wrote:
> 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.
Ok, I don't want to break in the middle of your changes in this case.
>
>>> 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.
>
I also have working hardware to test your changes with the previous patch.
However, double check is always welcome if you've got time for that. Please,
send patches on top of these ones.
Thanks,
Denis
Powered by blists - more mailing lists