summaryrefslogtreecommitdiffstats
path: root/drivers/staging/unisys/common-spar
diff options
context:
space:
mode:
authorBenjamin Romer <benjamin.romer@unisys.com>2014-10-23 14:31:05 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-10-27 10:33:15 +0800
commite80f6e3bd6f305fa551526b709e4d319126feb83 (patch)
tree954e86e40f62d9dc59f465d2929814fde7297ff0 /drivers/staging/unisys/common-spar
parentbedc756e3ae6b367cb740ddb5480dd63479b8a19 (diff)
downloadlinux-e80f6e3bd6f305fa551526b709e4d319126feb83.tar.gz
linux-e80f6e3bd6f305fa551526b709e4d319126feb83.tar.bz2
linux-e80f6e3bd6f305fa551526b709e4d319126feb83.zip
staging: unisys: remove unused code from iochannel.h
The following macros and functions are unused, and should be deleted: NUMSIGNALS IO_CHANNEL_SIZE QSLOTSFROMBYTES QSIZEFROMBYTES SignalQInit INIT_CLIENTSTRING ULTRA_IO_CHANNEL_SERVER_READY ULTRA_IO_CHANNEL_SERVER_NOTREADY ULTRA_VHBA_init_channel ULTRA_VHBA_set_max ULTRA_VNIC_init_channel Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/unisys/common-spar')
-rw-r--r--drivers/staging/unisys/common-spar/include/channels/iochannel.h125
1 files changed, 0 insertions, 125 deletions
diff --git a/drivers/staging/unisys/common-spar/include/channels/iochannel.h b/drivers/staging/unisys/common-spar/include/channels/iochannel.h
index 071cf72125a1..eb7efe484f6f 100644
--- a/drivers/staging/unisys/common-spar/include/channels/iochannel.h
+++ b/drivers/staging/unisys/common-spar/include/channels/iochannel.h
@@ -712,136 +712,11 @@ struct spar_io_channel_protocol {
* INLINE functions for initializing and accessing I/O data channels
*/
-#define NUMSIGNALS(x, q) \
- (((struct spar_io_channel_protocol *)(x))->q.MaxSignalSlots)
#define SIZEOF_PROTOCOL (COVER(sizeof(struct spar_io_channel_protocol), 64))
#define SIZEOF_CMDRSP (COVER(sizeof(struct uiscmdrsp), 64))
-#define IO_CHANNEL_SIZE(x) COVER(SIZEOF_PROTOCOL + \
- (NUMSIGNALS(x, cmd_q) + \
- NUMSIGNALS(x, rsp_q)) * SIZEOF_CMDRSP, 4096)
#define MIN_IO_CHANNEL_SIZE COVER(SIZEOF_PROTOCOL + \
2 * MIN_NUMSIGNALS * SIZEOF_CMDRSP, 4096)
-#ifdef __GNUC__
-/* These defines should only ever be used in service partitons */
-/* because they rely on the size of uiscmdrsp */
-#define QSLOTSFROMBYTES(bytes) (((bytes-SIZEOF_PROTOCOL)/2)/SIZEOF_CMDRSP)
-#define QSIZEFROMBYTES(bytes) (QSLOTSFROMBYTES(bytes)*SIZEOF_CMDRSP)
-#define SignalQInit(x) \
- do { \
- x->cmd_q.size = QSIZEFROMBYTES(x->channel_header.size); \
- x->cmd_q.sig_base_offset = SIZEOF_PROTOCOL - \
- offsetof(struct spar_io_channel_protocol, cmd_q);\
- x->cmd_q.signal_size = SIZEOF_CMDRSP; \
- x->cmd_q.max_slots = \
- QSLOTSFROMBYTES(x->channel_header.size); \
- x->cmd_q.max_signals = x->cmd_q.max_slots - 1; \
- x->rsp_q.size = QSIZEFROMBYTES(x->channel_header.size); \
- x->rsp_q.sig_base_offset = \
- (SIZEOF_PROTOCOL + x->cmd_q.size) - \
- offsetof(struct spar_io_channel_protocol, rsp_q);\
- x->rsp_q.signal_size = SIZEOF_CMDRSP; \
- x->rsp_q.max_slots = \
- QSLOTSFROMBYTES(x->channel_header.size); \
- x->rsp_q.max_signals = x->rsp_q.max_slots - 1; \
- x->channel_header.ch_space_offset = \
- offsetof(struct spar_io_channel_protocol, cmd_q);\
- } while (0)
-
-#define INIT_CLIENTSTRING(chan, type, clientStr, clientStrLen) \
- do { \
- if (clientStr) { \
- chan->channel_header.cli_str_offset = \
- offsetof(type, client_string); \
- memcpy(chan->client_string, clientStr, \
- MINNUM(clientStrLen, \
- (u32)(MAX_CLIENTSTRING_LEN - 1))); \
- chan->client_string[MINNUM(clientStrLen, \
- (u32)(MAX_CLIENTSTRING_LEN \
- - 1))] \
- = '\0'; \
- } \
- else \
- if (clientStrLen > 0) \
- return 0; \
- } while (0)
-
-#define ULTRA_IO_CHANNEL_SERVER_READY(x, chanId, logCtx) \
- ULTRA_CHANNEL_SERVER_TRANSITION(x, chanId, SrvState, CHANNELSRV_READY, \
- logCtx)
-
-#define ULTRA_IO_CHANNEL_SERVER_NOTREADY(x, chanId, logCtx) \
- ULTRA_CHANNEL_SERVER_TRANSITION(x, chanId, SrvState, \
- CHANNELSRV_UNINITIALIZED, logCtx)
-
-static inline int ULTRA_VHBA_init_channel(struct spar_io_channel_protocol *x,
- struct vhba_wwnn *wwnn,
- struct vhba_config_max *max,
- unsigned char *clientStr,
- u32 clientStrLen, u64 bytes) {
- memset(x, 0, sizeof(struct spar_io_channel_protocol));
- x->channel_header.version_id = ULTRA_VHBA_CHANNEL_PROTOCOL_VERSIONID;
- x->channel_header.signature = ULTRA_VHBA_CHANNEL_PROTOCOL_SIGNATURE;
- x->channel_header.srv_state = CHANNELSRV_UNINITIALIZED;
- x->channel_header.header_size = sizeof(x->channel_header);
- x->channel_header.size = COVER(bytes, 4096);
- x->channel_header.chtype = spar_vhba_channel_protocol_uuid;
- x->channel_header.zone_uuid = NULL_UUID_LE;
- x->vhba.wwnn = *wwnn;
- x->vhba.max = *max;
- INIT_CLIENTSTRING(x, struct spar_io_channel_protocol, clientStr,
- clientStrLen);
- SignalQInit(x);
- if ((x->cmd_q.max_slots > MAX_NUMSIGNALS) ||
- (x->rsp_q.max_slots > MAX_NUMSIGNALS)) {
- return 0;
- }
- if ((x->cmd_q.max_slots < MIN_NUMSIGNALS) ||
- (x->rsp_q.max_slots < MIN_NUMSIGNALS)) {
- return 0;
- }
- return 1;
-}
-
-static inline void ULTRA_VHBA_set_max(struct spar_io_channel_protocol *x,
- struct vhba_config_max *max) {
- x->vhba.max = *max;
-}
-
-static inline int ULTRA_VNIC_init_channel(struct spar_io_channel_protocol *x,
- unsigned char *macaddr,
- u32 num_rcv_bufs, u32 mtu,
- uuid_le zoneGuid,
- unsigned char *clientStr,
- u32 clientStrLen,
- u64 bytes) {
- memset(x, 0, sizeof(struct spar_io_channel_protocol));
- x->channel_header.version_id = ULTRA_VNIC_CHANNEL_PROTOCOL_VERSIONID;
- x->channel_header.signature = ULTRA_VNIC_CHANNEL_PROTOCOL_SIGNATURE;
- x->channel_header.srv_state = CHANNELSRV_UNINITIALIZED;
- x->channel_header.header_size = sizeof(x->channel_header);
- x->channel_header.size = COVER(bytes, 4096);
- x->channel_header.chtype = spar_vnic_channel_protocol_uuid;
- x->channel_header.zone_uuid = NULL_UUID_LE;
- memcpy(x->vnic.macaddr, macaddr, MAX_MACADDR_LEN);
- x->vnic.num_rcv_bufs = num_rcv_bufs;
- x->vnic.mtu = mtu;
- x->vnic.zone_uuid = zoneGuid;
- INIT_CLIENTSTRING(x, struct spar_io_channel_protocol, clientStr,
- clientStrLen);
- SignalQInit(x);
- if ((x->cmd_q.max_slots > MAX_NUMSIGNALS) ||
- (x->rsp_q.max_slots > MAX_NUMSIGNALS)) {
- return 0;
- }
- if ((x->cmd_q.max_slots < MIN_NUMSIGNALS) ||
- (x->rsp_q.max_slots < MIN_NUMSIGNALS)) {
- return 0;
- }
- return 1;
-}
-
-#endif /* __GNUC__ */
/*
* INLINE function for expanding a guest's pfn-off-size into multiple 4K page