]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/amd/ras: remove unused code
authorYiPeng Chai <YiPeng.Chai@amd.com>
Tue, 12 May 2026 02:40:19 +0000 (10:40 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 19 May 2026 15:53:04 +0000 (11:53 -0400)
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>
drivers/gpu/drm/amd/ras/rascore/ras.h
drivers/gpu/drm/amd/ras/rascore/ras_cmd.c
drivers/gpu/drm/amd/ras/rascore/ras_cmd.h

index 6449d7b8627d6a18cc46aabfc0257cfd375bba92..c059fcebaf005b321c203544ba80fd14fe571e3b 100644 (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;
index c22c48dec7bbfd95355ab4ebdb1d3c51afd922ce..405154ff13cf8baff88b5c44034b5f7c8361aef6 100644 (file)
 #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;
-}
index a1d4b8b028412bcd48db2bb0e798349d91a17323..c376e074e15dacb9da76096e77e12126215bed59 100644 (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,