staging: unisys: refactor SignalInit Macro
authorBenjamin Romer <benjamin.romer@unisys.com>
Thu, 23 Oct 2014 18:30:09 +0000 (14:30 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 27 Oct 2014 02:33:09 +0000 (10:33 +0800)
Rename SignalInit to spar_signal_init, and fix CamelCase names:

VersionId => version
Type => chtype
Size => size
SignalSize => signal_size
oSignalBase => sig_base_offset
MaxSignalSlots => max_slots
MaxSignals => max_signals

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/unisys/common-spar/include/channels/channel.h

index 90677a8852dd3f6499591bee8c9013203b288795..4d9e5d457e93e70b61a473ef240435507be25cd2 100644 (file)
@@ -269,18 +269,18 @@ struct signal_queue_header {
 
 #pragma pack(pop)
 
-#define SignalInit(chan, QHDRFLD, QDATAFLD, QDATATYPE, ver, typ)       \
+#define spar_signal_init(chan, QHDRFLD, QDATAFLD, QDATATYPE, ver, typ) \
        do {                                                            \
                memset(&chan->QHDRFLD, 0, sizeof(chan->QHDRFLD));       \
-               chan->QHDRFLD.VersionId = ver;                          \
-               chan->QHDRFLD.Type = typ;                               \
-               chan->QHDRFLD.Size = sizeof(chan->QDATAFLD);            \
-               chan->QHDRFLD.SignalSize = sizeof(QDATATYPE);           \
-               chan->QHDRFLD.oSignalBase = (u64)(chan->QDATAFLD)-      \
+               chan->QHDRFLD.version = ver;                            \
+               chan->QHDRFLD.chtype = typ;                             \
+               chan->QHDRFLD.size = sizeof(chan->QDATAFLD);            \
+               chan->QHDRFLD.signal_size = sizeof(QDATATYPE);          \
+               chan->QHDRFLD.sig_base_offset = (u64)(chan->QDATAFLD)-  \
                        (u64)(&chan->QHDRFLD);                          \
-               chan->QHDRFLD.MaxSignalSlots =                          \
+               chan->QHDRFLD.max_slots =                               \
                        sizeof(chan->QDATAFLD)/sizeof(QDATATYPE);       \
-               chan->QHDRFLD.MaxSignals = chan->QHDRFLD.MaxSignalSlots-1; \
+               chan->QHDRFLD.max_signals = chan->QHDRFLD.max_slots-1;  \
        } while (0)
 
 /* Generic function useful for validating any type of channel when it is