summaryrefslogtreecommitdiff
path: root/drivers/scsi/qedi/qedi_gbl.h
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2018-02-02 16:12:19 +0300
committerMartin K. Petersen <martin.petersen@oracle.com>2018-02-14 05:37:00 +0300
commit779936faf4f1210a2a6c3a2ccc63cd74a61769ed (patch)
tree292da5dcf26006f228b053bd68520265f45347b0 /drivers/scsi/qedi/qedi_gbl.h
parentd9da891a892a38db4ec7abcc2df57f9ae3777d99 (diff)
downloadlinux-779936faf4f1210a2a6c3a2ccc63cd74a61769ed.tar.xz
scsi: qedi: fix building with LTO
When link-time optimizations are enabled, qedi fails to build because of mismatched prototypes: drivers/scsi/qedi/qedi_gbl.h:27:37: error: type of 'qedi_dbg_fops' does not match original declaration [-Werror=lto-type-mismatch] extern const struct file_operations qedi_dbg_fops; ^ drivers/scsi/qedi/qedi_debugfs.c:239:30: note: 'qedi_dbg_fops' was previously declared here const struct file_operations qedi_dbg_fops[] = { ^ drivers/scsi/qedi/qedi_gbl.h:26:32: error: type of 'qedi_debugfs_ops' does not match original declaration [-Werror=lto-type-mismatch] extern struct qedi_debugfs_ops qedi_debugfs_ops; ^ drivers/scsi/qedi/qedi_debugfs.c:102:25: note: 'qedi_debugfs_ops' was previously declared here struct qedi_debugfs_ops qedi_debugfs_ops[] = { This changes the declaration to match the definition, and adapts the users as necessary. Since both array can be constant here, I'm adding the 'const' everywhere for consistency. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Manish Rangankar <Manish.Rangankar@cavium.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/qedi/qedi_gbl.h')
-rw-r--r--drivers/scsi/qedi/qedi_gbl.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/qedi/qedi_gbl.h b/drivers/scsi/qedi/qedi_gbl.h
index f5b5a31999aa..a2aa06ed1620 100644
--- a/drivers/scsi/qedi/qedi_gbl.h
+++ b/drivers/scsi/qedi/qedi_gbl.h
@@ -23,8 +23,8 @@ extern uint qedi_io_tracing;
extern struct scsi_host_template qedi_host_template;
extern struct iscsi_transport qedi_iscsi_transport;
extern const struct qed_iscsi_ops *qedi_ops;
-extern struct qedi_debugfs_ops qedi_debugfs_ops;
-extern const struct file_operations qedi_dbg_fops;
+extern const struct qedi_debugfs_ops qedi_debugfs_ops[];
+extern const struct file_operations qedi_dbg_fops[];
extern struct device_attribute *qedi_shost_attrs[];
int qedi_alloc_sq(struct qedi_ctx *qedi, struct qedi_endpoint *ep);