PEL: Move util namespace to bottom of pel.cpp

It makes more sense for the util code to be at the bottom
of the file rather than in the middle.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I46fe120849377bdf9397aa72addda1e9dfa4e56c
diff --git a/extensions/openpower-pels/pel.cpp b/extensions/openpower-pels/pel.cpp
index 6d3f010..625d177 100644
--- a/extensions/openpower-pels/pel.cpp
+++ b/extensions/openpower-pels/pel.cpp
@@ -204,43 +204,6 @@
     _uh->setEventType(eventType);
 }
 
-namespace util
-{
-
-std::unique_ptr<UserData> makeADUserDataSection(const AdditionalData& ad)
-{
-    assert(!ad.empty());
-    nlohmann::json json;
-
-    // Remove the 'ESEL' entry, as it contains a full PEL in the value.
-    if (ad.getValue("ESEL"))
-    {
-        auto newAD = ad;
-        newAD.remove("ESEL");
-        json = newAD.toJSON();
-    }
-    else
-    {
-        json = ad.toJSON();
-    }
-
-    auto jsonString = json.dump();
-    std::vector<uint8_t> jsonData(jsonString.begin(), jsonString.end());
-
-    // Pad to a 4 byte boundary
-    while ((jsonData.size() % 4) != 0)
-    {
-        jsonData.push_back(0);
-    }
-
-    return std::make_unique<UserData>(
-        static_cast<uint16_t>(ComponentID::phosphorLogging),
-        static_cast<uint8_t>(UserDataFormat::json),
-        static_cast<uint8_t>(UserDataFormatVersion::json), jsonData);
-}
-
-} // namespace util
-
 void PEL::printSectionInJSON(const Section& section, std::string& buf,
                              std::map<uint16_t, size_t>& pluralSections) const
 {
@@ -333,5 +296,42 @@
     std::cout << buf << std::endl;
 }
 
+namespace util
+{
+
+std::unique_ptr<UserData> makeADUserDataSection(const AdditionalData& ad)
+{
+    assert(!ad.empty());
+    nlohmann::json json;
+
+    // Remove the 'ESEL' entry, as it contains a full PEL in the value.
+    if (ad.getValue("ESEL"))
+    {
+        auto newAD = ad;
+        newAD.remove("ESEL");
+        json = newAD.toJSON();
+    }
+    else
+    {
+        json = ad.toJSON();
+    }
+
+    auto jsonString = json.dump();
+    std::vector<uint8_t> jsonData(jsonString.begin(), jsonString.end());
+
+    // Pad to a 4 byte boundary
+    while ((jsonData.size() % 4) != 0)
+    {
+        jsonData.push_back(0);
+    }
+
+    return std::make_unique<UserData>(
+        static_cast<uint16_t>(ComponentID::phosphorLogging),
+        static_cast<uint8_t>(UserDataFormat::json),
+        static_cast<uint8_t>(UserDataFormatVersion::json), jsonData);
+}
+
+} // namespace util
+
 } // namespace pels
 } // namespace openpower