diff options
author | David Kershner <david.kershner@unisys.com> | 2015-10-12 19:19:40 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-10-13 03:51:19 (GMT) |
commit | 54bf4d454e37d66041871775ce66cda972c70cea (patch) | |
tree | b55d87eb0c2a89a55389e07e163b3cc329b9a7c2 /drivers/staging/unisys | |
parent | 9f00be7f9e08c8f95663cda9635d81a87c9ded7f (diff) | |
download | linux-54bf4d454e37d66041871775ce66cda972c70cea.tar.xz |
staging: unisys: channel.h Fix spacing around operands.
Clean up the seven checks reported by checkpatch.pl --strict.
CHECK: spaces preferred around that '<<' (ctx:VxV)
+#define SIGNATURE_16(A, B) ((A) | (B<<8))
^
CHECK: spaces preferred around that '+' (ctx:VxV)
+#define COVERQ(v, d) (((v)+(d)-1) / (d))
^
CHECK: spaces preferred around that '-' (ctx:VxV)
+#define COVERQ(v, d) (((v)+(d)-1) / (d))
^
CHECK: spaces preferred around that '*' (ctx:VxV)
+#define COVER(v, d) ((d)*COVERQ(v, d))
^
CHECK: spaces preferred around that '-' (ctx:VxE)
+ chan->QHDRFLD.sig_base_offset = (u64)(chan->QDATAFLD)- \
^
CHECK: spaces preferred around that '/' (ctx:VxV)
+ sizeof(chan->QDATAFLD)/sizeof(QDATATYPE); \
^
CHECK: spaces preferred around that '-' (ctx:VxV)
+ chan->QHDRFLD.max_signals = chan->QHDRFLD.max_slots-1; \
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/unisys')
-rw-r--r-- | drivers/staging/unisys/include/channel.h | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/staging/unisys/include/channel.h b/drivers/staging/unisys/include/channel.h index 698adeb..c6c2442 100644 --- a/drivers/staging/unisys/include/channel.h +++ b/drivers/staging/unisys/include/channel.h @@ -32,7 +32,7 @@ */ #define __SUPERVISOR_CHANNEL_H__ -#define SIGNATURE_16(A, B) ((A) | (B<<8)) +#define SIGNATURE_16(A, B) ((A) | (B << 8)) #define SIGNATURE_32(A, B, C, D) \ (SIGNATURE_16(A, B) | (SIGNATURE_16(C, D) << 16)) #define SIGNATURE_64(A, B, C, D, E, F, G, H) \ @@ -42,10 +42,10 @@ #define lengthof(TYPE, MEMBER) (sizeof(((TYPE *)0)->MEMBER)) #endif #ifndef COVERQ -#define COVERQ(v, d) (((v)+(d)-1) / (d)) +#define COVERQ(v, d) (((v) + (d) - 1) / (d)) #endif #ifndef COVER -#define COVER(v, d) ((d)*COVERQ(v, d)) +#define COVER(v, d) ((d) * COVERQ(v, d)) #endif #define ULTRA_CHANNEL_PROTOCOL_SIGNATURE SIGNATURE_32('E', 'C', 'N', 'L') @@ -231,7 +231,6 @@ struct signal_queue_header { u8 filler[12]; /* Pad out to 64 byte cacheline */ } __packed; - #define spar_signal_init(chan, QHDRFLD, QDATAFLD, QDATATYPE, ver, typ) \ do { \ memset(&chan->QHDRFLD, 0, sizeof(chan->QHDRFLD)); \ @@ -239,11 +238,11 @@ struct signal_queue_header { chan->QHDRFLD.chtype = typ; \ chan->QHDRFLD.size = sizeof(chan->QDATAFLD); \ chan->QHDRFLD.signal_size = sizeof(QDATATYPE); \ - chan->QHDRFLD.sig_base_offset = (u64)(chan->QDATAFLD)- \ + chan->QHDRFLD.sig_base_offset = (u64)(chan->QDATAFLD) - \ (u64)(&chan->QHDRFLD); \ chan->QHDRFLD.max_slots = \ - sizeof(chan->QDATAFLD)/sizeof(QDATATYPE); \ - chan->QHDRFLD.max_signals = chan->QHDRFLD.max_slots-1; \ + sizeof(chan->QDATAFLD) / sizeof(QDATATYPE); \ + chan->QHDRFLD.max_signals = chan->QHDRFLD.max_slots - 1;\ } while (0) /* Generic function useful for validating any type of channel when it is |