summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Romer <benjamin.romer@unisys.com>2014-12-05 17:08:52 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-01-09 17:32:32 -0800
commiteb4a1468029bb96ffd74f1047fba699aaa54295c (patch)
treedf6ef0214ad494dc4f2c05d68c761755dd2d5f00
parentb98ab24cdfe6817ac6ab4cc30566dde1f88f1589 (diff)
staging: unisys: refactor init_vbus_channel()
Clean up the function definition so it's a single line. Remove the unnecessary goto statements and just return directly. Remove the unneeded local variable for the return result. Fix CamelCase parameters and local variable names: channelAddr => ch_addr channelBytes => ch_bytes pChan => ch Signed-off-by: Bryan Thompson <bryan.thompson@unisys.com> Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/unisys/uislib/uislib.c26
1 files changed, 10 insertions, 16 deletions
diff --git a/drivers/staging/unisys/uislib/uislib.c b/drivers/staging/unisys/uislib/uislib.c
index ead02909c1e5..08416d2e9019 100644
--- a/drivers/staging/unisys/uislib/uislib.c
+++ b/drivers/staging/unisys/uislib/uislib.c
@@ -128,28 +128,22 @@ init_msg_header(struct controlvm_message *msg, u32 id, uint rsp, uint svr)
msg->hdr.flags.server = svr;
}
-static __iomem void *
-init_vbus_channel(u64 channelAddr, u32 channelBytes)
+static __iomem void *init_vbus_channel(u64 ch_addr, u32 ch_bytes)
{
- void __iomem *rc = NULL;
- void __iomem *pChan = uislib_ioremap_cache(channelAddr, channelBytes);
+ void __iomem *ch = uislib_ioremap_cache(ch_addr, ch_bytes);
- if (!pChan) {
+ if (!ch) {
LOGERR("CONTROLVM_BUS_CREATE error: ioremap_cache of channelAddr:%Lx for channelBytes:%llu failed",
- (unsigned long long)channelAddr,
- (unsigned long long)channelBytes);
- rc = NULL;
- goto Away;
+ (unsigned long long)ch_addr,
+ (unsigned long long)ch_bytes);
+ return NULL;
}
- if (!SPAR_VBUS_CHANNEL_OK_CLIENT(pChan)) {
+ if (!SPAR_VBUS_CHANNEL_OK_CLIENT(ch)) {
ERRDRV("%s channel cannot be used", __func__);
- uislib_iounmap(pChan);
- rc = NULL;
- goto Away;
+ uislib_iounmap(ch);
+ return NULL;
}
- rc = pChan;
-Away:
- return rc;
+ return ch;
}
static int