提交 548950a2 编写于 作者: K Ken Cox 提交者: Greg Kroah-Hartman

Staging: unisys: Remove isServer arg from init_vbus_channel()

The init_vbus_channel() function is never called with the isServer
argument equal to TRUE, so just get rid of the argument altogether.
This also means that the code in the function that would be executed
in the server case can be removed since it is never executed.
Signed-off-by: NKen Cox <jkc@redhat.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 960e0a5f
...@@ -129,7 +129,7 @@ init_msg_header(CONTROLVM_MESSAGE *msg, U32 id, uint rsp, uint svr) ...@@ -129,7 +129,7 @@ init_msg_header(CONTROLVM_MESSAGE *msg, U32 id, uint rsp, uint svr)
} }
static __iomem void * static __iomem void *
init_vbus_channel(U64 channelAddr, U32 channelBytes, int isServer) init_vbus_channel(U64 channelAddr, U32 channelBytes)
{ {
void __iomem *rc = NULL; void __iomem *rc = NULL;
void __iomem *pChan = uislib_ioremap_cache(channelAddr, channelBytes); void __iomem *pChan = uislib_ioremap_cache(channelAddr, channelBytes);
...@@ -140,22 +140,11 @@ init_vbus_channel(U64 channelAddr, U32 channelBytes, int isServer) ...@@ -140,22 +140,11 @@ init_vbus_channel(U64 channelAddr, U32 channelBytes, int isServer)
rc = NULL; rc = NULL;
goto Away; goto Away;
} }
if (isServer) { if (!ULTRA_VBUS_CHANNEL_OK_CLIENT(pChan, NULL)) {
memset_io(pChan, 0, channelBytes); ERRDRV("%s channel cannot be used", __func__);
if (!ULTRA_VBUS_CHANNEL_OK_SERVER(channelBytes, NULL)) { uislib_iounmap(pChan);
ERRDRV("%s channel cannot be used", __func__); rc = NULL;
uislib_iounmap(pChan); goto Away;
rc = NULL;
goto Away;
}
ultra_vbus_init_channel(pChan, channelBytes);
} else {
if (!ULTRA_VBUS_CHANNEL_OK_CLIENT(pChan, NULL)) {
ERRDRV("%s channel cannot be used", __func__);
uislib_iounmap(pChan);
rc = NULL;
goto Away;
}
} }
rc = pChan; rc = pChan;
Away: Away:
...@@ -235,8 +224,7 @@ create_bus(CONTROLVM_MESSAGE *msg, char *buf) ...@@ -235,8 +224,7 @@ create_bus(CONTROLVM_MESSAGE *msg, char *buf)
bus->busChannelBytes = msg->cmd.createBus.channelBytes; bus->busChannelBytes = msg->cmd.createBus.channelBytes;
bus->pBusChannel = bus->pBusChannel =
init_vbus_channel(msg->cmd.createBus.channelAddr, init_vbus_channel(msg->cmd.createBus.channelAddr,
msg->cmd.createBus.channelBytes, msg->cmd.createBus.channelBytes);
msg->hdr.Flags.server);
} }
/* the msg is bound for virtpci; send guest_msgs struct to callback */ /* the msg is bound for virtpci; send guest_msgs struct to callback */
if (!msg->hdr.Flags.server) { if (!msg->hdr.Flags.server) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册