Commit aa055885 authored by Damien Le Moal's avatar Damien Le Moal Committed by Martin K. Petersen

scsi: megaraid: Fix set but unused variable

In megadev_ioctl(), if MEGA_HAVE_STATS is not defined, the variables
num_ldrv and ustats are unused. Conditionally define them to avoid compiler
warnings.

Link: https://lore.kernel.org/r/20200706123351.451959-1-damien.lemoal@wdc.comSigned-off-by: default avatarDamien Le Moal <damien.lemoal@wdc.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 2a6576d2
...@@ -2975,14 +2975,13 @@ megadev_ioctl(struct file *filep, unsigned int cmd, unsigned long arg) ...@@ -2975,14 +2975,13 @@ megadev_ioctl(struct file *filep, unsigned int cmd, unsigned long arg)
void *data = NULL; /* data to be transferred */ void *data = NULL; /* data to be transferred */
dma_addr_t data_dma_hndl; /* dma handle for data xfer area */ dma_addr_t data_dma_hndl; /* dma handle for data xfer area */
megacmd_t mc; megacmd_t mc;
megastat_t __user *ustats; #if MEGA_HAVE_STATS
int num_ldrv; megastat_t __user *ustats = NULL;
int num_ldrv = 0;
#endif
u32 uxferaddr = 0; u32 uxferaddr = 0;
struct pci_dev *pdev; struct pci_dev *pdev;
ustats = NULL; /* avoid compilation warnings */
num_ldrv = 0;
/* /*
* Make sure only USCSICMD are issued through this interface. * Make sure only USCSICMD are issued through this interface.
* MIMD application would still fire different command. * MIMD application would still fire different command.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment