linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/23] Floppy driver cleanups
@ 2020-03-31  9:40 Willy Tarreau
  2020-03-31  9:40 ` [PATCH 01/23] floppy: split the base port from the register in I/O accesses Willy Tarreau
                   ` (24 more replies)
  0 siblings, 25 replies; 42+ messages in thread
From: Willy Tarreau @ 2020-03-31  9:40 UTC (permalink / raw)
  To: Denis Efremov
  Cc: Jens Axboe, linux-block, linux-kernel, Willy Tarreau,
	David S. Miller, Benjamin Herrenschmidt, Geert Uytterhoeven,
	Helge Deller, Ian Molton, Ivan Kokshaysky, Matt Turner,
	Richard Henderson, Russell King, Thomas Bogendoerfer, x86

This series applies a second batch of cleanups to the floppy driver and
its multiple arch-specific parts. Here the focus was on getting rid of
hard-coded registers and flags values to switch to their symbolic
definitions instead, and on making use of the global current_fdc variable
much more explicit throughout the code to reduce the risk of accidental
misuse as was the case with the most recently fixed bug.

Note that this code base is very old and the purpose is not to rewrite
nor reorganize the driver at all, but instead to make certain things
more obvious while keeping changes reviewable. It does not even address
style issues that make checkpatch continue to complain a little bit (15
total warnings which were already there and don't seem worth addressing
without more careful testing). Some comments were added to document a
few non-obvious assumptions though.

This series was rediffed against today's master (458ef2a25e0c) which
contains the first series. The changes were tested on x86 with real
hardware, and was build-tested on ARM.

Willy Tarreau (23):
  floppy: split the base port from the register in I/O accesses
  floppy: add references to 82077's extra registers
  floppy: use symbolic register names in the m68k port
  floppy: use symbolic register names in the parisc port
  floppy: use symbolic register names in the powerpc port
  floppy: use symbolic register names in the sparc32 port
  floppy: use symbolic register names in the sparc64 port
  floppy: use symbolic register names in the x86 port
  floppy: cleanup: make twaddle() not rely on current_{fdc,drive}
    anymore
  floppy: cleanup: make reset_fdc_info() not rely on current_fdc anymore
  floppy: cleanup: make show_floppy() not rely on current_fdc anymore
  floppy: cleanup: make wait_til_ready() not rely on current_fdc anymore
  floppy: cleanup: make output_byte() not rely on current_fdc anymore
  floppy: cleanup: make result() not rely on current_fdc anymore
  floppy: cleanup: make need_more_output() not rely on current_fdc
    anymore
  floppy: cleanup: make perpendicular_mode() not rely on current_fdc
    anymore
  floppy: cleanup: make fdc_configure() not rely on current_fdc anymore
  floppy: cleanup: make fdc_specify() not rely on current_{fdc,drive}
    anymore
  floppy: cleanup: make check_wp() not rely on current_{fdc,drive}
    anymore
  floppy: cleanup: make next_valid_format() not rely on current_drive
    anymore
  floppy: cleanup: make get_fdc_version() not rely on current_fdc
    anymore
  floppy: cleanup: do not iterate on current_fdc in DMA grab/release
    functions
  floppy: cleanup: add a few comments about expectations in certain
    functions

 arch/alpha/include/asm/floppy.h             |   4 +-
 arch/arm/include/asm/floppy.h               |   8 +-
 arch/m68k/include/asm/floppy.h              |  27 +-
 arch/mips/include/asm/mach-generic/floppy.h |   8 +-
 arch/mips/include/asm/mach-jazz/floppy.h    |   8 +-
 arch/parisc/include/asm/floppy.h            |  19 +-
 arch/powerpc/include/asm/floppy.h           |  19 +-
 arch/sparc/include/asm/floppy_32.h          |  50 +--
 arch/sparc/include/asm/floppy_64.h          |  59 ++--
 arch/x86/include/asm/floppy.h               |  19 +-
 drivers/block/floppy.c                      | 330 ++++++++++----------
 include/uapi/linux/fdreg.h                  |  16 +-
 12 files changed, 299 insertions(+), 268 deletions(-)

Cc: "David S. Miller" <davem@davemloft.net>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Helge Deller <deller@gmx.de>
Cc: Ian Molton <spyro@f2s.com>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Matt Turner <mattst88@gmail.com>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: x86@kernel.org
-- 
2.20.1


^ permalink raw reply	[flat|nested] 42+ messages in thread

end of thread, other threads:[~2020-04-21 13:15 UTC | newest]

