From 40b693403fbb3df6495697adc009a3316d126063 Mon Sep 17 00:00:00 2001 From: Kiwoong Kim Date: Fri, 23 Jun 2017 15:02:20 +0900 Subject: [PATCH] [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 --- drivers/scsi/ufs/ufshcd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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); -- 2.20.1