add .clang-format

Add .clang-format for automatic style.

Change-Id: I6d240009370179b5b8f1f646b0476a059ec6aa85
Signed-off-by: Patrick Venture <venture@google.com>
diff --git a/cfam_access.cpp b/cfam_access.cpp
index 78d95da..2538eb0 100644
--- a/cfam_access.cpp
+++ b/cfam_access.cpp
@@ -13,13 +13,16 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-#include <phosphor-logging/elog.hpp>
+#include "cfam_access.hpp"
+
+#include "targeting.hpp"
+
+#include <unistd.h>
+
 #include <phosphor-logging/elog-errors.hpp>
+#include <phosphor-logging/elog.hpp>
 #include <xyz/openbmc_project/Common/Device/error.hpp>
 #include <xyz/openbmc_project/Common/File/error.hpp>
-#include <unistd.h>
-#include "cfam_access.hpp"
-#include "targeting.hpp"
 
 namespace openpower
 {
@@ -32,10 +35,8 @@
 
 using namespace openpower::targeting;
 using namespace openpower::util;
-namespace file_error = sdbusplus::xyz::openbmc_project::
-        Common::File::Error;
-namespace device_error = sdbusplus::xyz::openbmc_project::
-        Common::Device::Error;
+namespace file_error = sdbusplus::xyz::openbmc_project::Common::File::Error;
+namespace device_error = sdbusplus::xyz::openbmc_project::Common::Device::Error;
 
 /**
  * Converts the CFAM register address used by the calling
@@ -47,9 +48,7 @@
     return (address & 0xFC00) | ((address & 0x03FF) << 2);
 }
 
-
-void writeReg(const std::unique_ptr<Target>& target,
-              cfam_address_t address,
+void writeReg(const std::unique_ptr<Target>& target, cfam_address_t address,
               cfam_data_t data)
 {
     using namespace phosphor::logging;
@@ -57,15 +56,14 @@
     if (rc < 0)
     {
         log<level::ERR>("Failed seeking on a processor CFAM",
-                entry("CFAM_ADDRESS=0x%X", address));
+                        entry("CFAM_ADDRESS=0x%X", address));
 
         using metadata = xyz::openbmc_project::Common::File::Seek;
 
-        elog<file_error::Seek>(
-                metadata::OFFSET(makeOffset(address)),
-                metadata::WHENCE(SEEK_SET),
-                metadata::ERRNO(errno),
-                metadata::PATH(target->getCFAMPath().c_str()));
+        elog<file_error::Seek>(metadata::OFFSET(makeOffset(address)),
+                               metadata::WHENCE(SEEK_SET),
+                               metadata::ERRNO(errno),
+                               metadata::PATH(target->getCFAMPath().c_str()));
     }
 
     data = target->swapEndian(data);
@@ -76,13 +74,11 @@
         using metadata = xyz::openbmc_project::Common::Device::WriteFailure;
 
         elog<device_error::WriteFailure>(
-                metadata::CALLOUT_ERRNO(errno),
-                metadata::CALLOUT_DEVICE_PATH(
-                        target->getCFAMPath().c_str()));
+            metadata::CALLOUT_ERRNO(errno),
+            metadata::CALLOUT_DEVICE_PATH(target->getCFAMPath().c_str()));
     }
 }
 
-
 cfam_data_t readReg(const std::unique_ptr<Target>& target,
                     cfam_address_t address)
 {
@@ -94,15 +90,14 @@
     if (rc < 0)
     {
         log<level::ERR>("Failed seeking on a processor CFAM",
-                entry("CFAM_ADDRESS=0x%X", address));
+                        entry("CFAM_ADDRESS=0x%X", address));
 
         using metadata = xyz::openbmc_project::Common::File::Seek;
 
-        elog<file_error::Seek>(
-                metadata::OFFSET(makeOffset(address)),
-                metadata::WHENCE(SEEK_SET),
-                metadata::ERRNO(errno),
-                metadata::PATH(target->getCFAMPath().c_str()));
+        elog<file_error::Seek>(metadata::OFFSET(makeOffset(address)),
+                               metadata::WHENCE(SEEK_SET),
+                               metadata::ERRNO(errno),
+                               metadata::PATH(target->getCFAMPath().c_str()));
     }
 
     rc = read(target->getCFAMFD(), &data, cfamRegSize);
@@ -118,10 +113,8 @@
     return target->swapEndian(data);
 }
 
-
 void writeRegWithMask(const std::unique_ptr<Target>& target,
-                      cfam_address_t address,
-                      cfam_data_t data,
+                      cfam_address_t address, cfam_data_t data,
                       cfam_mask_t mask)
 {
     cfam_data_t readData = readReg(target, address);
@@ -132,6 +125,6 @@
     writeReg(target, address, readData);
 }
 
-}
-}
-}
+} // namespace access
+} // namespace cfam
+} // namespace openpower