lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 20 Feb 2013 11:48:27 -0700
From:	Tim Gardner <tim.gardner@...onical.com>
To:	linux-kernel@...r.kernel.org
Cc:	Tim Gardner <tim.gardner@...onical.com>,
	Nagalakshmi Nandigama <Nagalakshmi.Nandigama@....com>,
	Sreekanth Reddy <Sreekanth.Reddy@....com>, support@....com,
	"James E.J. Bottomley" <JBottomley@...allels.com>,
	DL-MPTFusionLinux@....com, linux-scsi@...r.kernel.org
Subject: [PATCH linux/linux-next] mpt2sas: _scsih_sas_broadcast_primitive_event: Quiet unused variable warning

If CONFIG_SCSI_MPT2SAS_LOGGING is undefined, then these warnings are emitted:

drivers/scsi/mpt2sas/mpt2sas_scsih.c: In function '_scsih_sas_broadcast_primitive_event':
drivers/scsi/mpt2sas/mpt2sas_scsih.c:5810:40: warning: unused variable 'event_data' [-Wunused-variable]

Add __maybe_unused to the definition of event_data.

Cc: Nagalakshmi Nandigama <Nagalakshmi.Nandigama@....com>
Cc: Sreekanth Reddy <Sreekanth.Reddy@....com>
Cc: support@....com
Cc: "James E.J. Bottomley" <JBottomley@...allels.com>
Cc: DL-MPTFusionLinux@....com
Cc: linux-scsi@...r.kernel.org
Signed-off-by: Tim Gardner <tim.gardner@...onical.com>
---
 drivers/scsi/mpt2sas/mpt2sas_scsih.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/scsi/mpt2sas/mpt2sas_scsih.c b/drivers/scsi/mpt2sas/mpt2sas_scsih.c
index c6bdc92..416f907 100644
--- a/drivers/scsi/mpt2sas/mpt2sas_scsih.c
+++ b/drivers/scsi/mpt2sas/mpt2sas_scsih.c
@@ -5807,7 +5807,8 @@ _scsih_sas_broadcast_primitive_event(struct MPT2SAS_ADAPTER *ioc,
 	u32 termination_count;
 	u32 query_count;
 	Mpi2SCSITaskManagementReply_t *mpi_reply;
-	Mpi2EventDataSasBroadcastPrimitive_t *event_data = fw_event->event_data;
+	Mpi2EventDataSasBroadcastPrimitive_t *event_data __maybe_unused =
+		fw_event->event_data;
 	u16 ioc_status;
 	unsigned long flags;
 	int r;
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