user_channel: Optimize ipmi complete code

Encapsulate the custom status return code into an ipmi method and
then use it in cpp.

Change-Id: I72ce8bb4d262c98cb41635c985e229e1f9b593a3
Signed-off-by: George Liu <liuxiwei@ieisystem.com>
diff --git a/user_channel/channelcommands.cpp b/user_channel/channelcommands.cpp
index b4caf0c..0fee78f 100644
--- a/user_channel/channelcommands.cpp
+++ b/user_channel/channelcommands.cpp
@@ -65,7 +65,7 @@
     {
         lg2::debug("Set channel access - No support on channel: {CHANNEL}",
                    "CHANNEL", chNum);
-        return response(ccActionNotSupportedForChannel);
+        return responseActionNotSupportedForChannel();
     }
 
     ChannelAccess chActData;
@@ -101,7 +101,7 @@
         case reserved:
         default:
             lg2::debug("Set channel access - Invalid access set mode");
-            return response(ccAccessModeNotSupportedForChannel);
+            return responseAccessModeNotSupportedForChannel();
     }
 
     // cannot static cast directly from uint2_t to enum; must go via int
@@ -122,7 +122,7 @@
         case reserved:
         default:
             lg2::debug("Set channel access - Invalid access priv mode");
-            return response(ccAccessModeNotSupportedForChannel);
+            return responseAccessModeNotSupportedForChannel();
     }
 
     if (setNVFlag != 0)
@@ -197,7 +197,7 @@
     {
         lg2::debug("Get channel access - No support on channel: {CHANNEL}",
                    "CHANNEL", chNum);
-        return response(ccActionNotSupportedForChannel);
+        return responseActionNotSupportedForChannel();
     }
 
     ChannelAccess chAccess = {};
@@ -343,7 +343,7 @@
     if (getChannelSessionSupport(chNum) == EChannelSessSupported::none)
     {
         lg2::debug("Get channel payload - No support on channel");
-        return response(ccActionNotSupportedForChannel);
+        return responseActionNotSupportedForChannel();
     }
     constexpr uint16_t stdPayloadType = standardPayloadBit(PayloadType::IPMI) |
                                         standardPayloadBit(PayloadType::SOL);