Remove error spam in getGenerationInUse

Cached the linkSpeed that is known to be invalid PCIe type. Only print
the error once to avoid duplicated messages.

Removing the spam to help reduce the noise in the BMC logs.

Tested:
```
systemctl status xyz.openbmc_project.PCIe.service
* xyz.openbmc_project.PCIe.service - Service to get PCIe info over PECI
     Loaded: loaded (/lib/systemd/system/xyz.openbmc_project.PCIe.service; enabled; preset: enabled)
     Active: active (running) since Fri 2018-03-09 15:06:10 UTC; 10min ago
   Main PID: 2382 (peci-pcie)
     CGroup: /system.slice/xyz.openbmc_project.PCIe.service
             `-2382 /usr/bin/peci-pcie

Mar 09 15:06:10 [host] systemd[1]: Started Service to get PCIe info over PECI.
Mar 09 15:06:10 [host] peci-pcie[2382]: PECI set dev names to /dev/peci-default, /dev/peci-0
Mar 09 15:07:20 [host] peci-pcie[2382]: PCIe scan started
Mar 09 15:07:20 [host] peci-pcie[2382]: Link speed : 0 can not mapping to PCIe type list.
Mar 09 15:08:06 [host] peci-pcie[2382]: PCIe scan completed
```

Change-Id: Ie84f3951e80a6c38dd2fdbe853b8e468a249e264
Signed-off-by: Willy Tu <wltu@google.com>
diff --git a/src/peci_pcie.cpp b/src/peci_pcie.cpp
index 0c1a070..34fe1fc 100644
--- a/src/peci_pcie.cpp
+++ b/src/peci_pcie.cpp
@@ -30,6 +30,7 @@
 #include <iostream>
 #include <set>
 #include <sstream>
+#include <unordered_set>
 
 namespace peci_pcie
 {
@@ -309,6 +310,7 @@
 static resCode getGenerationInUse(const int& clientAddr, const int& bus,
                                   const int& dev, std::string& generationInUse)
 {
+    static std::unordered_set<uint32_t> linkSpeedSkipMap;
     resCode error;
     std::string res;
     uint32_t capReading = 0;
@@ -355,8 +357,12 @@
             error = resCode::resOk;
             break;
         default:
-            std::cerr << "Link speed : " << linkSpeed
-                      << " can not mapping to PCIe type list.\n";
+            if (!linkSpeedSkipMap.contains(linkSpeed))
+            {
+                std::cerr << "Link speed : " << linkSpeed
+                          << " can not mapping to PCIe type list.\n";
+                linkSpeedSkipMap.emplace(linkSpeed);
+            }
             error = resCode::resSkip;
     }
     return error;