staging: unisys: remove typedef SIGNAL_QUEUE_HEADER
authorBenjamin Romer <benjamin.romer@unisys.com>
Thu, 23 Oct 2014 18:30:03 +0000 (14:30 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 27 Oct 2014 02:33:09 +0000 (10:33 +0800)
Get rid of the typedef for SIGNAL_QUEUE_HEADER and use struct
signal_queue_header directly instead. Fix all references to the typedef
to use the struct.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/unisys/channels/channel.c
drivers/staging/unisys/common-spar/include/channels/channel.h
drivers/staging/unisys/common-spar/include/channels/controlvmchannel.h
drivers/staging/unisys/common-spar/include/channels/diagchannel.h
drivers/staging/unisys/common-spar/include/channels/iochannel.h
drivers/staging/unisys/include/uisqueue.h
drivers/staging/unisys/virthba/virthba.c
drivers/staging/unisys/visorchannel/visorchannel_funcs.c

index c2f95f33b114fb6b6632651d877f4ad9729cc11c..d6db66181148136d058d9f59e4686328626abb75 100644 (file)
@@ -50,8 +50,8 @@ visor_signal_insert(struct channel_header __iomem *pChannel, u32 Queue,
        void __iomem *psignal;
        unsigned int head, tail, nof;
 
-       SIGNAL_QUEUE_HEADER __iomem *pqhdr =
-           (SIGNAL_QUEUE_HEADER __iomem *)
+       struct signal_queue_header __iomem *pqhdr =
+           (struct signal_queue_header __iomem *)
                ((char __iomem *) pChannel + readq(&pChannel->ch_space_offset))
                + Queue;
 
@@ -108,8 +108,8 @@ visor_signal_remove(struct channel_header __iomem *pChannel, u32 Queue,
 {
        void __iomem *psource;
        unsigned int head, tail;
-       SIGNAL_QUEUE_HEADER __iomem *pqhdr =
-           (SIGNAL_QUEUE_HEADER __iomem *) ((char __iomem *) pChannel +
+       struct signal_queue_header __iomem *pqhdr =
+           (struct signal_queue_header __iomem *) ((char __iomem *) pChannel +
                                    readq(&pChannel->ch_space_offset)) + Queue;
 
        /* capture current head and tail */
@@ -163,8 +163,8 @@ SignalRemoveAll(struct channel_header *pChannel, u32 Queue, void *pSignal)
 {
        void *psource;
        unsigned int head, tail, signalCount = 0;
-       pSIGNAL_QUEUE_HEADER pqhdr =
-           (pSIGNAL_QUEUE_HEADER) ((char *) pChannel +
+       struct signal_queue_header *pqhdr =
+           (struct signal_queue_header *) ((char *) pChannel +
                                    pChannel->ch_space_offset) + Queue;
 
        /* capture current head and tail */
@@ -212,8 +212,8 @@ SignalRemoveAll(struct channel_header *pChannel, u32 Queue, void *pSignal)
 unsigned char
 visor_signalqueue_empty(struct channel_header __iomem *pChannel, u32 Queue)
 {
-       SIGNAL_QUEUE_HEADER __iomem *pqhdr =
-           (SIGNAL_QUEUE_HEADER __iomem *) ((char __iomem *) pChannel +
+       struct signal_queue_header __iomem *pqhdr =
+           (struct signal_queue_header __iomem *) ((char __iomem *) pChannel +
                                    readq(&pChannel->ch_space_offset)) + Queue;
        return readl(&pqhdr->Head) == readl(&pqhdr->Tail);
 }
index 84f64624bd63587e98b620cf536330f4c57058c4..3c4f7c058e53c2d7a7c53fbf0a70b8cb330c2f77 100644 (file)
@@ -232,7 +232,7 @@ struct channel_header {
 #define ULTRA_CHANNEL_ENABLE_INTS (0x1ULL << 0)
 
 /* Subheader for the Signal Type variation of the Common Channel */
-typedef struct _SIGNAL_QUEUE_HEADER {
+struct signal_queue_header {
        /* 1st cache line */
        u32 VersionId;          /* SIGNAL_QUEUE_HEADER Version ID */
        u32 Type;               /* Queue type: storage, network */
@@ -265,7 +265,7 @@ typedef struct _SIGNAL_QUEUE_HEADER {
                                 * to denote trouble with client's
                                 * fields */
        u8 Filler[12];          /* Pad out to 64 byte cacheline */
-} SIGNAL_QUEUE_HEADER, *pSIGNAL_QUEUE_HEADER;
+};
 
 #pragma pack(pop)
 
index 8e8a5a57bddb7a29dcf6af2e792efe2d647ef458..91e75f4d3e21cb3e303f51528d71867ae4829661 100644 (file)
@@ -542,16 +542,16 @@ typedef struct _ULTRA_CONTROLVM_CHANNEL_PROTOCOL  {
        u32 SPReserved;
        u8 Reserved2[28];       /* Force signals to begin on 128-byte cache
                                 * line */
-       SIGNAL_QUEUE_HEADER RequestQueue;       /* Service or guest partition
+       struct signal_queue_header RequestQueue;/* Service or guest partition
                                                 * uses this queue to send
                                                 * requests to Control */
-       SIGNAL_QUEUE_HEADER ResponseQueue;      /* Control uses this queue to
+       struct signal_queue_header ResponseQueue;/* Control uses this queue to
                                                 * respond to service or guest
                                                 * partition requests */
-       SIGNAL_QUEUE_HEADER EventQueue;         /* Control uses this queue to
+       struct signal_queue_header EventQueue;  /* Control uses this queue to
                                                 * send events to service or
                                                 * guest partition */
-       SIGNAL_QUEUE_HEADER EventAckQueue;      /* Service or guest partition
+       struct signal_queue_header EventAckQueue;/* Service or guest partition
                                                 * uses this queue to ack
                                                 * Control events */
 
index 590022fd9fb680495a5cefba96ff5d503aa31bad..919f628360c2c01aa926c2b5b11918eea6c1b17a 100644 (file)
@@ -384,7 +384,7 @@ typedef struct _DIAG_CHANNEL_PROTOCOL_HEADER  {
 
 /* Offsets/sizes for diagnostic channel attributes... */
 #define DIAG_CH_QUEUE_HEADER_OFFSET (sizeof(struct channel_header))
-#define DIAG_CH_QUEUE_HEADER_SIZE (sizeof(SIGNAL_QUEUE_HEADER))
+#define DIAG_CH_QUEUE_HEADER_SIZE (sizeof(struct signal_queue_header))
 #define DIAG_CH_PROTOCOL_HEADER_OFFSET \
        (DIAG_CH_QUEUE_HEADER_OFFSET + DIAG_CH_QUEUE_HEADER_SIZE)
 #define DIAG_CH_PROTOCOL_HEADER_SIZE (sizeof(DIAG_CHANNEL_PROTOCOL_HEADER))
@@ -417,7 +417,7 @@ typedef struct _DIAG_CHANNEL_PROTOCOL_HEADER  {
 */
 typedef struct _ULTRA_DIAG_CHANNEL_PROTOCOL  {
        struct channel_header CommonChannelHeader;
-       SIGNAL_QUEUE_HEADER QueueHeader;
+       struct signal_queue_header QueueHeader;
        DIAG_CHANNEL_PROTOCOL_HEADER DiagChannelHeader;
        DIAG_CHANNEL_EVENT Events[(DIAG_CH_SIZE - DIAG_CH_EVENT_OFFSET) /
                                   sizeof(DIAG_CHANNEL_EVENT)];
index c26363de86dd2b3fadd97ac00601e45e8552030b..ac78d9c2585cd5ed7eb399706f6d47f288a9efb8 100644 (file)
@@ -686,8 +686,8 @@ struct uiscmdrsp {
 * response queues as specified in cmdQ and rspQ SIGNAL_QUEUE_HEADERS. */
 typedef struct _ULTRA_IO_CHANNEL_PROTOCOL {
        struct channel_header ChannelHeader;
-       SIGNAL_QUEUE_HEADER cmdQ;
-       SIGNAL_QUEUE_HEADER rspQ;
+       struct signal_queue_header cmdQ;
+       struct signal_queue_header rspQ;
        union {
                struct {
                        struct vhba_wwnn wwnn;  /* 8 bytes */
index 7d01c42abcb9300c0e5cf422f70e3a1327483027..25b6181d78af99c3beafebfe5d1e25dac3ee42a3 100644 (file)
@@ -47,8 +47,8 @@ struct uisqueue_info {
        u64 non_empty_wakeup_cnt;
 
        struct {
-               SIGNAL_QUEUE_HEADER reserved1;  /*  */
-               SIGNAL_QUEUE_HEADER reserved2;  /*  */
+               struct signal_queue_header reserved1;   /*  */
+               struct signal_queue_header reserved2;   /*  */
        } safe_uis_queue;
        unsigned int (*send_int_if_needed)(struct uisqueue_info *info,
                                           unsigned int whichcqueue,
index df0e89ccdc181b1ee18ee03411534807e6874820..9d4653d346084a7d22ff8a59fa2b9222926a79dd 100644 (file)
@@ -421,7 +421,7 @@ virthba_ISR(int irq, void *dev_id)
 {
        struct virthba_info *virthbainfo = (struct virthba_info *) dev_id;
        struct channel_header __iomem *pChannelHeader;
-       SIGNAL_QUEUE_HEADER __iomem *pqhdr;
+       struct signal_queue_header __iomem *pqhdr;
        u64 mask;
        unsigned long long rc1;
 
@@ -442,7 +442,7 @@ virthba_ISR(int irq, void *dev_id)
                virthbainfo->interrupts_notme++;
                return IRQ_NONE;
        }
-       pqhdr = (SIGNAL_QUEUE_HEADER __iomem *)
+       pqhdr = (struct signal_queue_header __iomem *)
                ((char __iomem *) pChannelHeader +
                 readq(&pChannelHeader->ch_space_offset)) + IOCHAN_FROM_IOPART;
        writeq(readq(&pqhdr->NumInterruptsReceived) + 1,
@@ -462,7 +462,7 @@ virthba_probe(struct virtpci_dev *virtpcidev, const struct pci_device_id *id)
        int i;
        irq_handler_t handler = virthba_ISR;
        struct channel_header __iomem *pChannelHeader;
-       SIGNAL_QUEUE_HEADER __iomem *pqhdr;
+       struct signal_queue_header __iomem *pqhdr;
        u64 mask;
 
        LOGVER("entering virthba_probe...\n");
@@ -586,7 +586,7 @@ virthba_probe(struct virtpci_dev *virtpcidev, const struct pci_device_id *id)
               virthbainfo->chinfo.queueinfo, &virthbainfo->chinfo.threadinfo);
 
        pChannelHeader = virthbainfo->chinfo.queueinfo->chan;
-       pqhdr = (SIGNAL_QUEUE_HEADER __iomem *)
+       pqhdr = (struct signal_queue_header __iomem *)
                ((char __iomem *)pChannelHeader +
                 readq(&pChannelHeader->ch_space_offset)) + IOCHAN_FROM_IOPART;
        virthbainfo->flags_addr = &pqhdr->FeatureFlags;
index 19f5c775ca88c15cae12a80a2762dd0bb130e7f5..7b30c66d3a3ef7005856f068b177b3822bcc5135 100644 (file)
@@ -38,10 +38,10 @@ struct VISORCHANNEL_Tag {
        spinlock_t remove_lock;
 
        struct {
-               SIGNAL_QUEUE_HEADER req_queue;
-               SIGNAL_QUEUE_HEADER rsp_queue;
-               SIGNAL_QUEUE_HEADER event_queue;
-               SIGNAL_QUEUE_HEADER ack_queue;
+               struct signal_queue_header req_queue;
+               struct signal_queue_header rsp_queue;
+               struct signal_queue_header event_queue;
+               struct signal_queue_header ack_queue;
        } safe_uis_queue;
 };
 
@@ -295,7 +295,8 @@ EXPORT_SYMBOL_GPL(visorchannel_get_header);
  *  channel header
  */
 #define SIG_QUEUE_OFFSET(chan_hdr, q) \
-       ((chan_hdr)->ch_space_offset + ((q) * sizeof(SIGNAL_QUEUE_HEADER)))
+       ((chan_hdr)->ch_space_offset + \
+        ((q) * sizeof(struct signal_queue_header)))
 
 /** Return offset of a specific queue entry (data) from the beginning of a
  *  channel header
@@ -310,13 +311,13 @@ EXPORT_SYMBOL_GPL(visorchannel_get_header);
 #define SIG_WRITE_FIELD(channel, queue, sig_hdr, FIELD)                        \
        (visor_memregion_write(channel->memregion,                      \
                               SIG_QUEUE_OFFSET(&channel->chan_hdr, queue)+ \
-                              offsetof(SIGNAL_QUEUE_HEADER, FIELD),    \
+                              offsetof(struct signal_queue_header, FIELD),\
                               &((sig_hdr)->FIELD),                     \
                               sizeof((sig_hdr)->FIELD)) >= 0)
 
 static BOOL
 sig_read_header(VISORCHANNEL *channel, u32 queue,
-               SIGNAL_QUEUE_HEADER *sig_hdr)
+               struct signal_queue_header *sig_hdr)
 {
        BOOL rc = FALSE;
 
@@ -329,7 +330,8 @@ sig_read_header(VISORCHANNEL *channel, u32 queue,
 
        if (visor_memregion_read(channel->memregion,
                                 SIG_QUEUE_OFFSET(&channel->chan_hdr, queue),
-                                sig_hdr, sizeof(SIGNAL_QUEUE_HEADER)) < 0) {
+                                sig_hdr,
+                                sizeof(struct signal_queue_header)) < 0) {
                ERRDRV("queue=%d SIG_QUEUE_OFFSET=%d",
                       queue, (int)SIG_QUEUE_OFFSET(&channel->chan_hdr, queue));
                ERRDRV("visor_memregion_read of signal queue failed: (status=%d)\n", rc);
@@ -342,7 +344,8 @@ Away:
 
 static BOOL
 sig_do_data(VISORCHANNEL *channel, u32 queue,
-           SIGNAL_QUEUE_HEADER *sig_hdr, u32 slot, void *data, BOOL is_write)
+           struct signal_queue_header *sig_hdr, u32 slot, void *data,
+           BOOL is_write)
 {
        BOOL rc = FALSE;
        int signal_data_offset = SIG_DATA_OFFSET(&channel->chan_hdr, queue,
@@ -368,21 +371,21 @@ Away:
 
 static inline BOOL
 sig_read_data(VISORCHANNEL *channel, u32 queue,
-             SIGNAL_QUEUE_HEADER *sig_hdr, u32 slot, void *data)
+             struct signal_queue_header *sig_hdr, u32 slot, void *data)
 {
        return sig_do_data(channel, queue, sig_hdr, slot, data, FALSE);
 }
 
 static inline BOOL
 sig_write_data(VISORCHANNEL *channel, u32 queue,
-              SIGNAL_QUEUE_HEADER *sig_hdr, u32 slot, void *data)
+              struct signal_queue_header *sig_hdr, u32 slot, void *data)
 {
        return sig_do_data(channel, queue, sig_hdr, slot, data, TRUE);
 }
 
 static inline unsigned char
-safe_sig_queue_validate(pSIGNAL_QUEUE_HEADER psafe_sqh,
-                       pSIGNAL_QUEUE_HEADER punsafe_sqh,
+safe_sig_queue_validate(struct signal_queue_header *psafe_sqh,
+                       struct signal_queue_header *punsafe_sqh,
                        u32 *phead, u32 *ptail)
 {
        if ((*phead >= psafe_sqh->MaxSignalSlots)
@@ -406,7 +409,7 @@ BOOL
 visorchannel_signalremove(VISORCHANNEL *channel, u32 queue, void *msg)
 {
        BOOL rc = FALSE;
-       SIGNAL_QUEUE_HEADER sig_hdr;
+       struct signal_queue_header sig_hdr;
 
        if (channel->needs_lock)
                spin_lock(&channel->remove_lock);
@@ -452,7 +455,7 @@ BOOL
 visorchannel_signalinsert(VISORCHANNEL *channel, u32 queue, void *msg)
 {
        BOOL rc = FALSE;
-       SIGNAL_QUEUE_HEADER sig_hdr;
+       struct signal_queue_header sig_hdr;
 
        if (channel->needs_lock)
                spin_lock(&channel->insert_lock);
@@ -505,7 +508,7 @@ EXPORT_SYMBOL_GPL(visorchannel_signalinsert);
 int
 visorchannel_signalqueue_slots_avail(VISORCHANNEL *channel, u32 queue)
 {
-       SIGNAL_QUEUE_HEADER sig_hdr;
+       struct signal_queue_header sig_hdr;
        u32 slots_avail, slots_used;
        u32 head, tail;
 
@@ -524,7 +527,7 @@ EXPORT_SYMBOL_GPL(visorchannel_signalqueue_slots_avail);
 int
 visorchannel_signalqueue_max_slots(VISORCHANNEL *channel, u32 queue)
 {
-       SIGNAL_QUEUE_HEADER sig_hdr;
+       struct signal_queue_header sig_hdr;
 
        if (!sig_read_header(channel, queue, &sig_hdr))
                return 0;
@@ -533,7 +536,7 @@ visorchannel_signalqueue_max_slots(VISORCHANNEL *channel, u32 queue)
 EXPORT_SYMBOL_GPL(visorchannel_signalqueue_max_slots);
 
 static void
-sigqueue_debug(SIGNAL_QUEUE_HEADER *q, int which, struct seq_file *seq)
+sigqueue_debug(struct signal_queue_header *q, int which, struct seq_file *seq)
 {
        seq_printf(seq, "Signal Queue #%d\n", which);
        seq_printf(seq, "   VersionId          = %lu\n", (ulong) q->VersionId);
@@ -617,7 +620,7 @@ visorchannel_debug(VISORCHANNEL *channel, int nQueues,
                ;
        else
                for (i = 0; i < nQueues; i++) {
-                       SIGNAL_QUEUE_HEADER q;
+                       struct signal_queue_header q;
 
                        errcode = visorchannel_read(channel,
                                        off + phdr->ch_space_offset +