OSDN Git Service

block/swim: Rename macros to avoid inconsistent inverted logic
authorFinn Thain <fthain@telegraphics.com.au>
Thu, 12 Apr 2018 00:50:14 +0000 (20:50 -0400)
committerJens Axboe <axboe@kernel.dk>
Tue, 17 Apr 2018 03:49:35 +0000 (21:49 -0600)
commit56a1c5ee54f69dd767fb61d301883dc919ddc259
tree43a16181138097f465de8aee19a8cd31a5e92b54
parent8e2ab5a4efaac77fb93e5b5b109d0b3976fdd3a0
block/swim: Rename macros to avoid inconsistent inverted logic

The Sony drive status bits use active-low logic. The swim_readbit()
function converts that to 'C' logic for readability. Hence, the
sense of the names of the status bit macros should not be inverted.

Mostly they are correct. However, the TWOMEG_DRIVE, MFM_MODE and
TWOMEG_MEDIA macros have inverted sense (like MkLinux). Fix this
inconsistency and make the following patches less confusing.

The same problem affects swim3.c so fix that too.

No functional change.

The FDHD drive status bits are documented in sonydriv.cpp from MAME
and in swimiii.h from MkLinux.

Cc: Laurent Vivier <lvivier@redhat.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: linuxppc-dev@lists.ozlabs.org
Cc: Jens Axboe <axboe@kernel.dk>
Cc: stable@vger.kernel.org # v4.14+
Tested-by: Stan Johnson <userm57@yahoo.com>
Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Acked-by: Laurent Vivier <lvivier@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/swim.c
drivers/block/swim3.c