drm/amd/ras: remove unused code

Remove unused code.

Signed-off-by: YiPeng Chai <YiPeng.Chai@amd.com>
Reviewed-by: Tao Zhou <tao.zhou1@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
YiPeng Chai 2026-05-12 10:40:19 +08:00 committed by Alex Deucher
parent d35e1086b0
commit b4c4d662ca
3 changed files with 1 additions and 31 deletions

View File

@ -329,7 +329,6 @@ struct ras_core_context {
struct ras_gfx ras_gfx;
struct ras_mp1 ras_mp1;
struct ras_process ras_proc;
struct ras_cmd_mgr ras_cmd;
struct ras_log_ring ras_log_ring;
const struct ras_sys_func *sys_fn;

View File

@ -28,20 +28,6 @@
#define RAS_CMD_MINOR_VERSION 0
#define RAS_CMD_VERSION (((RAS_CMD_MAJOR_VERSION) << 10) | (RAS_CMD_MINOR_VERSION))
static int ras_cmd_add_device(struct ras_core_context *ras_core)
{
INIT_LIST_HEAD(&ras_core->ras_cmd.head);
ras_core->ras_cmd.ras_core = ras_core;
ras_core->ras_cmd.dev_handle = (uintptr_t)ras_core ^ RAS_CMD_DEV_HANDLE_MAGIC;
return 0;
}
static int ras_cmd_remove_device(struct ras_core_context *ras_core)
{
memset(&ras_core->ras_cmd, 0, sizeof(ras_core->ras_cmd));
return 0;
}
static int ras_get_block_ecc_info(struct ras_core_context *ras_core,
struct ras_cmd_ctx *cmd, void *data)
{
@ -476,12 +462,11 @@ int rascore_handle_cmd(struct ras_core_context *ras_core,
int ras_cmd_init(struct ras_core_context *ras_core)
{
return ras_cmd_add_device(ras_core);
return 0;
}
int ras_cmd_fini(struct ras_core_context *ras_core)
{
ras_cmd_remove_device(ras_core);
return 0;
}
@ -530,8 +515,3 @@ int ras_cmd_translate_bank_to_soc_pa(struct ras_core_context *ras_core,
return ras_umc_translate_soc_pa_and_bank(ras_core, soc_pa, &umc_bank, true);
}
uint64_t ras_cmd_get_dev_handle(struct ras_core_context *ras_core)
{
return ras_core->ras_cmd.dev_handle;
}

View File

@ -29,8 +29,6 @@
#include "ras_log_ring.h"
#include "ras_cper.h"
#define RAS_CMD_DEV_HANDLE_MAGIC 0xFEEDAD00UL
#define RAS_CMD_MAX_IN_SIZE 256
#define RAS_CMD_MAX_GPU_NUM 32
#define RAS_CMD_MAX_BAD_PAGES_PER_GROUP 32
@ -107,12 +105,6 @@ enum ras_error_type {
struct ras_core_context;
struct ras_cmd_ctx;
struct ras_cmd_mgr {
struct list_head head;
struct ras_core_context *ras_core;
uint64_t dev_handle;
};
struct ras_cmd_func_map {
uint32_t cmd_id;
int (*func)(struct ras_core_context *ras_core,
@ -481,7 +473,6 @@ struct ras_cmd_blocks_ecc_rsp {
int ras_cmd_init(struct ras_core_context *ras_core);
int ras_cmd_fini(struct ras_core_context *ras_core);
int rascore_handle_cmd(struct ras_core_context *ras_core, struct ras_cmd_ctx *cmd, void *data);
uint64_t ras_cmd_get_dev_handle(struct ras_core_context *ras_core);
int ras_cmd_query_interface_info(struct ras_core_context *ras_core,
struct ras_query_interface_info_rsp *rsp);
int ras_cmd_translate_soc_pa_to_bank(struct ras_core_context *ras_core,