From 952a5a74ba4c260fbd26452aaff6225bcc72eb03 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Thu, 17 Apr 2014 06:12:07 +0000 Subject: [PATCH] scst_vdisk: Fix a kernel 2.6.27 compiler warning Avoid that the compiler reports that variables 'start_sector' and 'nr_sects' are set but not used when building against kernel 2.6.27. git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5431 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 2471793b2..85260aabe 100644 --- a/scst/src/dev_handlers/scst_vdisk.c +++ b/scst/src/dev_handlers/scst_vdisk.c @@ -2636,9 +2636,9 @@ static int vdisk_unmap_range(struct scst_cmd *cmd, (unsigned long long)start_lba, (unsigned long long)blocks); if (virt_dev->blockio) { +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 27) sector_t start_sector = start_lba << (cmd->dev->block_shift - 9); sector_t nr_sects = blocks << (cmd->dev->block_shift - 9); -#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 27) struct inode *inode = fd->f_dentry->d_inode; gfp_t gfp = cmd->cmd_gfp_mask; #if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 31)