Skip to content

Commit

Permalink
scsi/linkdata: donot assigning value of variable of type to itself
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
Avenger-285714 committed Nov 20, 2024
1 parent 933c476 commit 7423015
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 15 deletions.
14 changes: 0 additions & 14 deletions drivers/scsi/linkdata/linux/ps3_cli_debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}

Expand Down Expand Up @@ -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");
Expand Down Expand Up @@ -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");
Expand All @@ -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;
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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();
Expand Down
1 change: 0 additions & 1 deletion drivers/scsi/linkdata/ps3_device_manager_sas.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down

0 comments on commit 7423015

Please sign in to comment.