tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: 0ec2c5ee4e0f8c1bdd76fa1b5f9eb0cf68d4d62d commit: 7fc993d55d1b54ae40e29dfac825a18d04d644c6 [14777/21599] scsi/hifc: add hifc driver FC service module config: arm64-randconfig-002-20240130 (https://download.01.org/0day-ci/archive/20240201/202402011019.bVRSpF8m-lkp@i...) compiler: aarch64-linux-gcc (GCC) 13.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240201/202402011019.bVRSpF8m-lkp@i...)
If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot lkp@intel.com | Closes: https://lore.kernel.org/oe-kbuild-all/202402011019.bVRSpF8m-lkp@intel.com/
All warnings (new ones prefixed by >>):
drivers/scsi/huawei/hifc/unf_disc.c:446:28: warning: no previous prototype for 'unf_get_free_rscn_node' [-Wmissing-prototypes] 446 | struct unf_port_id_page_s *unf_get_free_rscn_node(void *v_rscn_mg) | ^~~~~~~~~~~~~~~~~~~~~~ drivers/scsi/huawei/hifc/unf_disc.c:1195:23: warning: no previous prototype for 'unf_disc_stat_start' [-Wmissing-prototypes] 1195 | enum unf_disc_state_e unf_disc_stat_start(enum unf_disc_state_e v_old_state, | ^~~~~~~~~~~~~~~~~~~ drivers/scsi/huawei/hifc/unf_disc.c:1208:23: warning: no previous prototype for 'unf_disc_stat_gid_pt_wait' [-Wmissing-prototypes] 1208 | enum unf_disc_state_e unf_disc_stat_gid_pt_wait( | ^~~~~~~~~~~~~~~~~~~~~~~~~ drivers/scsi/huawei/hifc/unf_disc.c:1239:23: warning: no previous prototype for 'unf_disc_stat_gid_ft_wait' [-Wmissing-prototypes] 1239 | enum unf_disc_state_e unf_disc_stat_gid_ft_wait( | ^~~~~~~~~~~~~~~~~~~~~~~~~ drivers/scsi/huawei/hifc/unf_disc.c:1270:23: warning: no previous prototype for 'unf_disc_stat_end' [-Wmissing-prototypes] 1270 | enum unf_disc_state_e unf_disc_stat_end(enum unf_disc_state_e v_old_state, | ^~~~~~~~~~~~~~~~~ drivers/scsi/huawei/hifc/unf_disc.c: In function 'unf_free_rport_pool':
drivers/scsi/huawei/hifc/unf_disc.c:389:51: warning: storing the address of local variable 'rport_pool_completion' in '((struct unf_rport_pool_s *)((char *)v_lport + 8))[59].rport_pool_completion' [-Wdangling-pointer=]
389 | rport_pool->rport_pool_completion = &rport_pool_completion; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ drivers/scsi/huawei/hifc/unf_disc.c:378:27: note: 'rport_pool_completion' declared here 378 | struct completion rport_pool_completion = | ^~~~~~~~~~~~~~~~~~~~~ drivers/scsi/huawei/hifc/unf_disc.c:367:53: note: 'v_lport' declared here 367 | static void unf_free_rport_pool(struct unf_lport_s *v_lport) | ~~~~~~~~~~~~~~~~~~~~^~~~~~~ drivers/scsi/huawei/hifc/unf_disc.c: In function 'unf_wait_disc_complete':
drivers/scsi/huawei/hifc/unf_disc.c:1072:39: warning: storing the address of local variable 'disc_completion' in '((struct unf_disc_s *)((char *)v_lport + 432))[5].disc_completion' [-Wdangling-pointer=]
1072 | disc->disc_completion = &disc_completion; | ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ drivers/scsi/huawei/hifc/unf_disc.c:1060:27: note: 'disc_completion' declared here 1060 | struct completion disc_completion = | ^~~~~~~~~~~~~~~ drivers/scsi/huawei/hifc/unf_disc.c:1052:56: note: 'v_lport' declared here 1052 | static void unf_wait_disc_complete(struct unf_lport_s *v_lport) | ~~~~~~~~~~~~~~~~~~~~^~~~~~~
vim +389 drivers/scsi/huawei/hifc/unf_disc.c
366 367 static void unf_free_rport_pool(struct unf_lport_s *v_lport) 368 { 369 struct unf_rport_pool_s *rport_pool = NULL; 370 int wait = UNF_FALSE; 371 unsigned long flag = 0; 372 unsigned int remain = 0; 373 unsigned long long time_out = 0; 374 unsigned int max_login = 0; 375 unsigned int i; 376 struct unf_rport_s *rport; 377
378 struct completion rport_pool_completion =
379 COMPLETION_INITIALIZER(rport_pool_completion); 380 381 UNF_CHECK_VALID(0x671, UNF_TRUE, v_lport, return); 382 UNF_REFERNCE_VAR(remain); 383 384 rport_pool = &v_lport->rport_pool; 385 max_login = v_lport->low_level_func.lport_cfg_items.max_login; 386 387 spin_lock_irqsave(&rport_pool->rport_free_pool_lock, flag); 388 if (max_login != rport_pool->rport_pool_count) {
389 rport_pool->rport_pool_completion = &rport_pool_completion;
390 remain = max_login - rport_pool->rport_pool_count; 391 wait = UNF_TRUE; 392 } 393 spin_unlock_irqrestore(&rport_pool->rport_free_pool_lock, flag); 394 395 if (wait == UNF_TRUE) { 396 UNF_TRACE(UNF_EVTLOG_DRIVER_INFO, UNF_LOG_REG_ATT, UNF_MAJOR, 397 "[info]Port(0x%x) begin to wait for RPort pool completion(%ld), remain(0x%x)", 398 v_lport->port_id, jiffies, remain); 399 400 time_out = wait_for_completion_timeout( 401 rport_pool->rport_pool_completion, 402 msecs_to_jiffies(UNF_OS_REMOVE_CARD_TIMEOUT)); 403 if (time_out == 0) 404 unf_cmmark_dirty_mem( 405 v_lport, 406 UNF_LPORT_DIRTY_FLAG_RPORT_POOL_DIRTY); 407 408 UNF_TRACE(UNF_EVTLOG_DRIVER_INFO, UNF_LOG_REG_ATT, UNF_MAJOR, 409 "[info]Port(0x%x) wait for RPort pool completion end(%ld)", 410 v_lport->port_id, jiffies); 411 412 spin_lock_irqsave(&rport_pool->rport_free_pool_lock, flag); 413 rport_pool->rport_pool_completion = NULL; 414 spin_unlock_irqrestore(&rport_pool->rport_free_pool_lock, flag); 415 } 416 417 rport = (struct unf_rport_s *)(rport_pool->rport_pool_add); 418 for (i = 0; i < rport_pool->rport_pool_count; i++) { 419 if (!rport) 420 break; 421 rport++; 422 } 423 424 if ((v_lport->dirty_flag & 425 UNF_LPORT_DIRTY_FLAG_RPORT_POOL_DIRTY) == 0) { 426 vfree(rport_pool->rport_pool_add); 427 rport_pool->rport_pool_add = NULL; /* R_Port pool */ 428 vfree(rport_pool->pul_rpi_bitmap); /* R_Port bitmap */ 429 rport_pool->pul_rpi_bitmap = NULL; 430 } 431 UNF_REFERNCE_VAR(remain); 432 } 433