[PATCH 04/10] staging: unisys: fix all logical continuation virthba
This patch fixes all logical continuations issues in virthba.c v2: fixed spacing around bitwise operator suggested by dan carpenter Signed-off-by: Erik Arfvidson erik.arfvid...@unisys.com --- drivers/staging/unisys/virthba/virthba.c | 44 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/drivers/staging/unisys/virthba/virthba.c b/drivers/staging/unisys/virthba/virthba.c index f30ef08..ee379b7 100644 --- a/drivers/staging/unisys/virthba/virthba.c +++ b/drivers/staging/unisys/virthba/virthba.c @@ -430,11 +430,11 @@ virthba_ISR(int irq, void *dev_id) return IRQ_NONE; virthbainfo-interrupts_rcvd++; pChannelHeader = virthbainfo-chinfo.queueinfo-chan; - if (((readq(pChannelHeader-features) - ULTRA_IO_IOVM_IS_OK_WITH_DRIVER_DISABLING_INTS) != 0) -((readq(pChannelHeader-features) -ULTRA_IO_DRIVER_DISABLES_INTS) != - 0)) { + if (((readq(pChannelHeader-features) + ULTRA_IO_IOVM_IS_OK_WITH_DRIVER_DISABLING_INTS) != 0) + ((readq(pChannelHeader-features) + ULTRA_IO_DRIVER_DISABLES_INTS) != +0)) { virthbainfo-interrupts_disabled++; mask = ~ULTRA_CHANNEL_ENABLE_INTS; rc1 = uisqueue_interlocked_and(virthbainfo-flags_addr, mask); @@ -809,9 +809,9 @@ virthba_abort_handler(struct scsi_cmnd *scsicmd) scsidev = scsicmd-device; for (vdisk = ((struct virthba_info *)scsidev-host-hostdata)-head; vdisk-next; vdisk = vdisk-next) { - if ((scsidev-channel == vdisk-channel) -(scsidev-id == vdisk-id) -(scsidev-lun == vdisk-lun)) { + if ((scsidev-channel == vdisk-channel) + (scsidev-id == vdisk-id) + (scsidev-lun == vdisk-lun)) { if (atomic_read(vdisk-error_count) VIRTHBA_ERROR_COUNT) { atomic_inc(vdisk-error_count); @@ -835,9 +835,9 @@ virthba_bus_reset_handler(struct scsi_cmnd *scsicmd) scsidev = scsicmd-device; for (vdisk = ((struct virthba_info *)scsidev-host-hostdata)-head; vdisk-next; vdisk = vdisk-next) { - if ((scsidev-channel == vdisk-channel) -(scsidev-id == vdisk-id) -(scsidev-lun == vdisk-lun)) { + if ((scsidev-channel == vdisk-channel) + (scsidev-id == vdisk-id) + (scsidev-lun == vdisk-lun)) { if (atomic_read(vdisk-error_count) VIRTHBA_ERROR_COUNT) { atomic_inc(vdisk-error_count); @@ -861,9 +861,9 @@ virthba_device_reset_handler(struct scsi_cmnd *scsicmd) scsidev = scsicmd-device; for (vdisk = ((struct virthba_info *)scsidev-host-hostdata)-head; vdisk-next; vdisk = vdisk-next) { - if ((scsidev-channel == vdisk-channel) -(scsidev-id == vdisk-id) -(scsidev-lun == vdisk-lun)) { + if ((scsidev-channel == vdisk-channel) + (scsidev-id == vdisk-id) + (scsidev-lun == vdisk-lun)) { if (atomic_read(vdisk-error_count) VIRTHBA_ERROR_COUNT) { atomic_inc(vdisk-error_count); @@ -1132,9 +1132,9 @@ do_scsi_linuxstat(struct uiscmdrsp *cmdrsp, struct scsi_cmnd *scsicmd) /* Okay see what our error_count is here */ for (vdisk = ((struct virthba_info *)scsidev-host-hostdata)-head; vdisk-next; vdisk = vdisk-next) { - if ((scsidev-channel != vdisk-channel) - || (scsidev-id != vdisk-id) - || (scsidev-lun != vdisk-lun)) + if ((scsidev-channel != vdisk-channel) || + (scsidev-id != vdisk-id) || + (scsidev-lun != vdisk-lun)) continue; if (atomic_read(vdisk-error_count) VIRTHBA_ERROR_COUNT) { @@ -1170,8 +1170,8 @@ do_scsi_nolinuxstat(struct uiscmdrsp *cmdrsp, struct scsi_cmnd *scsicmd) struct virtdisk_info *vdisk; scsidev = scsicmd-device; - if ((cmdrsp-scsi.cmnd[0] == INQUIRY) -(cmdrsp-scsi.bufflen = MIN_INQUIRY_RESULT_LEN)) { + if ((cmdrsp-scsi.cmnd[0] == INQUIRY) + (cmdrsp-scsi.bufflen = MIN_INQUIRY_RESULT_LEN)) { if (cmdrsp-scsi.no_disk_result == 0) return; @@ -1210,9 +1210,9 @@ do_scsi_nolinuxstat(struct uiscmdrsp *cmdrsp, struct scsi_cmnd *scsicmd) } else { vdisk = ((struct virthba_info *)scsidev-host-hostdata)-head; for ( ; vdisk-next; vdisk = vdisk-next) { - if ((scsidev-channel != vdisk-channel) - ||
Re: [PATCH 04/10] staging: unisys: fix all logical continuation virthba
On Mon, Oct 27, 2014 at 05:14:02PM -0400, Erik Arfvidson wrote: This patch fixes all logical continuations issues in virthba.c Signed-off-by: Erik Arfvidson erik.arfvid...@unisys.com --- drivers/staging/unisys/virthba/virthba.c | 42 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/drivers/staging/unisys/virthba/virthba.c b/drivers/staging/unisys/virthba/virthba.c index 6c0ee48..73a7307 100644 --- a/drivers/staging/unisys/virthba/virthba.c +++ b/drivers/staging/unisys/virthba/virthba.c @@ -431,10 +431,10 @@ virthba_ISR(int irq, void *dev_id) virthbainfo-interrupts_rcvd++; pChannelHeader = virthbainfo-chinfo.queueinfo-chan; if (((readq(pChannelHeader-Features) -ULTRA_IO_IOVM_IS_OK_WITH_DRIVER_DISABLING_INTS) != 0) - ((readq(pChannelHeader-Features) - ULTRA_IO_DRIVER_DISABLES_INTS) != - 0)) { + ULTRA_IO_IOVM_IS_OK_WITH_DRIVER_DISABLING_INTS) != 0) This isn't right. foo means address. foo means bitwise AND. != 0 doesn't add anything here. When you have if (strcmp(a, b) != 0) that's idiomatic and the != means a != b. When you are talking about the number zero then not equal to zero can be appropriate. But in this case it's just a double negative that makes the code slightly not easier to understand. The ULTRA_IO_IOVM_IS_OK_WITH_DRIVER_DISABLING_INTS is clown shoes name. It's silly long. Also the last should be a logical . You can fix this stuff up in a later patch since it doesn't have to do with whitespace. TODO-list: 2014-10-28: unisys: various style issues regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 04/10] staging: unisys: fix all logical continuation virthba
This patch fixes all logical continuations issues in virthba.c v2: fixed spacing around bitwise operator suggested by dan carpenter Signed-off-by: Erik Arfvidson erik.arfvid...@unisys.com --- drivers/staging/unisys/virthba/virthba.c | 44 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/drivers/staging/unisys/virthba/virthba.c b/drivers/staging/unisys/virthba/virthba.c index f30ef08..ee379b7 100644 --- a/drivers/staging/unisys/virthba/virthba.c +++ b/drivers/staging/unisys/virthba/virthba.c @@ -430,11 +430,11 @@ virthba_ISR(int irq, void *dev_id) return IRQ_NONE; virthbainfo-interrupts_rcvd++; pChannelHeader = virthbainfo-chinfo.queueinfo-chan; - if (((readq(pChannelHeader-features) - ULTRA_IO_IOVM_IS_OK_WITH_DRIVER_DISABLING_INTS) != 0) -((readq(pChannelHeader-features) -ULTRA_IO_DRIVER_DISABLES_INTS) != - 0)) { + if (((readq(pChannelHeader-features) + ULTRA_IO_IOVM_IS_OK_WITH_DRIVER_DISABLING_INTS) != 0) + ((readq(pChannelHeader-features) + ULTRA_IO_DRIVER_DISABLES_INTS) != +0)) { virthbainfo-interrupts_disabled++; mask = ~ULTRA_CHANNEL_ENABLE_INTS; rc1 = uisqueue_interlocked_and(virthbainfo-flags_addr, mask); @@ -809,9 +809,9 @@ virthba_abort_handler(struct scsi_cmnd *scsicmd) scsidev = scsicmd-device; for (vdisk = ((struct virthba_info *)scsidev-host-hostdata)-head; vdisk-next; vdisk = vdisk-next) { - if ((scsidev-channel == vdisk-channel) -(scsidev-id == vdisk-id) -(scsidev-lun == vdisk-lun)) { + if ((scsidev-channel == vdisk-channel) + (scsidev-id == vdisk-id) + (scsidev-lun == vdisk-lun)) { if (atomic_read(vdisk-error_count) VIRTHBA_ERROR_COUNT) { atomic_inc(vdisk-error_count); @@ -835,9 +835,9 @@ virthba_bus_reset_handler(struct scsi_cmnd *scsicmd) scsidev = scsicmd-device; for (vdisk = ((struct virthba_info *)scsidev-host-hostdata)-head; vdisk-next; vdisk = vdisk-next) { - if ((scsidev-channel == vdisk-channel) -(scsidev-id == vdisk-id) -(scsidev-lun == vdisk-lun)) { + if ((scsidev-channel == vdisk-channel) + (scsidev-id == vdisk-id) + (scsidev-lun == vdisk-lun)) { if (atomic_read(vdisk-error_count) VIRTHBA_ERROR_COUNT) { atomic_inc(vdisk-error_count); @@ -861,9 +861,9 @@ virthba_device_reset_handler(struct scsi_cmnd *scsicmd) scsidev = scsicmd-device; for (vdisk = ((struct virthba_info *)scsidev-host-hostdata)-head; vdisk-next; vdisk = vdisk-next) { - if ((scsidev-channel == vdisk-channel) -(scsidev-id == vdisk-id) -(scsidev-lun == vdisk-lun)) { + if ((scsidev-channel == vdisk-channel) + (scsidev-id == vdisk-id) + (scsidev-lun == vdisk-lun)) { if (atomic_read(vdisk-error_count) VIRTHBA_ERROR_COUNT) { atomic_inc(vdisk-error_count); @@ -1132,9 +1132,9 @@ do_scsi_linuxstat(struct uiscmdrsp *cmdrsp, struct scsi_cmnd *scsicmd) /* Okay see what our error_count is here */ for (vdisk = ((struct virthba_info *)scsidev-host-hostdata)-head; vdisk-next; vdisk = vdisk-next) { - if ((scsidev-channel != vdisk-channel) - || (scsidev-id != vdisk-id) - || (scsidev-lun != vdisk-lun)) + if ((scsidev-channel != vdisk-channel) || + (scsidev-id != vdisk-id) || + (scsidev-lun != vdisk-lun)) continue; if (atomic_read(vdisk-error_count) VIRTHBA_ERROR_COUNT) { @@ -1170,8 +1170,8 @@ do_scsi_nolinuxstat(struct uiscmdrsp *cmdrsp, struct scsi_cmnd *scsicmd) struct virtdisk_info *vdisk; scsidev = scsicmd-device; - if ((cmdrsp-scsi.cmnd[0] == INQUIRY) -(cmdrsp-scsi.bufflen = MIN_INQUIRY_RESULT_LEN)) { + if ((cmdrsp-scsi.cmnd[0] == INQUIRY) + (cmdrsp-scsi.bufflen = MIN_INQUIRY_RESULT_LEN)) { if (cmdrsp-scsi.no_disk_result == 0) return; @@ -1210,9 +1210,9 @@ do_scsi_nolinuxstat(struct uiscmdrsp *cmdrsp, struct scsi_cmnd *scsicmd) } else { vdisk = ((struct virthba_info *)scsidev-host-hostdata)-head; for ( ; vdisk-next; vdisk = vdisk-next) { - if ((scsidev-channel != vdisk-channel) - ||
Re: [PATCH 04/10] staging: unisys: fix all logical continuation virthba
On Tue, Oct 28, 2014 at 06:42:40PM -0400, Erik Arfvidson wrote: This patch fixes all logical continuations issues in virthba.c v2: fixed spacing around bitwise operator suggested by dan carpenter I said was ok with this stuff to be fixed in a later patch. It slows you down to redo everything and it's not like a missing space character will ruin it forever. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 04/10] staging: unisys: fix all logical continuation virthba
This patch fixes all logical continuations issues in virthba.c Signed-off-by: Erik Arfvidson erik.arfvid...@unisys.com --- drivers/staging/unisys/virthba/virthba.c | 42 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/drivers/staging/unisys/virthba/virthba.c b/drivers/staging/unisys/virthba/virthba.c index 6c0ee48..73a7307 100644 --- a/drivers/staging/unisys/virthba/virthba.c +++ b/drivers/staging/unisys/virthba/virthba.c @@ -431,10 +431,10 @@ virthba_ISR(int irq, void *dev_id) virthbainfo-interrupts_rcvd++; pChannelHeader = virthbainfo-chinfo.queueinfo-chan; if (((readq(pChannelHeader-Features) - ULTRA_IO_IOVM_IS_OK_WITH_DRIVER_DISABLING_INTS) != 0) -((readq(pChannelHeader-Features) -ULTRA_IO_DRIVER_DISABLES_INTS) != - 0)) { + ULTRA_IO_IOVM_IS_OK_WITH_DRIVER_DISABLING_INTS) != 0) + ((readq(pChannelHeader-Features) + ULTRA_IO_DRIVER_DISABLES_INTS) != +0)) { virthbainfo-interrupts_disabled++; mask = ~ULTRA_CHANNEL_ENABLE_INTS; rc1 = uisqueue_interlocked_and(virthbainfo-flags_addr, mask); @@ -808,9 +808,9 @@ virthba_abort_handler(struct scsi_cmnd *scsicmd) scsidev = scsicmd-device; for (vdisk = ((struct virthba_info *)scsidev-host-hostdata)-head; vdisk-next; vdisk = vdisk-next) { - if ((scsidev-channel == vdisk-channel) -(scsidev-id == vdisk-id) -(scsidev-lun == vdisk-lun)) { + if ((scsidev-channel == vdisk-channel) + (scsidev-id == vdisk-id) + (scsidev-lun == vdisk-lun)) { if (atomic_read(vdisk-error_count) VIRTHBA_ERROR_COUNT) { atomic_inc(vdisk-error_count); @@ -834,9 +834,9 @@ virthba_bus_reset_handler(struct scsi_cmnd *scsicmd) scsidev = scsicmd-device; for (vdisk = ((struct virthba_info *)scsidev-host-hostdata)-head; vdisk-next; vdisk = vdisk-next) { - if ((scsidev-channel == vdisk-channel) -(scsidev-id == vdisk-id) -(scsidev-lun == vdisk-lun)) { + if ((scsidev-channel == vdisk-channel) + (scsidev-id == vdisk-id) + (scsidev-lun == vdisk-lun)) { if (atomic_read(vdisk-error_count) VIRTHBA_ERROR_COUNT) { atomic_inc(vdisk-error_count); @@ -860,9 +860,9 @@ virthba_device_reset_handler(struct scsi_cmnd *scsicmd) scsidev = scsicmd-device; for (vdisk = ((struct virthba_info *)scsidev-host-hostdata)-head; vdisk-next; vdisk = vdisk-next) { - if ((scsidev-channel == vdisk-channel) -(scsidev-id == vdisk-id) -(scsidev-lun == vdisk-lun)) { + if ((scsidev-channel == vdisk-channel) + (scsidev-id == vdisk-id) + (scsidev-lun == vdisk-lun)) { if (atomic_read(vdisk-error_count) VIRTHBA_ERROR_COUNT) { atomic_inc(vdisk-error_count); @@ -1131,9 +1131,9 @@ do_scsi_linuxstat(struct uiscmdrsp *cmdrsp, struct scsi_cmnd *scsicmd) /* Okay see what our error_count is here */ for (vdisk = ((struct virthba_info *)scsidev-host-hostdata)-head; vdisk-next; vdisk = vdisk-next) { - if ((scsidev-channel != vdisk-channel) - || (scsidev-id != vdisk-id) - || (scsidev-lun != vdisk-lun)) + if ((scsidev-channel != vdisk-channel) || + (scsidev-id != vdisk-id) || + (scsidev-lun != vdisk-lun)) continue; if (atomic_read(vdisk-error_count) VIRTHBA_ERROR_COUNT) { @@ -1169,8 +1169,8 @@ do_scsi_nolinuxstat(struct uiscmdrsp *cmdrsp, struct scsi_cmnd *scsicmd) struct virtdisk_info *vdisk; scsidev = scsicmd-device; - if ((cmdrsp-scsi.cmnd[0] == INQUIRY) -(cmdrsp-scsi.bufflen = MIN_INQUIRY_RESULT_LEN)) { + if ((cmdrsp-scsi.cmnd[0] == INQUIRY) + (cmdrsp-scsi.bufflen = MIN_INQUIRY_RESULT_LEN)) { if (cmdrsp-scsi.no_disk_result == 0) return; @@ -1209,9 +1209,9 @@ do_scsi_nolinuxstat(struct uiscmdrsp *cmdrsp, struct scsi_cmnd *scsicmd) } else { vdisk = ((struct virthba_info *)scsidev-host-hostdata)-head; for ( ; vdisk-next; vdisk = vdisk-next) { - if ((scsidev-channel != vdisk-channel) - || (scsidev-id != vdisk-id) - || (scsidev-lun != vdisk-lun)) + if ((scsidev-channel != vdisk-channel)
[PATCH 04/10] staging: unisys: fix all logical continuation virthba
This patch fixes all logical continuations issues in virthba.c Signed-off-by: Erik Arfvidson erik.arfvid...@unisys.com Signed-off-by: Benjamin Romer benjamin.ro...@unisys.com --- drivers/staging/unisys/virthba/virthba.c | 42 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/drivers/staging/unisys/virthba/virthba.c b/drivers/staging/unisys/virthba/virthba.c index 1f19a98..02c7ac1 100644 --- a/drivers/staging/unisys/virthba/virthba.c +++ b/drivers/staging/unisys/virthba/virthba.c @@ -433,10 +433,10 @@ virthba_ISR(int irq, void *dev_id) virthbainfo-interrupts_rcvd++; pChannelHeader = virthbainfo-chinfo.queueinfo-chan; if (((readq(pChannelHeader-Features) - ULTRA_IO_IOVM_IS_OK_WITH_DRIVER_DISABLING_INTS) != 0) -((readq(pChannelHeader-Features) -ULTRA_IO_DRIVER_DISABLES_INTS) != - 0)) { + ULTRA_IO_IOVM_IS_OK_WITH_DRIVER_DISABLING_INTS) != 0) + ((readq(pChannelHeader-Features) + ULTRA_IO_DRIVER_DISABLES_INTS) != +0)) { virthbainfo-interrupts_disabled++; mask = ~ULTRA_CHANNEL_ENABLE_INTS; rc1 = uisqueue_interlocked_and(virthbainfo-flags_addr, mask); @@ -810,9 +810,9 @@ virthba_abort_handler(struct scsi_cmnd *scsicmd) scsidev = scsicmd-device; for (vdisk = ((struct virthba_info *)scsidev-host-hostdata)-head; vdisk-next; vdisk = vdisk-next) { - if ((scsidev-channel == vdisk-channel) -(scsidev-id == vdisk-id) -(scsidev-lun == vdisk-lun)) { + if ((scsidev-channel == vdisk-channel) + (scsidev-id == vdisk-id) + (scsidev-lun == vdisk-lun)) { if (atomic_read(vdisk-error_count) VIRTHBA_ERROR_COUNT) { atomic_inc(vdisk-error_count); @@ -836,9 +836,9 @@ virthba_bus_reset_handler(struct scsi_cmnd *scsicmd) scsidev = scsicmd-device; for (vdisk = ((struct virthba_info *)scsidev-host-hostdata)-head; vdisk-next; vdisk = vdisk-next) { - if ((scsidev-channel == vdisk-channel) -(scsidev-id == vdisk-id) -(scsidev-lun == vdisk-lun)) { + if ((scsidev-channel == vdisk-channel) + (scsidev-id == vdisk-id) + (scsidev-lun == vdisk-lun)) { if (atomic_read(vdisk-error_count) VIRTHBA_ERROR_COUNT) { atomic_inc(vdisk-error_count); @@ -862,9 +862,9 @@ virthba_device_reset_handler(struct scsi_cmnd *scsicmd) scsidev = scsicmd-device; for (vdisk = ((struct virthba_info *)scsidev-host-hostdata)-head; vdisk-next; vdisk = vdisk-next) { - if ((scsidev-channel == vdisk-channel) -(scsidev-id == vdisk-id) -(scsidev-lun == vdisk-lun)) { + if ((scsidev-channel == vdisk-channel) + (scsidev-id == vdisk-id) + (scsidev-lun == vdisk-lun)) { if (atomic_read(vdisk-error_count) VIRTHBA_ERROR_COUNT) { atomic_inc(vdisk-error_count); @@ -1133,9 +1133,9 @@ do_scsi_linuxstat(struct uiscmdrsp *cmdrsp, struct scsi_cmnd *scsicmd) /* Okay see what our error_count is here */ for (vdisk = ((struct virthba_info *)scsidev-host-hostdata)-head; vdisk-next; vdisk = vdisk-next) { - if ((scsidev-channel != vdisk-channel) - || (scsidev-id != vdisk-id) - || (scsidev-lun != vdisk-lun)) + if ((scsidev-channel != vdisk-channel) || + (scsidev-id != vdisk-id) || + (scsidev-lun != vdisk-lun)) continue; if (atomic_read(vdisk-error_count) VIRTHBA_ERROR_COUNT) { @@ -1171,8 +1171,8 @@ do_scsi_nolinuxstat(struct uiscmdrsp *cmdrsp, struct scsi_cmnd *scsicmd) struct virtdisk_info *vdisk; scsidev = scsicmd-device; - if ((cmdrsp-scsi.cmnd[0] == INQUIRY) -(cmdrsp-scsi.bufflen = MIN_INQUIRY_RESULT_LEN)) { + if ((cmdrsp-scsi.cmnd[0] == INQUIRY) + (cmdrsp-scsi.bufflen = MIN_INQUIRY_RESULT_LEN)) { if (cmdrsp-scsi.no_disk_result == 0) return; @@ -1211,9 +1211,9 @@ do_scsi_nolinuxstat(struct uiscmdrsp *cmdrsp, struct scsi_cmnd *scsicmd) } else { vdisk = ((struct virthba_info *)scsidev-host-hostdata)-head; for ( ; vdisk-next; vdisk = vdisk-next) { - if ((scsidev-channel != vdisk-channel) - || (scsidev-id != vdisk-id) - || (scsidev-lun != vdisk-lun))