staging: unisys: remove typedef for CHANNEL_HEADER
authorBenjamin Romer <benjamin.romer@unisys.com>
Thu, 23 Oct 2014 18:29:55 +0000 (14:29 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 27 Oct 2014 02:33:08 +0000 (10:33 +0800)
Switch everywhere that CHANNEL_HEADER, pCHANNEL_HEADER, or
ULTRA_CHANNEL_PROTOCOL was used, to struct channel_header.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
14 files changed:
drivers/staging/unisys/channels/channel.c
drivers/staging/unisys/channels/chanstub.c
drivers/staging/unisys/channels/chanstub.h
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/common-spar/include/channels/vbuschannel.h
drivers/staging/unisys/include/uisqueue.h
drivers/staging/unisys/uislib/uislib.c
drivers/staging/unisys/virthba/virthba.c
drivers/staging/unisys/virtpci/virtpci.c
drivers/staging/unisys/visorchannel/visorchannel_funcs.c
drivers/staging/unisys/visorchipset/visorchipset_main.c

index b4bdee4b575b0b459f3a0c299e2988d359931fdc..2033b3b8a11f03531c5645122ff62d0f06c91069 100644 (file)
@@ -44,7 +44,8 @@
  * 1 if the insertion succeeds, 0 if the queue was full.
  */
 unsigned char
-visor_signal_insert(CHANNEL_HEADER __iomem *pChannel, u32 Queue, void *pSignal)
+visor_signal_insert(struct channel_header __iomem *pChannel, u32 Queue,
+                   void *pSignal)
 {
        void __iomem *psignal;
        unsigned int head, tail, nof;
@@ -102,7 +103,8 @@ EXPORT_SYMBOL_GPL(visor_signal_insert);
  * 1 if the removal succeeds, 0 if the queue was empty.
  */
 unsigned char
-visor_signal_remove(CHANNEL_HEADER __iomem *pChannel, u32 Queue, void *pSignal)
+visor_signal_remove(struct channel_header __iomem *pChannel, u32 Queue,
+                   void *pSignal)
 {
        void __iomem *psource;
        unsigned int head, tail;
@@ -157,7 +159,7 @@ EXPORT_SYMBOL_GPL(visor_signal_remove);
  * # of signals copied.
  */
 unsigned int
-SignalRemoveAll(pCHANNEL_HEADER pChannel, u32 Queue, void *pSignal)
+SignalRemoveAll(struct channel_header *pChannel, u32 Queue, void *pSignal)
 {
        void *psource;
        unsigned int head, tail, signalCount = 0;
@@ -208,7 +210,7 @@ SignalRemoveAll(pCHANNEL_HEADER pChannel, u32 Queue, void *pSignal)
  * 1 if the signal queue is empty, 0 otherwise.
  */
 unsigned char
-visor_signalqueue_empty(CHANNEL_HEADER __iomem *pChannel, u32 Queue)
+visor_signalqueue_empty(struct channel_header __iomem *pChannel, u32 Queue)
 {
        SIGNAL_QUEUE_HEADER __iomem *pqhdr =
            (SIGNAL_QUEUE_HEADER __iomem *) ((char __iomem *) pChannel +
index d54c5d635a94bb61276582a09db5cc563ac182f2..23d5aafef2cd7718770ae61d3d857b62713c4469 100644 (file)
@@ -42,7 +42,7 @@ channel_mod_exit(void)
 }
 
 unsigned char
-SignalInsert_withLock(CHANNEL_HEADER __iomem *pChannel, u32 Queue,
+SignalInsert_withLock(struct channel_header __iomem *pChannel, u32 Queue,
                      void *pSignal, spinlock_t *lock)
 {
        unsigned char result;
@@ -55,7 +55,7 @@ SignalInsert_withLock(CHANNEL_HEADER __iomem *pChannel, u32 Queue,
 }
 
 unsigned char
-SignalRemove_withLock(CHANNEL_HEADER __iomem *pChannel, u32 Queue,
+SignalRemove_withLock(struct channel_header __iomem *pChannel, u32 Queue,
                      void *pSignal, spinlock_t *lock)
 {
        unsigned char result;
index d08e2c69d2ad40b761ddc8e4b638feef2539b296..1531759a1b31eb0bd2a921911266675719c34daa 100644 (file)
@@ -15,9 +15,9 @@
 
 #ifndef __CHANSTUB_H__
 #define __CHANSTUB_H__
-unsigned char SignalInsert_withLock(CHANNEL_HEADER __iomem *pChannel, u32 Queue,
-                                    void *pSignal, spinlock_t *lock);
-unsigned char SignalRemove_withLock(CHANNEL_HEADER __iomem *pChannel, u32 Queue,
-                                    void *pSignal, spinlock_t *lock);
+unsigned char SignalInsert_withLock(struct channel_header __iomem *pChannel,
+                                   u32 Queue, void *pSignal, spinlock_t *lock);
+unsigned char SignalRemove_withLock(struct channel_header __iomem *pChannel,
+                                   u32 Queue, void *pSignal, spinlock_t *lock);
 
 #endif
index c77e9c7afcd9d4607927500962c2c3da6fca932a..a71bac0526b22990024083ab040dfbc636571d16 100644 (file)
@@ -133,21 +133,21 @@ ULTRA_CHANNELCLI_STRING(u32 v)
                                        newstate, logCtx)               \
        do {                                                            \
                ULTRA_CHANNEL_CLIENT_CHK_TRANSITION(                    \
-                       readl(&(((CHANNEL_HEADER __iomem *) \
+                       readl(&(((struct channel_header __iomem *) \
                                 (pChan))->CliStateOS)),                \
                        newstate,                                       \
                        chanId, logCtx, __FILE__, __LINE__);            \
                        pr_info("%s Channel StateTransition (%s) %s(%d)-->%s(%d) @%s:%d\n", \
                                chanId, "CliStateOS",                   \
                                ULTRA_CHANNELCLI_STRING( \
-                                     readl(&((CHANNEL_HEADER __iomem *) \
+                                     readl(&((struct channel_header __iomem *)\
                                              (pChan))->CliStateOS)),   \
-                               readl(&((CHANNEL_HEADER __iomem *) \
+                               readl(&((struct channel_header __iomem *) \
                                      (pChan))->CliStateOS),            \
                                ULTRA_CHANNELCLI_STRING(newstate),      \
                                newstate,                               \
                                PathName_Last_N_Nodes(__FILE__, 4), __LINE__); \
-               writel(newstate, &((CHANNEL_HEADER __iomem *) \
+               writel(newstate, &((struct channel_header __iomem *) \
                                   (pChan))->CliStateOS);               \
                mb(); /* required for channel synch */                  \
        } while (0)
@@ -200,18 +200,18 @@ ULTRA_CHANNELCLI_STRING(u32 v)
 
 #pragma pack(push, 1)          /* both GCC and VC now allow this pragma */
 /* Common Channel Header */
-typedef struct _CHANNEL_HEADER {
+struct channel_header {
        u64 Signature;          /* Signature */
        u32 LegacyState;        /* DEPRECATED - being replaced by */
        /* /              SrvState, CliStateBoot, and CliStateOS below */
-       u32 HeaderSize;         /* sizeof(CHANNEL_HEADER) */
+       u32 HeaderSize;         /* sizeof(struct channel_header) */
        u64 Size;               /* Total size of this channel in bytes */
        u64 Features;           /* Flags to modify behavior */
        uuid_le Type;           /* Channel type: data, bus, control, etc. */
        u64 PartitionHandle;    /* ID of guest partition */
        u64 Handle;             /* Device number of this channel in client */
        u64 oChannelSpace;      /* Offset in bytes to channel specific area */
-       u32 VersionId;          /* CHANNEL_HEADER Version ID */
+       u32 VersionId;          /* struct channel_header Version ID */
        u32 PartitionIndex;     /* Index of guest partition */
        uuid_le ZoneGuid;               /* Guid of Channel's zone */
        u32 oClientString;      /* offset from channel header to
@@ -238,7 +238,7 @@ typedef struct _CHANNEL_HEADER {
        u8 Filler[1];           /* Pad out to 128 byte cacheline */
        /* Please add all new single-byte values below here */
        u8 RecoverChannel;
-} CHANNEL_HEADER, *pCHANNEL_HEADER, ULTRA_CHANNEL_PROTOCOL;
+};
 
 #define ULTRA_CHANNEL_ENABLE_INTS (0x1ULL << 0)
 
@@ -312,7 +312,8 @@ ULTRA_check_channel_client(void __iomem *pChannel,
                uuid_le guid;
 
                memcpy_fromio(&guid,
-                             &((CHANNEL_HEADER __iomem *)(pChannel))->Type,
+                             &((struct channel_header __iomem *)
+                                       (pChannel))->Type,
                              sizeof(guid));
                /* caller wants us to verify type GUID */
                if (uuid_le_cmp(guid, expectedTypeGuid) != 0) {
@@ -324,8 +325,9 @@ ULTRA_check_channel_client(void __iomem *pChannel,
        }
        if (expectedMinBytes > 0) {     /* caller wants us to verify
                                         * channel size */
-               unsigned long long bytes = readq(&((CHANNEL_HEADER __iomem *)
-                                               (pChannel))->Size);
+               unsigned long long bytes =
+                               readq(&((struct channel_header __iomem *)
+                                       (pChannel))->Size);
                if (bytes < expectedMinBytes) {
                        pr_err("Channel mismatch on channel=%s(%pUL) field=size expected=0x%-8.8Lx actual=0x%-8.8Lx\n",
                               channelName, &expectedTypeGuid,
@@ -335,7 +337,7 @@ ULTRA_check_channel_client(void __iomem *pChannel,
        }
        if (expectedVersionId > 0) {    /* caller wants us to verify
                                         * channel version */
-               unsigned long ver = readl(&((CHANNEL_HEADER __iomem *)
+               unsigned long ver = readl(&((struct channel_header __iomem *)
                                    (pChannel))->VersionId);
                if (ver != expectedVersionId) {
                        pr_err("Channel mismatch on channel=%s(%pUL) field=version expected=0x%-8.8lx actual=0x%-8.8lx\n",
@@ -346,8 +348,9 @@ ULTRA_check_channel_client(void __iomem *pChannel,
        }
        if (expectedSignature > 0) {    /* caller wants us to verify
                                         * channel signature */
-               unsigned long long sig = readq(&((CHANNEL_HEADER __iomem *)
-                                        (pChannel))->Signature);
+               unsigned long long sig =
+                               readq(&((struct channel_header __iomem *)
+                                       (pChannel))->Signature);
                if (sig != expectedSignature) {
                        pr_err("Channel mismatch on channel=%s(%pUL) field=signature expected=0x%-8.8llx actual=0x%-8.8llx\n",
                               channelName, &expectedTypeGuid,
@@ -416,7 +419,7 @@ static inline int
 ULTRA_channel_client_acquire_os(void __iomem *pChannel, u8 *chanId,
                                void *logCtx, char *file, int line, char *func)
 {
-       CHANNEL_HEADER __iomem *pChan = pChannel;
+       struct channel_header __iomem *pChan = pChannel;
 
        if (readl(&pChan->CliStateOS) == CHANNELCLI_DISABLED) {
                if ((readb(&pChan->CliErrorOS)
@@ -511,7 +514,7 @@ static inline void
 ULTRA_channel_client_release_os(void __iomem *pChannel, u8 *chanId,
                                void *logCtx, char *file, int line, char *func)
 {
-       CHANNEL_HEADER __iomem *pChan = pChannel;
+       struct channel_header __iomem *pChan = pChannel;
 
        if (readb(&pChan->CliErrorOS) != 0) {
                /* we are in an error msg throttling state; come out of it */
@@ -552,8 +555,8 @@ ULTRA_channel_client_release_os(void __iomem *pChannel, u8 *chanId,
 * full.
 */
 
-unsigned char visor_signal_insert(CHANNEL_HEADER __iomem *pChannel, u32 Queue,
-                                 void *pSignal);
+unsigned char visor_signal_insert(struct channel_header __iomem *pChannel,
+                                 u32 Queue, void *pSignal);
 
 /*
 * Routine Description:
@@ -574,8 +577,8 @@ unsigned char visor_signal_insert(CHANNEL_HEADER __iomem *pChannel, u32 Queue,
 * empty.
 */
 
-unsigned char visor_signal_remove(CHANNEL_HEADER __iomem *pChannel, u32 Queue,
-                                 void *pSignal);
+unsigned char visor_signal_remove(struct channel_header __iomem *pChannel,
+                                 u32 Queue, void *pSignal);
 
 /*
 * Routine Description:
@@ -596,7 +599,7 @@ unsigned char visor_signal_remove(CHANNEL_HEADER __iomem *pChannel, u32 Queue,
 * Return value:
 * # of signals copied.
 */
-unsigned int SignalRemoveAll(pCHANNEL_HEADER pChannel, u32 Queue,
+unsigned int SignalRemoveAll(struct channel_header *pChannel, u32 Queue,
                             void *pSignal);
 
 /*
@@ -610,7 +613,7 @@ unsigned int SignalRemoveAll(pCHANNEL_HEADER pChannel, u32 Queue,
 * Return value:
 * 1 if the signal queue is empty, 0 otherwise.
 */
-unsigned char visor_signalqueue_empty(CHANNEL_HEADER __iomem *pChannel,
+unsigned char visor_signalqueue_empty(struct channel_header __iomem *pChannel,
                                      u32 Queue);
 
 #endif
index f7ca6d167d609187536eef59791b7ee6ab2a08c4..8e8a5a57bddb7a29dcf6af2e792efe2d647ef458 100644 (file)
@@ -470,7 +470,7 @@ typedef struct _GUEST_DEVICES  {
 } GUEST_DEVICES;
 
 typedef struct _ULTRA_CONTROLVM_CHANNEL_PROTOCOL  {
-        CHANNEL_HEADER Header;
+        struct channel_header Header;
         GUEST_PHYSICAL_ADDRESS gpControlVm;    /* guest physical address of
                                                 * this channel */
         GUEST_PHYSICAL_ADDRESS gpPartitionTables; /* guest physical address of
index 9912e51b89b557c4aeefbee1ca994ad98a366d53..590022fd9fb680495a5cefba96ff5d503aa31bad 100644 (file)
@@ -383,7 +383,7 @@ typedef struct _DIAG_CHANNEL_PROTOCOL_HEADER  {
 /* ----------------------- */
 
 /* Offsets/sizes for diagnostic channel attributes... */
-#define DIAG_CH_QUEUE_HEADER_OFFSET (sizeof(ULTRA_CHANNEL_PROTOCOL))
+#define DIAG_CH_QUEUE_HEADER_OFFSET (sizeof(struct channel_header))
 #define DIAG_CH_QUEUE_HEADER_SIZE (sizeof(SIGNAL_QUEUE_HEADER))
 #define DIAG_CH_PROTOCOL_HEADER_OFFSET \
        (DIAG_CH_QUEUE_HEADER_OFFSET + DIAG_CH_QUEUE_HEADER_SIZE)
@@ -416,7 +416,7 @@ typedef struct _DIAG_CHANNEL_PROTOCOL_HEADER  {
  *Reserved: Reserved area to allow for correct channel size padding.
 */
 typedef struct _ULTRA_DIAG_CHANNEL_PROTOCOL  {
-       ULTRA_CHANNEL_PROTOCOL CommonChannelHeader;
+       struct channel_header CommonChannelHeader;
        SIGNAL_QUEUE_HEADER QueueHeader;
        DIAG_CHANNEL_PROTOCOL_HEADER DiagChannelHeader;
        DIAG_CHANNEL_EVENT Events[(DIAG_CH_SIZE - DIAG_CH_EVENT_OFFSET) /
index 7de87a481a8cf97677fd7b41efc2883665f8f551..77335964e3fe502dbe929054831c19f9b6a4c20b 100644 (file)
@@ -685,7 +685,7 @@ struct uiscmdrsp {
 * this header there is a large region of memory which contains the command and
 * response queues as specified in cmdQ and rspQ SIGNAL_QUEUE_HEADERS. */
 typedef struct _ULTRA_IO_CHANNEL_PROTOCOL {
-       CHANNEL_HEADER ChannelHeader;
+       struct channel_header ChannelHeader;
        SIGNAL_QUEUE_HEADER cmdQ;
        SIGNAL_QUEUE_HEADER rspQ;
        union {
index 420b7d8595223c66c837bb709ca8f617acd3f955..76bc7140d5e7dc42b4fd4a028588d39dcbcc3c9f 100644 (file)
@@ -76,7 +76,7 @@ typedef struct _ULTRA_VBUS_HEADERINFO {
 } ULTRA_VBUS_HEADERINFO;
 
 struct ultra_vbus_channel_protocol {
-       ULTRA_CHANNEL_PROTOCOL ChannelHeader;   /* initialized by server */
+       struct channel_header ChannelHeader;    /* initialized by server */
        ULTRA_VBUS_HEADERINFO HdrInfo;  /* initialized by server */
        /* the remainder of this channel is filled in by the client */
        struct ultra_vbus_deviceinfo ChpInfo;
index db9d2051ae2fe912463abae7845fbfe6036475d8..7d01c42abcb9300c0e5cf422f70e3a1327483027 100644 (file)
@@ -34,7 +34,7 @@
 #include "controlvmcompletionstatus.h"
 
 struct uisqueue_info {
-       CHANNEL_HEADER __iomem *chan;
+       struct channel_header __iomem *chan;
        /* channel containing queues in which scsi commands &
         * responses are queued
         */
index 35e8a61c72023dfd797652a0faca844daba3ead5..0de0eee95b8f503a591819ae2004ac3946ac8ac8 100644 (file)
@@ -444,8 +444,9 @@ create_device(CONTROLVM_MESSAGE *msg, char *buf)
 
                                if (!uuid_le_cmp(dev->channel_uuid,
                                     spar_vhba_channel_protocol_uuid)) {
-                                       wait_for_valid_guid(&((CHANNEL_HEADER
-                                                             __iomem *) (dev->
+                                       wait_for_valid_guid(&((
+                                               struct channel_header
+                                                       __iomem *) (dev->
                                                                  chanptr))->
                                                            Type);
                                        if (!ULTRA_VHBA_CHANNEL_OK_CLIENT
@@ -469,8 +470,9 @@ create_device(CONTROLVM_MESSAGE *msg, char *buf)
                                } else
                                    if (!uuid_le_cmp(dev->channel_uuid,
                                         spar_vnic_channel_protocol_uuid)) {
-                                       wait_for_valid_guid(&((CHANNEL_HEADER
-                                                             __iomem *) (dev->
+                                       wait_for_valid_guid(&((
+                                               struct channel_header
+                                                       __iomem *) (dev->
                                                                  chanptr))->
                                                            Type);
                                        if (!ULTRA_VNIC_CHANNEL_OK_CLIENT
@@ -1565,7 +1567,7 @@ uislib_mod_init(void)
        LOGINF("sizeof(ULTRA_CONTROLVM_CHANNEL_PROTOCOL):%lu bytes\n",
               (ulong) sizeof(ULTRA_CONTROLVM_CHANNEL_PROTOCOL));
        LOGINF("sizeof(CHANNEL_HEADER):%lu bytes\n",
-              (ulong) sizeof(CHANNEL_HEADER));
+              (ulong) sizeof(struct channel_header));
        LOGINF("sizeof(ULTRA_IO_CHANNEL_PROTOCOL):%lu bytes\n",
               (ulong) sizeof(ULTRA_IO_CHANNEL_PROTOCOL));
        LOGINF("SIZEOF_CMDRSP:%lu bytes\n", SIZEOF_CMDRSP);
index e4130c9714fc20c7f5032fe4c726897dcf69e56f..c25c1d9f129c532816a6c851274ab9fb198dc8f3 100644 (file)
@@ -420,7 +420,7 @@ static irqreturn_t
 virthba_ISR(int irq, void *dev_id)
 {
        struct virthba_info *virthbainfo = (struct virthba_info *) dev_id;
-       CHANNEL_HEADER __iomem *pChannelHeader;
+       struct channel_header __iomem *pChannelHeader;
        SIGNAL_QUEUE_HEADER __iomem *pqhdr;
        u64 mask;
        unsigned long long rc1;
@@ -461,7 +461,7 @@ virthba_probe(struct virtpci_dev *virtpcidev, const struct pci_device_id *id)
        int rsp;
        int i;
        irq_handler_t handler = virthba_ISR;
-       CHANNEL_HEADER __iomem *pChannelHeader;
+       struct channel_header __iomem *pChannelHeader;
        SIGNAL_QUEUE_HEADER __iomem *pqhdr;
        u64 mask;
 
index f782916cbf2b4e3bc071b0dc7a6930719d729059..2be0447c612edf2a8c4fc3b781dcf92c554c0542 100644 (file)
@@ -195,7 +195,7 @@ static int write_vbus_chpInfo(struct ultra_vbus_channel_protocol *chan,
                LOGERR("vbus channel not present");
                return -1;
        }
-       off = sizeof(ULTRA_CHANNEL_PROTOCOL) + chan->HdrInfo.chpInfoByteOffset;
+       off = sizeof(struct channel_header) + chan->HdrInfo.chpInfoByteOffset;
        if (chan->HdrInfo.chpInfoByteOffset == 0) {
                LOGERR("vbus channel not used, because chpInfoByteOffset == 0");
                return -1;
@@ -214,7 +214,7 @@ static int write_vbus_busInfo(struct ultra_vbus_channel_protocol *chan,
                LOGERR("vbus channel not present");
                return -1;
        }
-       off = sizeof(ULTRA_CHANNEL_PROTOCOL) + chan->HdrInfo.busInfoByteOffset;
+       off = sizeof(struct channel_header) + chan->HdrInfo.busInfoByteOffset;
        if (chan->HdrInfo.busInfoByteOffset == 0) {
                LOGERR("vbus channel not used, because busInfoByteOffset == 0");
                return -1;
@@ -237,7 +237,7 @@ write_vbus_devInfo(struct ultra_vbus_channel_protocol *chan,
                return -1;
        }
        off =
-           (sizeof(ULTRA_CHANNEL_PROTOCOL) +
+           (sizeof(struct channel_header) +
             chan->HdrInfo.devInfoByteOffset) +
            (chan->HdrInfo.deviceInfoStructBytes * devix);
        if (chan->HdrInfo.devInfoByteOffset == 0) {
index 01a44c5535007146eb3d263d5ec6a64ca7808303..d2fc89a0bbd28ed65dfb562bd004a545a658e5e1 100644 (file)
@@ -30,7 +30,7 @@
 
 struct VISORCHANNEL_Tag {
        MEMREGION *memregion;   /* from visor_memregion_create() */
-       CHANNEL_HEADER chan_hdr;
+       struct channel_header chan_hdr;
        uuid_le guid;
        ulong size;
        BOOL needs_lock;
@@ -70,19 +70,19 @@ visorchannel_create_guts(HOSTADDRESS physaddr, ulong channelBytes,
        /* prepare chan_hdr (abstraction to read/write channel memory) */
        if (parent == NULL)
                p->memregion =
-                   visor_memregion_create(physaddr, sizeof(CHANNEL_HEADER));
+                   visor_memregion_create(physaddr,
+                                          sizeof(struct channel_header));
        else
                p->memregion =
                    visor_memregion_create_overlapped(parent->memregion,
-                                                     off,
-                                                     sizeof(CHANNEL_HEADER));
+                               off, sizeof(struct channel_header));
        if (p->memregion == NULL) {
                ERRDRV("visor_memregion_create failed failed: (status=0)\n");
                rc = NULL;
                goto Away;
        }
        if (visor_memregion_read(p->memregion, 0, &p->chan_hdr,
-                                sizeof(CHANNEL_HEADER)) < 0) {
+                                sizeof(struct channel_header)) < 0) {
                ERRDRV("visor_memregion_read failed: (status=0)\n");
                rc = NULL;
                goto Away;
@@ -225,8 +225,11 @@ visorchannel_read(VISORCHANNEL *channel, ulong offset,
 {
        int rc = visor_memregion_read(channel->memregion, offset,
                                      local, nbytes);
-       if ((rc >= 0) && (offset == 0) && (nbytes >= sizeof(CHANNEL_HEADER)))
-               memcpy(&channel->chan_hdr, local, sizeof(CHANNEL_HEADER));
+       if ((rc >= 0) && (offset == 0) &&
+          (nbytes >= sizeof(struct channel_header))) {
+               memcpy(&channel->chan_hdr, local,
+                      sizeof(struct channel_header));
+       }
        return rc;
 }
 EXPORT_SYMBOL_GPL(visorchannel_read);
@@ -235,8 +238,9 @@ int
 visorchannel_write(VISORCHANNEL *channel, ulong offset,
                   void *local, ulong nbytes)
 {
-       if (offset == 0 && nbytes >= sizeof(CHANNEL_HEADER))
-               memcpy(&channel->chan_hdr, local, sizeof(CHANNEL_HEADER));
+       if (offset == 0 && nbytes >= sizeof(struct channel_header))
+               memcpy(&channel->chan_hdr, local,
+                      sizeof(struct channel_header));
        return visor_memregion_write(channel->memregion, offset, local, nbytes);
 }
 EXPORT_SYMBOL_GPL(visorchannel_write);
@@ -316,7 +320,7 @@ sig_read_header(VISORCHANNEL *channel, u32 queue,
 {
        BOOL rc = FALSE;
 
-       if (channel->chan_hdr.oChannelSpace < sizeof(CHANNEL_HEADER)) {
+       if (channel->chan_hdr.oChannelSpace < sizeof(struct channel_header)) {
                ERRDRV("oChannelSpace too small: (status=%d)\n", rc);
                goto Away;
        }
@@ -559,8 +563,8 @@ visorchannel_debug(VISORCHANNEL *channel, int nQueues,
        HOSTADDRESS addr = 0;
        ulong nbytes = 0, nbytes_region = 0;
        MEMREGION *memregion = NULL;
-       CHANNEL_HEADER hdr;
-       CHANNEL_HEADER *phdr = &hdr;
+       struct channel_header hdr;
+       struct channel_header *phdr = &hdr;
        int i = 0;
        int errcode = 0;
 
@@ -576,7 +580,7 @@ visorchannel_debug(VISORCHANNEL *channel, int nQueues,
        addr = visor_memregion_get_physaddr(memregion);
        nbytes_region = visor_memregion_get_nbytes(memregion);
        errcode = visorchannel_read(channel, off,
-                                   phdr, sizeof(CHANNEL_HEADER));
+                                   phdr, sizeof(struct channel_header));
        if (errcode < 0) {
                seq_printf(seq,
                           "Read of channel header failed with errcode=%d)\n",
index cfacf17ad26a05163529ad4b96b928a25b6d19ee..e26db99c4d5876e5091a44c63cba90e947cdb077 100644 (file)
@@ -114,7 +114,7 @@ typedef struct {
 /* Manages the request payload in the controlvm channel */
 static CONTROLVM_PAYLOAD_INFO ControlVm_payload_info;
 
-static pCHANNEL_HEADER Test_Vnic_channel;
+static struct channel_header *Test_Vnic_channel;
 
 typedef struct {
        CONTROLVM_MESSAGE_HEADER Dumpcapture_header;