Received: by 10.223.176.5 with SMTP id f5csp2156152wra; Sun, 4 Feb 2018 22:13:00 -0800 (PST) X-Google-Smtp-Source: AH8x2244wcZ5copd+WPOgaqXiHbP+9faeb0YE/YruF1buieWywIEArdp3tI1McNlFuno3A4nRp05 X-Received: by 10.99.163.9 with SMTP id s9mr1307827pge.264.1517811180630; Sun, 04 Feb 2018 22:13:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517811180; cv=none; d=google.com; s=arc-20160816; b=TjGjJspcmiG1XtVuqAQkopTP+r2yFD21gRd6323pC6wWcvIzBiTve0rgu+N+70qCwl 1UWs9PMEzFOcuNsjLDkboqFWLlAoL34Ibswk4Y0ahlabmPGdL0mkwf2a0O55OoKg6vpQ VKJE6wUEhL9KjTwp6xd8V8TVKdWqfxEwvv8zqdRN4z9vzOfurqjo3qYK9EgGi/3qAU9Q 96bD1cXfv9e2zWlvmFVRDaVZ6YppYOW5qge4KxBSCmyC2QO7DOwM/zCAnjlEc83OLEg0 dXvE8gaWi9Ki9Dcpk49NYIqzvaeXHZLd+62jDkhEZyYIclTZrqFecrGCfTbkS6Zjj7hL R5Og== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-id:spamdiagnosticmetadata:spamdiagnosticoutput :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=REbly9b7qx1uJtT4qvAiwnVuNmT0zeT0K1wrXPGAlhY=; b=IpN5V24nFeC+eALQ1MMpm+ExPvtbRoC9o9MNsRgiTcplZyTzd00QoLoSRunOvHj9iD yzk330pMJSiqBWVfS/NI4B2+SPUluo3ykbn6PBky3KI3L1bWoPwnnV0SXGIEqMeO4wJO MUS+p5/FU923k7cCgqRGVOS7q5br7gaIVmzPQ99GSyb22jkaOwqsszRaKPaDJjRlTKCt U4pZtqhMkFXTQmRC4yNTfdMFgnG0u0PwdweVCVherwGzOxzigrbEy7GW/2BvA16PxFsB c5WlQnkVdgY6geCxEmj9S90O9b3DMD33T2RfKxX2hzvFSldr2yak42qonoRM228EnthR /HSg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@CAVIUMNETWORKS.onmicrosoft.com header.s=selector1-cavium-com header.b=U4aY5wfa; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f9-v6si545586plk.94.2018.02.04.22.12.46; Sun, 04 Feb 2018 22:13:00 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@CAVIUMNETWORKS.onmicrosoft.com header.s=selector1-cavium-com header.b=U4aY5wfa; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752942AbeBEGJQ (ORCPT + 99 others); Mon, 5 Feb 2018 01:09:16 -0500 Received: from mail-bl2nam02on0067.outbound.protection.outlook.com ([104.47.38.67]:12186 "EHLO NAM02-BL2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752510AbeBEGIb (ORCPT ); Mon, 5 Feb 2018 01:08:31 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=REbly9b7qx1uJtT4qvAiwnVuNmT0zeT0K1wrXPGAlhY=; b=U4aY5wfawJzEWlDeIw43N4KJIgyrZq2c9/89/wfGofO0RMAoYcf1RzUvWVwJ7ADMHHJxIm+eoFDw6nPss1KiJCTH8sRiHpFzbTSmxRprJ/3YOP259dSXirz4ZR6Zeaq+5759W72ujjv0jWbxkU1RG48TSWdWC32d12OGTKkX5V4= Received: from CY1PR0701MB1257.namprd07.prod.outlook.com (10.160.149.153) by CY1PR0701MB2075.namprd07.prod.outlook.com (10.163.142.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.464.11; Mon, 5 Feb 2018 06:08:29 +0000 Received: from CY1PR0701MB1257.namprd07.prod.outlook.com ([10.160.149.153]) by CY1PR0701MB1257.namprd07.prod.outlook.com ([10.160.149.153]) with mapi id 15.20.0464.015; Mon, 5 Feb 2018 06:08:28 +0000 From: "Rangankar, Manish" To: Arnd Bergmann , "linux-scsi@vger.kernel.org" , "James E . J . Bottomley" , Dept-Eng QLogic Storage Upstream , "Martin K. Petersen" CC: Nicolas Pitre , Andi Kleen , "Tayar, Tomer" , "David S. Miller" , "Elior, Ariel" , "Easi, Arun" , "Javali, Nilesh" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH 5/6] scsi: qedi: fix building with LTO Thread-Topic: [PATCH 5/6] scsi: qedi: fix building with LTO Thread-Index: AQHTnCe04rWn8hkoFUyc4uam/RE5N6OVs1kA Date: Mon, 5 Feb 2018 06:08:28 +0000 Message-ID: References: <20180202131225.1658853-1-arnd@arndb.de> <20180202131225.1658853-6-arnd@arndb.de> In-Reply-To: <20180202131225.1658853-6-arnd@arndb.de> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Manish.Rangankar@cavium.com; x-originating-ip: [114.143.185.87] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;CY1PR0701MB2075;7:VWX/3/tuobvuz/mHdDNXXg+zPVGwdamsx+TdkND5bZ3nHd5SBlWh95UeahJqTYHWx1jyGohQlQUB3PQExEjdjOnotwlYktuv50NzL+zuHotjr9BRP29xP46Px+H/I/MnvkSmHZGmWMt2/enElcHxpAF0UkWvxP1meYZO29Qg9vVFs2WsaR/3cn7qNb+im0hrr55WcEtr3WtY5XSTU36eB8GunFqJ3MM7HO0lvhSkVgrHh4AdO2jTyzV6Eyd01cQJ x-ms-exchange-antispam-srfa-diagnostics: SSOS;SSOR; x-ms-office365-filtering-correlation-id: 9b216759-69bc-4fc8-4a0a-08d56c5ee03c x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(5600026)(4604075)(3008032)(2017052603307)(7153060)(7193020);SRVR:CY1PR0701MB2075; x-ms-traffictypediagnostic: CY1PR0701MB2075: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(6040501)(2401047)(5005006)(8121501046)(93006095)(93001095)(10201501046)(3231101)(2400082)(944501161)(3002001)(6041288)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123564045)(20161123558120)(6072148)(201708071742011);SRVR:CY1PR0701MB2075;BCL:0;PCL:0;RULEID:;SRVR:CY1PR0701MB2075; x-forefront-prvs: 0574D4712B x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(376002)(39850400004)(39380400002)(396003)(346002)(366004)(199004)(189003)(5660300001)(2906002)(54906003)(26005)(110136005)(77096007)(68736007)(76176011)(25786009)(7736002)(3280700002)(106356001)(2950100002)(53546011)(14454004)(305945005)(316002)(4326008)(6506007)(105586002)(102836004)(229853002)(3660700001)(6512007)(97736004)(8676002)(86362001)(72206003)(6436002)(66066001)(53936002)(3846002)(6116002)(6246003)(8936002)(36756003)(186003)(478600001)(6486002)(2900100001)(81156014)(99286004)(81166006)(2501003);DIR:OUT;SFP:1101;SCL:1;SRVR:CY1PR0701MB2075;H:CY1PR0701MB1257.namprd07.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; received-spf: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: MVJkClm2xN60jzMUSdFyTisw2/GMsD7Xv2HNIfIVdRvBh+ZZDDHybdv1gnCwdmD6LdevZotTs4wTlWfx0SeKjw== spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-ID: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9b216759-69bc-4fc8-4a0a-08d56c5ee03c X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Feb 2018 06:08:28.2722 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR0701MB2075 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/02/18 6:42 PM, "Arnd Bergmann" wrote: >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=3Dlto-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[] =3D { > ^ >drivers/scsi/qedi/qedi_gbl.h:26:32: error: type of 'qedi_debugfs_ops' >does not match original declaration [-Werror=3Dlto-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[] =3D { > >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 >--- > drivers/scsi/qedi/qedi_dbg.h | 2 +- > drivers/scsi/qedi/qedi_debugfs.c | 4 ++-- > drivers/scsi/qedi/qedi_gbl.h | 4 ++-- > drivers/scsi/qedi/qedi_main.c | 4 ++-- > 4 files changed, 7 insertions(+), 7 deletions(-) > >diff --git a/drivers/scsi/qedi/qedi_dbg.h b/drivers/scsi/qedi/qedi_dbg.h >index c55572badfb0..358f40567849 100644 >--- a/drivers/scsi/qedi/qedi_dbg.h >+++ b/drivers/scsi/qedi/qedi_dbg.h >@@ -134,7 +134,7 @@ struct qedi_debugfs_ops { > } >=20 > void qedi_dbg_host_init(struct qedi_dbg_ctx *qedi, >- struct qedi_debugfs_ops *dops, >+ const struct qedi_debugfs_ops *dops, > const struct file_operations *fops); > void qedi_dbg_host_exit(struct qedi_dbg_ctx *qedi); > void qedi_dbg_init(char *drv_name); >diff --git a/drivers/scsi/qedi/qedi_debugfs.c >b/drivers/scsi/qedi/qedi_debugfs.c >index fd8a1eea3163..fd914ca4149a 100644 >--- a/drivers/scsi/qedi/qedi_debugfs.c >+++ b/drivers/scsi/qedi/qedi_debugfs.c >@@ -19,7 +19,7 @@ static struct dentry *qedi_dbg_root; >=20 > void > qedi_dbg_host_init(struct qedi_dbg_ctx *qedi, >- struct qedi_debugfs_ops *dops, >+ const struct qedi_debugfs_ops *dops, > const struct file_operations *fops) > { > char host_dirname[32]; >@@ -99,7 +99,7 @@ static struct qedi_list_of_funcs >qedi_dbg_do_not_recover_ops[] =3D { > { NULL, NULL } > }; >=20 >-struct qedi_debugfs_ops qedi_debugfs_ops[] =3D { >+const struct qedi_debugfs_ops qedi_debugfs_ops[] =3D { > { "gbl_ctx", NULL }, > { "do_not_recover", qedi_dbg_do_not_recover_ops}, > { "io_trace", NULL }, >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[]; >=20 > int qedi_alloc_sq(struct qedi_ctx *qedi, struct qedi_endpoint *ep); >diff --git a/drivers/scsi/qedi/qedi_main.c b/drivers/scsi/qedi/qedi_main.c >index 029e2e69b29f..e992f9d3ef00 100644 >--- a/drivers/scsi/qedi/qedi_main.c >+++ b/drivers/scsi/qedi/qedi_main.c >@@ -2303,8 +2303,8 @@ static int __qedi_probe(struct pci_dev *pdev, int >mode) > } >=20 > #ifdef CONFIG_DEBUG_FS >- qedi_dbg_host_init(&qedi->dbg_ctx, &qedi_debugfs_ops, >- &qedi_dbg_fops); >+ qedi_dbg_host_init(&qedi->dbg_ctx, qedi_debugfs_ops, >+ qedi_dbg_fops); > #endif > QEDI_INFO(&qedi->dbg_ctx, QEDI_LOG_INFO, > "QLogic FastLinQ iSCSI Module qedi %s, FW %d.%d.%d.%d\n", >--=20 >2.9.0 Thanks Acked-by: Manish Rangankar >