From fdc6cdf1edb8588f3349340b31dea6c92030814d Mon Sep 17 00:00:00 2001 From: Vladislav Bolkhovitin Date: Thu, 22 Jan 2015 05:10:42 +0000 Subject: [PATCH] scst: Suppress a smatch warning in vdisk_unmap_range() Avoid that the static source code analysis tool 'smatch' reports the following warning: vdisk_unmap_range() warn: should 'blocks << cmd->dev->block_shift' be a 64 bit type? Signed-off-by: Bart Van Assche git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5987 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/src/dev_handlers/scst_vdisk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scst/src/dev_handlers/scst_vdisk.c b/scst/src/dev_handlers/scst_vdisk.c index 9e51b95e8..460050c5a 100644 --- a/scst/src/dev_handlers/scst_vdisk.c +++ b/scst/src/dev_handlers/scst_vdisk.c @@ -3119,7 +3119,7 @@ static int vdisk_unmap_range(struct scst_cmd *cmd, #endif } else { loff_t off = start_lba << cmd->dev->block_shift; - loff_t len = blocks << cmd->dev->block_shift; + loff_t len = (u64)blocks << cmd->dev->block_shift; res = vdisk_unmap_file_range(cmd, virt_dev, off, len, fd); if (unlikely(res != 0))