diff --git a/.clang-format b/.clang-format
index d43e884..28e3328 100644
--- a/.clang-format
+++ b/.clang-format
@@ -87,7 +87,7 @@
 IndentWrappedFunctionNames: true
 InsertNewlineAtEOF: true
 KeepEmptyLinesAtTheStartOfBlocks: false
-LambdaBodyIndentation: OuterScope
+LambdaBodyIndentation: Signature
 LineEnding: LF
 MacroBlockBegin: ''
 MacroBlockEnd:   ''
@@ -98,13 +98,14 @@
 ObjCSpaceBeforeProtocolList: true
 PackConstructorInitializers: BinPack
 PenaltyBreakAssignment: 25
-PenaltyBreakBeforeFirstCallParameter: 19
+PenaltyBreakBeforeFirstCallParameter: 50
 PenaltyBreakComment: 300
 PenaltyBreakFirstLessLess: 120
 PenaltyBreakString: 1000
+PenaltyBreakTemplateDeclaration: 10
 PenaltyExcessCharacter: 1000000
 PenaltyReturnTypeOnItsOwnLine: 60
-PenaltyIndentedWhitespace: 0
+PenaltyIndentedWhitespace: 1
 PointerAlignment: Left
 QualifierAlignment: Left
 ReferenceAlignment: Left
diff --git a/ssifbridged.cpp b/ssifbridged.cpp
index 375008c..e503fe0 100644
--- a/ssifbridged.cpp
+++ b/ssifbridged.cpp
@@ -58,8 +58,8 @@
 class SsifChannel
 {
   public:
-    static constexpr size_t ssifMessageSize = ipmiSsifPayloadMax +
-                                              sizeof(unsigned int);
+    static constexpr size_t ssifMessageSize =
+        ipmiSsifPayloadMax + sizeof(unsigned int);
     size_t sizeofLenField = sizeof(unsigned int);
     static constexpr uint8_t netFnShift = 2;
     static constexpr uint8_t lunMask = (1 << netFnShift) - 1;
@@ -104,8 +104,7 @@
 SsifChannel::SsifChannel(std::shared_ptr<boost::asio::io_context>& io,
                          std::shared_ptr<sdbusplus::asio::connection>& bus,
                          const std::string& device, bool verbose) :
-    dev(*io),
-    io(io), bus(bus), verbose(verbose), rspTimer(*io)
+    dev(*io), io(io), bus(bus), verbose(verbose), rspTimer(*io)
 {
     std::string devName(devBase);
     if (!device.empty())
@@ -147,11 +146,12 @@
 
 void SsifChannel::asyncRead()
 {
-    boost::asio::async_read(dev,
-                            boost::asio::buffer(xferBuffer, xferBuffer.size()),
-                            boost::asio::transfer_at_least(2),
-                            [this](const boost::system::error_code& ec,
-                                   size_t rlen) { processMessage(ec, rlen); });
+    boost::asio::async_read(
+        dev, boost::asio::buffer(xferBuffer, xferBuffer.size()),
+        boost::asio::transfer_at_least(2),
+        [this](const boost::system::error_code& ec, size_t rlen) {
+            processMessage(ec, rlen);
+        });
 }
 
 int SsifChannel::showNumOfReqNotRsp() const
@@ -170,28 +170,29 @@
     IpmiCmd& prevReqCmd = ssifchannel->prevReqCmd;
     rsp.resize(ssifchannel->sizeofLenField + sizeof(prevReqCmd.cmd) +
                sizeof(prevReqCmd.netfn) + sizeof(ccResponseNotAvailable));
-    std::string msgToLog = "timeout, send response to keep host alive"
-                           " netfn=" +
-                           std::to_string(prevReqCmd.netfn) +
-                           " lun=" + std::to_string(prevReqCmd.lun) +
-                           " cmd=" + std::to_string(prevReqCmd.cmd) +
-                           " cc=" + std::to_string(ccResponseNotAvailable) +
-                           " numberOfReqNotRsp=" +
-                           std::to_string(ssifchannel->showNumOfReqNotRsp());
+    std::string msgToLog =
+        "timeout, send response to keep host alive"
+        " netfn=" +
+        std::to_string(prevReqCmd.netfn) +
+        " lun=" + std::to_string(prevReqCmd.lun) +
+        " cmd=" + std::to_string(prevReqCmd.cmd) +
+        " cc=" + std::to_string(ccResponseNotAvailable) +
+        " numberOfReqNotRsp=" +
+        std::to_string(ssifchannel->showNumOfReqNotRsp());
     log<level::INFO>(msgToLog.c_str());
     // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     unsigned int* t = reinterpret_cast<unsigned int*>(rsp.data());
     *t = 3;
-    rsp[ssifchannel->sizeofLenField] = ((prevReqCmd.netfn + 1)
-                                        << ssifchannel->netFnShift) |
-                                       (prevReqCmd.lun & ssifchannel->lunMask);
+    rsp[ssifchannel->sizeofLenField] =
+        ((prevReqCmd.netfn + 1) << ssifchannel->netFnShift) |
+        (prevReqCmd.lun & ssifchannel->lunMask);
     rsp[ssifchannel->sizeofLenField + 1] = prevReqCmd.cmd;
     rsp[ssifchannel->sizeofLenField + 2] = ccResponseNotAvailable;
 
     boost::system::error_code ecWr;
 
-    size_t wlen = boost::asio::write(ssifchannel->dev, boost::asio::buffer(rsp),
-                                     ecWr);
+    size_t wlen =
+        boost::asio::write(ssifchannel->dev, boost::asio::buffer(rsp), ecWr);
     if (ecWr || wlen != rsp.size())
     {
         msgToLog =
@@ -358,8 +359,8 @@
     bus->async_method_call_timed(
         [this](const boost::system::error_code& ec,
                const IpmiDbusRspType& response) {
-        afterMethodCall(ec, response);
-    },
+            afterMethodCall(ec, response);
+        },
         ipmiQueueService, ipmiQueuePath, ipmiQueueIntf, ipmiQueueMethod,
         dbusTimeout, netfn, lun, cmd, data, options);
 }
