From: Kiwoong Kim Date: Fri, 23 Jun 2017 06:02:20 +0000 (+0900) Subject: [COMMON] scsi: ufs: Fix CID 12297 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=40b693403fbb3df6495697adc009a3316d126063;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git [COMMON] scsi: ufs: Fix CID 12297 The expression returns a signed value. A variable to store is unsigned. A type casting is needed. Change-Id: Ie11d27130f6c904e08d9831796790d7666ae033f Signed-off-by: Kiwoong Kim --- diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index 06577599c515..c342a6635c3d 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -6012,10 +6012,10 @@ static int ufshcd_abort(struct scsi_cmnd *cmd) exynos_smc(SMC_CMD_UFS_LOG, 1, 0, hba->secure_log.paddr); if (cmd->cmnd[0] == READ_10 || cmd->cmnd[0] == WRITE_10) { - unsigned long lba = (cmd->cmnd[2] << 24) | + unsigned long lba = (unsigned long) ((cmd->cmnd[2] << 24) | (cmd->cmnd[3] << 16) | (cmd->cmnd[4] << 8) | - (cmd->cmnd[5] << 0); + (cmd->cmnd[5] << 0)); unsigned int sct = (cmd->cmnd[7] << 8) | (cmd->cmnd[8] << 0);