Thread overview: 42+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-31  9:40 [PATCH 00/23] Floppy driver cleanups Willy Tarreau
2020-03-31  9:40 ` [PATCH 01/23] floppy: split the base port from the register in I/O accesses Willy Tarreau
2020-03-31  9:40 ` [PATCH 02/23] floppy: add references to 82077's extra registers Willy Tarreau
2020-03-31  9:40 ` [PATCH 03/23] floppy: use symbolic register names in the m68k port Willy Tarreau
2020-03-31  9:40 ` [PATCH 04/23] floppy: use symbolic register names in the parisc port Willy Tarreau
2020-03-31  9:40 ` [PATCH 05/23] floppy: use symbolic register names in the powerpc port Willy Tarreau
2020-03-31  9:40 ` [PATCH 06/23] floppy: use symbolic register names in the sparc32 port Willy Tarreau
2020-03-31  9:40 ` [PATCH 07/23] floppy: use symbolic register names in the sparc64 port Willy Tarreau
2020-04-14  9:20   ` Denis Efremov
2020-03-31  9:40 ` [PATCH 08/23] floppy: use symbolic register names in the x86 port Willy Tarreau
2020-03-31  9:40 ` [PATCH 09/23] floppy: cleanup: make twaddle() not rely on current_{fdc,drive} anymore Willy Tarreau
2020-03-31  9:40 ` [PATCH 10/23] floppy: cleanup: make reset_fdc_info() not rely on current_fdc anymore Willy Tarreau
2020-03-31  9:40 ` [PATCH 11/23] floppy: cleanup: make show_floppy() " Willy Tarreau
2020-03-31  9:40 ` [PATCH 12/23] floppy: cleanup: make wait_til_ready() " Willy Tarreau
2020-03-31  9:40 ` [PATCH 13/23] floppy: cleanup: make output_byte() " Willy Tarreau
2020-03-31  9:40 ` [PATCH 14/23] floppy: cleanup: make result() " Willy Tarreau
2020-03-31  9:40 ` [PATCH 15/23] floppy: cleanup: make need_more_output() " Willy Tarreau
2020-03-31  9:40 ` [PATCH 16/23] floppy: cleanup: make perpendicular_mode() " Willy Tarreau
2020-03-31  9:40 ` [PATCH 17/23] floppy: cleanup: make fdc_configure() " Willy Tarreau
2020-03-31  9:40 ` [PATCH 18/23] floppy: cleanup: make fdc_specify() not rely on current_{fdc,drive} anymore Willy Tarreau
2020-03-31  9:40 ` [PATCH 19/23] floppy: cleanup: make check_wp() " Willy Tarreau
2020-03-31  9:40 ` [PATCH 20/23] floppy: cleanup: make next_valid_format() not rely on current_drive anymore Willy Tarreau
2020-03-31  9:40 ` [PATCH 21/23] floppy: cleanup: make get_fdc_version() not rely on current_fdc anymore Willy Tarreau
2020-03-31  9:40 ` [PATCH 22/23] floppy: cleanup: do not iterate on current_fdc in DMA grab/release functions Willy Tarreau
2020-04-10  8:35   ` Denis Efremov
2020-04-10  8:45     ` Willy Tarreau
2020-04-10  8:48       ` Denis Efremov
2020-04-10  9:32         ` Willy Tarreau
2020-04-10  9:30   ` [PATCH 24/23] floppy: cleanup: do not iterate on current_fdc in do_floppy_init() Willy Tarreau
2020-04-10 10:19   ` [PATCH 25/23] floppy: make sure to reset all FDCs upon resume() Willy Tarreau
2020-04-10 10:19     ` [PATCH 26/23] floppy: cleanup: get rid of current_reqD in favor of current_drive Willy Tarreau
2020-04-10 10:19     ` [PATCH 27/23] floppy: cleanup: make set_fdc() always set current_drive and current_fd Willy Tarreau
2020-03-31  9:40 ` [PATCH 23/23] floppy: cleanup: add a few comments about expectations in certain functions Willy Tarreau
2020-03-31 10:10 ` [PATCH 00/23] Floppy driver cleanups Christoph Hellwig
2020-03-31 11:01   ` Willy Tarreau
2020-03-31 15:28     ` Christoph Hellwig
2020-03-31 15:49       ` Willy Tarreau
2020-04-13 22:46 ` Jens Axboe
2020-04-14  5:31   ` Willy Tarreau
2020-04-14 10:29     ` Denis Efremov
2020-04-14 16:12       ` Willy Tarreau
2020-04-21 13:15         ` Denis Efremov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).