From 742301572edade8c9b8e84e1f904666d7ca2765c Mon Sep 17 00:00:00 2001 From: WangYuli Date: Wed, 20 Nov 2024 14:45:28 +0800 Subject: [PATCH] scsi/linkdata: donot assigning value of variable of type to itself Fix follow compile errors with clang-19: drivers/scsi/linkdata/ps3_device_manager_sas.c:234:11: error: explicitly assigning value of variable of type 'struct ps3_instance *' to itself [-Werror,-Wself-assign] 234 | instance = instance; | ~~~~~~~~ ^ ~~~~~~~~ 1 error generated. drivers/scsi/linkdata/linux/ps3_cli_debug.c:3609:7: error: explicitly assigning value of variable of type 'int' to itself [-Werror,-Wself-assign] 3609 | argc = argc; | ~~~~ ^ ~~~~ drivers/scsi/linkdata/linux/ps3_cli_debug.c:3610:7: error: explicitly assigning value of variable of type 'char **' to itself [-Werror,-Wself-assign] 3610 | argv = argv; | ~~~~ ^ ~~~~ 2 errors generated. Signed-off-by: WangYuli --- drivers/scsi/linkdata/linux/ps3_cli_debug.c | 14 -------------- drivers/scsi/linkdata/ps3_device_manager_sas.c | 1 - 2 files changed, 15 deletions(-) diff --git a/drivers/scsi/linkdata/linux/ps3_cli_debug.c b/drivers/scsi/linkdata/linux/ps3_cli_debug.c index 2f3ebc9e75c5..be21c3fdbed2 100644 --- a/drivers/scsi/linkdata/linux/ps3_cli_debug.c +++ b/drivers/scsi/linkdata/linux/ps3_cli_debug.c @@ -3606,8 +3606,6 @@ static void ps3_cli_err_inject_active(int argc, char *argv[]) } static void ps3_cli_err_inject_clear(int argc, char *argv[]) { - argc = argc; - argv = argv; INJECT_EXIT() } @@ -4092,8 +4090,6 @@ void ps3_show_inject_all_scsi_rw(int argc, char *argv[]) struct inject_cmds_t *pitem = NULL; PS3Inject_s *p_inject_list = get_inject(); - argc = argc; - argv = argv; ps3_mutex_lock(&p_inject_list->lock); if (list_empty(&p_inject_list->scsi_rw_list)) { ps3stor_cli_printf("rw inject list is empty!\n"); @@ -4168,8 +4164,6 @@ void ps3_show_inject_all_scsi_task(int argc, char *argv[]) struct inject_cmds_t *pitem = NULL; PS3Inject_s *p_inject_list = get_inject(); - argc = argc; - argv = argv; ps3_mutex_lock(&p_inject_list->lock); if (list_empty(&p_inject_list->scsi_task_list)) { ps3stor_cli_printf("task inject list is empty!\n"); @@ -4194,8 +4188,6 @@ void ps3_show_inject_all_mgr(int argc, char *argv[]) struct inject_cmds_t *pitem = NULL; PS3Inject_s *p_inject_list = get_inject(); - argc = argc; - argv = argv; ps3_mutex_lock(&p_inject_list->lock); if (list_empty(&p_inject_list->mgr_list)) { goto l_out; @@ -5076,9 +5068,6 @@ static void ps3_clear_inject_mgr(int argc, char *argv[]) static void ps3_clear_all_inject(int argc, char *argv[]) { - argc = argc; - argv = argv; - ps3_clear_all_inject_scsi_rw(); ps3_clear_all_inject_scsi_task(); ps3_clear_all_inject_mgr(); @@ -5421,9 +5410,6 @@ void ps3_scsi_rw_cmd_clear_all(void) static void ps3_clear_hit_cmd(int argc, char *argv[]) { - argc = argc; - argv = argv; - ps3_scsi_rw_cmd_clear_all(); ps3_scsi_task_cmd_clear_all(); ps3_mgr_cmd_clear_all(); diff --git a/drivers/scsi/linkdata/ps3_device_manager_sas.c b/drivers/scsi/linkdata/ps3_device_manager_sas.c index 4df20b4a9beb..3c687e9e8ec4 100644 --- a/drivers/scsi/linkdata/ps3_device_manager_sas.c +++ b/drivers/scsi/linkdata/ps3_device_manager_sas.c @@ -231,7 +231,6 @@ static S32 ps3_sas_node_phy_add(struct ps3_instance *instance, void ps3_sas_node_phy_update(struct ps3_instance *instance, struct ps3_sas_phy *ps3_phy, struct PS3PhyInfo *phy_info) { - instance = instance; ps3_phy->identify.initiator_port_protocols = phy_info->initiatorPortProtocol; ps3_phy->identify.target_port_protocols =