Use nested namespace for amd::smi

Signed-off-by: Mario Limonciello (AMD) <superm1@kernel.org>
Este commit está contenido en:
Mario Limonciello (AMD)
2025-08-15 14:19:13 -05:00
cometido por Galantsev, Dmitrii
padre 4a863b27ab
commit eacec681dd
Se han modificado 28 ficheros con 56 adiciones y 117 borrados
+2 -4
Ver fichero
@@ -34,8 +34,7 @@ extern "C" {
}
#endif
namespace amd {
namespace smi {
namespace amd::smi {
// Define a map of rsmi status codes to amdsmi status codes
const std::map<rsmi_status_t, amdsmi_status_t> rsmi_status_map = {
@@ -110,7 +109,6 @@ const std::map<esmi_status_t, amdsmi_status_t> esmi_status_map = {
amdsmi_status_t esmi_to_amdsmi_status(esmi_status_t status);
#endif
} // namespace smi
} // namespace amd
} // namespace amd::smi
#endif // AMD_SMI_INCLUDE_AMD_SMI_COMMON_H_
+2 -4
Ver fichero
@@ -36,8 +36,7 @@
#include "amd_smi/impl/xf86drm.h"
#include "amd_smi/impl/scoped_fd.h"
namespace amd {
namespace smi {
namespace amd::smi {
class AMDSmiDrm {
public:
@@ -64,7 +63,6 @@ class AMDSmiDrm {
};
} // namespace smi
} // namespace amd
} // namespace amd::smi
#endif // AMD_SMI_INCLUDE_IMPL_AMD_SMI_DRM_H_
+2 -4
Ver fichero
@@ -29,8 +29,7 @@
#include "amd_smi/impl/amd_smi_processor.h"
#include "amd_smi/impl/amd_smi_drm.h"
namespace amd {
namespace smi {
namespace amd::smi {
// PID, amdsmi_proc_info_t
@@ -90,7 +89,6 @@ class AMDSmiGPUDevice: public AMDSmiProcessor {
};
} // namespace smi
} // namespace amd
} // namespace amd::smi
#endif // AMD_SMI_INCLUDE_IMPL_AMD_SMI_GPU_DEVICE_H_
+2 -4
Ver fichero
@@ -29,8 +29,7 @@
#include "amd_smi/amdsmi.h"
namespace amd {
namespace smi {
namespace amd::smi {
class AMDSmiLibraryLoader {
public:
AMDSmiLibraryLoader();
@@ -76,8 +75,7 @@ template<typename T> amdsmi_status_t AMDSmiLibraryLoader::load_symbol(
return AMDSMI_STATUS_SUCCESS;
}
} // namespace smi
} // namespace amd
} // namespace amd::smi
#endif // AMD_SMI_INCLUDE_IMPL_AMD_SMI_LIB_LOADER_H_
+2 -4
Ver fichero
@@ -26,8 +26,7 @@
#include <string>
#include "amd_smi/amdsmi.h"
namespace amd {
namespace smi {
namespace amd::smi {
class AMDSmiProcessor {
public:
@@ -43,7 +42,6 @@ class AMDSmiProcessor {
uint32_t pindex_;
std::string processor_identifier_;
};
} // namespace smi
} // namespace amd
} // namespace amd::smi
#endif // AMD_SMI_INCLUDE_AMD_SMI_PROCESSOR_H_
+2 -4
Ver fichero
@@ -28,8 +28,7 @@
#include "amd_smi/amdsmi.h"
#include "amd_smi/impl/amd_smi_processor.h"
namespace amd {
namespace smi {
namespace amd::smi {
class AMDSmiSocket {
public:
@@ -76,7 +75,6 @@ class AMDSmiSocket {
std::vector<AMDSmiProcessor*> cpu_core_processors_;
};
} // namespace smi
} // namespace amd
} // namespace amd::smi
#endif // AMD_SMI_INCLUDE_AMD_SMI_SOCKET_H_
+2 -4
Ver fichero
@@ -30,8 +30,7 @@
#include "amd_smi/impl/amd_smi_processor.h"
#include "amd_smi/impl/amd_smi_drm.h"
namespace amd {
namespace smi {
namespace amd::smi {
// Singleton: Only one system in an application
class AMDSmiSystem {
@@ -80,7 +79,6 @@ class AMDSmiSystem {
std::vector<AMDSmiSocket*> sockets_;
std::set<AMDSmiProcessor*> processors_; // Track valid processors
};
} // namespace smi
} // namespace amd
} // namespace amd::smi
#endif // AMD_SMI_INCLUDE_AMD_SMI_SYSTEM_H_