CC: [email protected] TO: [email protected] tree: https://android.googlesource.com/kernel/common android-mainline head: e990f09f7c35dcf7a2bb25d466a8e22b5ac3ddf1 commit: e990f09f7c35dcf7a2bb25d466a8e22b5ac3ddf1 [2/2] ANDROID: scsi: ufs: fix bad merge resolution with custom sg entry size :::::: branch date: 9 hours ago :::::: commit date: 9 hours ago
If you fix the issue, kindly add following tag as appropriate Reported-by: kbuild test robot <[email protected]> cppcheck warnings: (new ones prefixed by >>) drivers/scsi/ufs/ufshcd.c:3760:2: warning: Address of local auto-variable assigned to a function parameter. [autoVariables] hba->uic_async_done = &uic_async_done; ^ drivers/scsi/ufs/ufshcd.c:7528:6: warning: Identical condition 'ret', second condition is always false [identicalConditionAfterEarlyExit] if (ret) { ^ drivers/scsi/ufs/ufshcd.c:7524:6: note: If condition 'ret' is true, the function will return/exit if (ret) ^ drivers/scsi/ufs/ufshcd.c:7528:6: note: Testing identical condition 'ret' if (ret) { ^ drivers/scsi/ufs/ufshcd.c:7423:6: warning: Condition 'ret' is always false [knownConditionTrueFalse] if (ret) { ^ drivers/scsi/ufs/ufshcd.c:7419:6: note: Assuming that condition 'ret' is not redundant if (ret) ^ drivers/scsi/ufs/ufshcd.c:7423:6: note: Condition 'ret' is always false if (ret) { ^ drivers/scsi/ufs/ufshcd.c:7533:13: warning: Condition '!ret' is always true [knownConditionTrueFalse] } else if (!ret && on) { ^ drivers/scsi/ufs/ufshcd.c:7528:6: note: Assuming that condition 'ret' is not redundant if (ret) { ^ drivers/scsi/ufs/ufshcd.c:7533:13: note: Condition '!ret' is always true } else if (!ret && on) { ^ drivers/scsi/ufs/ufshcd.c:442:21: warning: The scope of the variable 'lrbp' can be reduced. [variableScope] struct ufshcd_lrb *lrbp; ^ drivers/scsi/ufs/ufshcd.c:443:6: warning: The scope of the variable 'prdt_length' can be reduced. [variableScope] int prdt_length; ^ drivers/scsi/ufs/ufshcd.c:1368:6: warning: The scope of the variable 'ret' can be reduced. [variableScope] int ret; ^ drivers/scsi/ufs/ufshcd.c:1951:6: warning: The scope of the variable 'len' can be reduced. [variableScope] int len; ^ drivers/scsi/ufs/ufshcd.c:2159:26: warning: The scope of the variable 'prd' can be reduced. [variableScope] struct ufshcd_sg_entry *prd; ^ drivers/scsi/ufs/ufshcd.c:2160:22: warning: The scope of the variable 'sg' can be reduced. [variableScope] struct scatterlist *sg; ^ drivers/scsi/ufs/ufshcd.c:2163:6: warning: The scope of the variable 'i' can be reduced. [variableScope] int i; ^ drivers/scsi/ufs/ufshcd.c:4888:20: warning: The scope of the variable 'cmd' can be reduced. [variableScope] struct scsi_cmnd *cmd; ^ drivers/scsi/ufs/ufshcd.c:6169:21: warning: The scope of the variable 'lrbp' can be reduced. [variableScope] struct ufshcd_lrb *lrbp; ^ drivers/scsi/ufs/ufshcd.c:6482:6: warning: The scope of the variable 'curr_uA' can be reduced. [variableScope] int curr_uA; ^ drivers/scsi/ufs/ufshcd.c:772:29: warning: Clarify calculation precedence for '&' and '?'. [clarifyCalculation] MASK_RSP_EXCEPTION_EVENT ? true : false; ^ drivers/scsi/ufs/ufshcd.c:2184:22: warning: '(void*)prd' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [arithOperationsOnVoidPointer] prd = (void *)prd + hba->sg_entry_size; ^ >> drivers/scsi/ufs/ufshcd.c:2451:72: warning: '(void*)hba->ucdl_base_addr' is >> of type 'void *'. When using void pointers in calculations, the behaviour is >> undefined. [arithOperationsOnVoidPointer] struct utp_transfer_cmd_desc *cmd_descp = (void *)hba->ucdl_base_addr + ^ drivers/scsi/ufs/ufshcd.c:2184:8: warning: Variable 'prd' is assigned a value that is never used. [unreadVariable] prd = (void *)prd + hba->sg_entry_size; ^ git remote add android-common https://android.googlesource.com/kernel/common git remote update android-common git checkout e990f09f7c35dcf7a2bb25d466a8e22b5ac3ddf1 vim +2451 drivers/scsi/ufs/ufshcd.c 2a8fa600445c452 Subhash Jadavani 2014-09-25 2448 4d2b8d40dd754e4 Bart Van Assche 2020-01-22 2449 static void ufshcd_init_lrb(struct ufs_hba *hba, struct ufshcd_lrb *lrb, int i) 4d2b8d40dd754e4 Bart Van Assche 2020-01-22 2450 { e990f09f7c35dcf Eric Biggers 2020-04-07 @2451 struct utp_transfer_cmd_desc *cmd_descp = (void *)hba->ucdl_base_addr + e990f09f7c35dcf Eric Biggers 2020-04-07 2452 i * sizeof_utp_transfer_cmd_desc(hba); 4d2b8d40dd754e4 Bart Van Assche 2020-01-22 2453 struct utp_transfer_req_desc *utrdlp = hba->utrdl_base_addr; 4d2b8d40dd754e4 Bart Van Assche 2020-01-22 2454 dma_addr_t cmd_desc_element_addr = hba->ucdl_dma_addr + e990f09f7c35dcf Eric Biggers 2020-04-07 2455 i * sizeof_utp_transfer_cmd_desc(hba); 4d2b8d40dd754e4 Bart Van Assche 2020-01-22 2456 u16 response_offset = offsetof(struct utp_transfer_cmd_desc, 4d2b8d40dd754e4 Bart Van Assche 2020-01-22 2457 response_upiu); 4d2b8d40dd754e4 Bart Van Assche 2020-01-22 2458 u16 prdt_offset = offsetof(struct utp_transfer_cmd_desc, prd_table); 4d2b8d40dd754e4 Bart Van Assche 2020-01-22 2459 4d2b8d40dd754e4 Bart Van Assche 2020-01-22 2460 lrb->utr_descriptor_ptr = utrdlp + i; 4d2b8d40dd754e4 Bart Van Assche 2020-01-22 2461 lrb->utrd_dma_addr = hba->utrdl_dma_addr + 4d2b8d40dd754e4 Bart Van Assche 2020-01-22 2462 i * sizeof(struct utp_transfer_req_desc); e990f09f7c35dcf Eric Biggers 2020-04-07 2463 lrb->ucd_req_ptr = (struct utp_upiu_req *)cmd_descp; 4d2b8d40dd754e4 Bart Van Assche 2020-01-22 2464 lrb->ucd_req_dma_addr = cmd_desc_element_addr; e990f09f7c35dcf Eric Biggers 2020-04-07 2465 lrb->ucd_rsp_ptr = (struct utp_upiu_rsp *)cmd_descp->response_upiu; 4d2b8d40dd754e4 Bart Van Assche 2020-01-22 2466 lrb->ucd_rsp_dma_addr = cmd_desc_element_addr + response_offset; e990f09f7c35dcf Eric Biggers 2020-04-07 2467 lrb->ucd_prdt_ptr = (struct ufshcd_sg_entry *)cmd_descp->prd_table; 4d2b8d40dd754e4 Bart Van Assche 2020-01-22 2468 lrb->ucd_prdt_dma_addr = cmd_desc_element_addr + prdt_offset; 4d2b8d40dd754e4 Bart Van Assche 2020-01-22 2469 } 4d2b8d40dd754e4 Bart Van Assche 2020-01-22 2470 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/[email protected] _______________________________________________ kbuild mailing list -- [email protected] To unsubscribe send an email to [email protected]
