Skip to content

scsi/NCR5380: fix debugging macros and #include structure

Finn Thain linux-arm-kernel linux-m68k linux-scsi lkml 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest12 patches 9 repliesIn review
  2. v112 patches 14 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/12scsi/NCR5380: remove unused BOARD_NORMAL and BOARD_NCR53C400drivers/scsi/arm/cumana_1.c drivers/scsi/arm/oak.c drivers/scsi/mac_scsi.h +1 more+0 -120 replies
2/12scsi/NCR5380: remove redundant HOSTS_C macro testsdrivers/scsi/g_NCR5380.h drivers/scsi/mac_scsi.h drivers/scsi/pas16.h +2 more+0 -150 replies
3/12scsi/NCR5380: remove old CVS keywordsdrivers/scsi/NCR5380.c drivers/scsi/NCR5380.h drivers/scsi/g_NCR5380.c +7 more+0 -380 replies
4/12scsi/NCR5380: use NCR5380_dprint() instead of NCR5380_print()drivers/scsi/sun3_scsi.c+1 -30 replies
5/12scsi/NCR5380: fix build failures when debugging is enableddrivers/scsi/NCR5380.c drivers/scsi/sun3_NCR5380.c+10 -140 replies
6/12scsi/NCR5380: fix dprintk macro usage and definitiondrivers/scsi/NCR5380.c drivers/scsi/NCR5380.h drivers/scsi/sun3_NCR5380.c+67 -670 replies
7/12scsi/NCR5380: adopt NCR5380_dprint() and NCR5380_dprint_phase()drivers/scsi/atari_NCR5380.c drivers/scsi/sun3_NCR5380.c+22 -221 reply
8/12scsi/NCR5380: adopt dprintk()drivers/scsi/atari_NCR5380.c drivers/scsi/atari_scsi.c drivers/scsi/sun3_NCR5380.c+134 -1341 reply
9/12scsi/NCR5380: fix and standardize NDEBUG macrosdrivers/scsi/NCR5380.c drivers/scsi/NCR5380.h drivers/scsi/atari_NCR5380.c +6 more+20 -550 replies
10/12scsi/NCR5380: remove unused macro definitionsdrivers/scsi/atari_scsi.h drivers/scsi/sun3_scsi.h+0 -2741 reply
11/12scsi/NCR5380: reduce depth of sun3_scsi nested includesdrivers/scsi/sun3_scsi.c drivers/scsi/sun3_scsi.h drivers/scsi/sun3_scsi_vme.c+5 -50 replies
12/12scsi/NCR5380: merge sun3_scsi_vme.c into sun3_scsi.cdrivers/scsi/sun3_scsi.c drivers/scsi/sun3_scsi_vme.c+171 -6340 replies

Reviews trailers per patch

3 of 12 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchSam CreaseyMichael Schmitz
SeriesA-b
1/12
2/12
3/12
4/12
5/12
6/12
7/12A-b
8/12A-b
9/12
10/12A-b
11/12
12/12

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 00/12] scsi/NCR5380: fix debugging macros and #include structure

This patch series addresses several issues with NCR5380 drivers:

1. The complex network of #include directives.

2. Three inconsistent implementations of the core driver all attempting to share the same macro definitions in NCR5380.h.

3. Broken debugging code.

In the past these issues have led to compiler warnings and ugly hacks to fix build failures.

This patch series fixes the debugging code by reducing the divergence between the various core driver implementations.

The final two patches in the series further reduce divergence by refactoring sun3_scsi.c and sun3_scsi_vme.c so that they follow the same structure as the other NCR5380 drivers.

By the end of this patch series over 800 net lines of code have been removed. This is mostly duplicated code that's easily eliminated once the debugging code is made consistent (and some dead code is removed).

Better uniformity and less duplication should assist future work such as modernization and trivial clean-up.

To make code review easier I've tried to keep these patches succinct and free of extraneous changes. Though I did run checkpatch.pl, I've ignored whitespace issues in existing code. I will send separate patches for whitespace clean-up of NCR5380 drivers.

All NCR5380 drivers have been compile-tested with this patch series:
arm/cumana_1.c
arm/oak.c
atari_scsi.c
dmx3191d.c
dtc.c
g_NCR5380.c
g_NCR5380_mmio.c
mac_scsi.c
pas16.c
sun3_scsi.c
sun3_scsi_vme.c
t128.c

I've successfully regression tested this patch series using mac_scsi on a PowerBook 180. The debugging macros are now usable again.