summaryrefslogtreecommitdiffstats
path: root/user_channel/channel_layer.cpp
diff options
context:
space:
mode:
authorRichard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>2018-12-03 15:08:59 +0530
committerVernon Mauery <vernon.mauery@linux.intel.com>2018-12-11 14:29:30 +0000
commita45cb34ff6e6c778e2d2b86518afb8bc0a54d189 (patch)
tree605604911d40cc575c6be9fa927e6922de1e571c /user_channel/channel_layer.cpp
parentae4b040bd08839efcbc08a78d4f6ce6d77e66050 (diff)
downloadphosphor-host-ipmid-a45cb34ff6e6c778e2d2b86518afb8bc0a54d189.tar.gz
phosphor-host-ipmid-a45cb34ff6e6c778e2d2b86518afb8bc0a54d189.zip
Update const uint8_t& to const uint8_t
Update const uint8_t& to const uint8_t usage. Passing by reference for small types are costly than passing it by value and hence the change is done Unit-Test 1. Performed build and verified regular user account creation and RMCP+ login Change-Id: Ic2dd76795749148f82564677dde2a5db08520454 Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
Diffstat (limited to 'user_channel/channel_layer.cpp')
-rw-r--r--user_channel/channel_layer.cpp32
1 files changed, 16 insertions, 16 deletions
diff --git a/user_channel/channel_layer.cpp b/user_channel/channel_layer.cpp
index 32f4ded..ae23f3f 100644
--- a/user_channel/channel_layer.cpp
+++ b/user_channel/channel_layer.cpp
@@ -23,7 +23,7 @@
namespace ipmi
{
-bool doesDeviceExist(const uint8_t& chNum)
+bool doesDeviceExist(const uint8_t chNum)
{
// TODO: This is not the reliable way to find the device
// associated with ethernet interface as the channel number to
@@ -42,34 +42,34 @@ bool doesDeviceExist(const uint8_t& chNum)
return true;
}
-bool isValidPrivLimit(const uint8_t& privLimit)
+bool isValidPrivLimit(const uint8_t privLimit)
{
return ((privLimit >= PRIVILEGE_CALLBACK) && (privLimit <= PRIVILEGE_OEM));
}
-bool isValidAccessMode(const uint8_t& accessMode)
+bool isValidAccessMode(const uint8_t accessMode)
{
return (
(accessMode >= static_cast<uint8_t>(EChannelAccessMode::disabled)) &&
(accessMode <= static_cast<uint8_t>(EChannelAccessMode::shared)));
}
-bool isValidChannel(const uint8_t& chNum)
+bool isValidChannel(const uint8_t chNum)
{
return getChannelConfigObject().isValidChannel(chNum);
}
-bool isValidAuthType(const uint8_t& chNum, const EAuthType& authType)
+bool isValidAuthType(const uint8_t chNum, const EAuthType& authType)
{
return getChannelConfigObject().isValidAuthType(chNum, authType);
}
-EChannelSessSupported getChannelSessionSupport(const uint8_t& chNum)
+EChannelSessSupported getChannelSessionSupport(const uint8_t chNum)
{
return getChannelConfigObject().getChannelSessionSupport(chNum);
}
-int getChannelActiveSessions(const uint8_t& chNum)
+int getChannelActiveSessions(const uint8_t chNum)
{
return getChannelConfigObject().getChannelActiveSessions(chNum);
}
@@ -80,48 +80,48 @@ ipmi_ret_t ipmiChannelInit()
return IPMI_CC_OK;
}
-ipmi_ret_t getChannelInfo(const uint8_t& chNum, ChannelInfo& chInfo)
+ipmi_ret_t getChannelInfo(const uint8_t chNum, ChannelInfo& chInfo)
{
return getChannelConfigObject().getChannelInfo(chNum, chInfo);
}
-ipmi_ret_t getChannelAccessData(const uint8_t& chNum,
+ipmi_ret_t getChannelAccessData(const uint8_t chNum,
ChannelAccess& chAccessData)
{
return getChannelConfigObject().getChannelAccessData(chNum, chAccessData);
}
-ipmi_ret_t setChannelAccessData(const uint8_t& chNum,
+ipmi_ret_t setChannelAccessData(const uint8_t chNum,
const ChannelAccess& chAccessData,
- const uint8_t& setFlag)
+ const uint8_t setFlag)
{
return getChannelConfigObject().setChannelAccessData(chNum, chAccessData,
setFlag);
}
-ipmi_ret_t getChannelAccessPersistData(const uint8_t& chNum,
+ipmi_ret_t getChannelAccessPersistData(const uint8_t chNum,
ChannelAccess& chAccessData)
{
return getChannelConfigObject().getChannelAccessPersistData(chNum,
chAccessData);
}
-ipmi_ret_t setChannelAccessPersistData(const uint8_t& chNum,
+ipmi_ret_t setChannelAccessPersistData(const uint8_t chNum,
const ChannelAccess& chAccessData,
- const uint8_t& setFlag)
+ const uint8_t setFlag)
{
return getChannelConfigObject().setChannelAccessPersistData(
chNum, chAccessData, setFlag);
}
-ipmi_ret_t getChannelAuthTypeSupported(const uint8_t& chNum,
+ipmi_ret_t getChannelAuthTypeSupported(const uint8_t chNum,
uint8_t& authTypeSupported)
{
return getChannelConfigObject().getChannelAuthTypeSupported(
chNum, authTypeSupported);
}
-ipmi_ret_t getChannelEnabledAuthType(const uint8_t& chNum, const uint8_t& priv,
+ipmi_ret_t getChannelEnabledAuthType(const uint8_t chNum, const uint8_t priv,
EAuthType& authType)
{
return getChannelConfigObject().getChannelEnabledAuthType(chNum, priv,
OpenPOWER on IntegriCloud