]> git.karo-electronics.de Git - linux-beck.git/commitdiff
[SCSI] mpt2sas: Removed compiler warnnings when logging is disabled
authorKashyap, Desai <kashyap.desai@lsi.com>
Fri, 12 Nov 2010 22:59:20 +0000 (04:29 +0530)
committerJames Bottomley <James.Bottomley@suse.de>
Tue, 21 Dec 2010 18:24:02 +0000 (12:24 -0600)
The compiler throws warning messages while compiling without
CONFIG_SCSI_MPT2SAS_LOGGING.
Set proper ifdef for CONFIG_SCSI_MPT2SAS_LOGGING to avoid warnnings.

Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
drivers/scsi/mpt2sas/mpt2sas_ctl.c
drivers/scsi/mpt2sas/mpt2sas_scsih.c

index 40cb8aeb21b104303246667ab137d0d4670cada5..e92b77af5484919f2bde2d692557151b8e55f7f6 100644 (file)
@@ -81,6 +81,7 @@ enum block_state {
        BLOCKING,
 };
 
+#ifdef CONFIG_SCSI_MPT2SAS_LOGGING
 /**
  * _ctl_sas_device_find_by_handle - sas device search
  * @ioc: per adapter object
@@ -107,7 +108,6 @@ _ctl_sas_device_find_by_handle(struct MPT2SAS_ADAPTER *ioc, u16 handle)
        return r;
 }
 
-#ifdef CONFIG_SCSI_MPT2SAS_LOGGING
 /**
  * _ctl_display_some_debug - debug routine
  * @ioc: per adapter object
index 1a96a00418a4faed68a77519a49d1bf81e02f6b2..5af5781d9464186f2b2e62dad6e28470afdd1af4 100644 (file)
@@ -2715,9 +2715,10 @@ static u8
 _scsih_sas_control_complete(struct MPT2SAS_ADAPTER *ioc, u16 smid,
     u8 msix_index, u32 reply)
 {
+#ifdef CONFIG_SCSI_MPT2SAS_LOGGING
        Mpi2SasIoUnitControlReply_t *mpi_reply =
            mpt2sas_base_get_reply_virt_addr(ioc, reply);
-
+#endif
        dewtprintk(ioc, printk(MPT2SAS_INFO_FMT
            "sc_complete:handle(0x%04x), (open) "
            "smid(%d), ioc_status(0x%04x), loginfo(0x%08x)\n",