From patchwork Fri Feb 2 13:12:17 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 126707 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp635178ljc; Fri, 2 Feb 2018 05:18:16 -0800 (PST) X-Google-Smtp-Source: AH8x225b5vhOBVHrLRKRsL8bCkDT2LD8TcMrW/1zU4cU8N0noC/Pn411WXb0r//Ef/jGUEdrJAl8 X-Received: by 2002:a17:902:3363:: with SMTP id a90-v6mr34126943plc.159.1517577496767; Fri, 02 Feb 2018 05:18:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517577496; cv=none; d=google.com; s=arc-20160816; b=fyk0TfAtx39uCpXb9hW2FV28+IJBRK3Swes0M2mZ7Nhi7I6aL4uBMLbkJ4IDonnu+F Sk7clfocK5rv2nottSNIWfUdpNxxhjOl16kwcvfJBz/3ZUGKGlMDNUAa/C3gSCWe+2I2 QXl62iSzS6rOHFsfM6pFIlo68VV3i4+ZpCdF2vJTofuHkPQ+E5+rcURDAJXYylQZMJyg iYehRApcw1SOgll+pfl8x19cNa4tHJPHw0NkTdAN+5FKbbYYcxsAWEZIKzfpNyqBgVtd /XvXs4lh2km/MG8VaU+BzkwQ1FWD4DrBvclm2louOW1iA/nV0e+bPWR8X6XsPjtCkY7H 9UBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=OOLE7gp00HTmlSijkCP4EXpiXpFBDI8cz6zfvfv/vJM=; b=qhvRzPVLtv7eXI2ylBTypV1cbX/ej8tB2dY6l5o1PwWsphYAKXhHUWSTCH2U+uwr+D sVa0wgy4OCZQu/xBtFngTyi6NjLkmbqVikyRPFLg2l5vzyiEardD5srwDWuwYRS5+xM8 WjcpbEfru0gUyR4qH1CvSJu8SrK7RNNU8wf/ZGbun9kkccsCoVfRYloegS2QFCEEtmbr oyRfcIskls7VQbeWIkUjj023AthxOG5wXysNbouReUBrdtRjqDaQ5xm7+ba8PI5WTmAN MqKya10yLJnRq0jGSJpUWpLh8ug9Bg38mSHXeUK10WEn5EFQxc5KlOwLZLlaSjMFlXTs x4Kw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-scsi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-scsi-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 y40-v6si1768643pla.319.2018.02.02.05.18.16; Fri, 02 Feb 2018 05:18:16 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-scsi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-scsi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-scsi-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751767AbeBBNSO (ORCPT + 1 other); Fri, 2 Feb 2018 08:18:14 -0500 Received: from mout.kundenserver.de ([212.227.126.187]:56919 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751709AbeBBNSM (ORCPT ); Fri, 2 Feb 2018 08:18:12 -0500 Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue003 [212.227.15.129]) with ESMTPA (Nemesis) id 0MDCnY-1eVUjd3qlY-00GVlt; Fri, 02 Feb 2018 14:12:50 +0100 From: Arnd Bergmann To: linux-scsi@vger.kernel.org, "James E . J . Bottomley" , "Martin K. Petersen" Cc: Nicolas Pitre , Andi Kleen , Arnd Bergmann , linux-kernel@vger.kernel.org Subject: [PATCH 3/6] scsi: sym53c416: avoid section mismatch with LTO Date: Fri, 2 Feb 2018 14:12:17 +0100 Message-Id: <20180202131225.1658853-4-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20180202131225.1658853-1-arnd@arndb.de> References: <20180202131225.1658853-1-arnd@arndb.de> X-Provags-ID: V03:K0:nlqpScef+VnKmKfKY5WGznwFLfkiu6WqOqPaTPPhVr22f//NWIU Rz+xiBTELZ6R+t1J91VfnRmRcfHbWwBPxtd+epzs0vP61VgQB0FpLhxhGj31SfEnnHSC0Hg EuQb5X6dQcnWO0Jaw/FHvNT8y64RzJmKM+CkZvbvBPz9UhE+U88Ee+c+E+hfGQfCe2LbN1R LIPY2DqhcnHICjSQ2BG4Q== X-UI-Out-Filterresults: notjunk:1; V01:K0:awnMV8IkLbA=:dBYWJD77Cy3XnDIn9RLTfs fXrOpE7SyNxzGn5sT2719DMKbUb/PHiCNTT94JLPRf2thkqDqhC8gc5oFWKD/EjWZ4iLUqWbf pNCx10f3uuaWXGWqRNTC5b9QTqIO+3TLMVShE9ItQ/GMSBY+e3wYOyH6TjkTGksXj5fEwfBYx ByK3ITKw/Yi5KUGkTyqE0GzsGEtvJRldaVX6t5JLCD6VLXMbrkROSninT0wWTkhS3ej+aQmMn srhjOdxWivASR7A3KfiXngRsrbv+KQGLFCWqFh22miC03ouqYqUtYPYtScSiWyA17RbPbrlbO 94qnjdUuupqq95fT4LT7bH4WbVr8v5+RVRhOdwmI9UnieHOg1HT96+yHy/BTvxE9IwjR62XAr OSuUnYGWu+WC8N5PzjpV/pShMqinliDe0TRzRc123Mrr70/tyzkHhGReSNXF7AG5fZtEU5DhZ ad/FcplpJ3oxQNxwOrzalG9nYKhF0EokX++kIgGfEuPVRtw2gLHyhVMFNZpK6RQmdEfrrvk1T ewEB5EP1t3dcb26KbxapYBk4wvGdBwOlCAqF2FCe/V0MiTCLfNzMFA1S2VTIaI5C2TzeuebZx YHZ8zUwPcqRhImW3QA5jTPHNQFOF+T30FVD1QZSFO0pYoFVtuCdiWS4j4OaHpWvscImNLSJ4W NXzXiiVFb5jU2C4hfeMxdsXmAI3kVDCIQbwzBEL17cMeLfL8uHclXkSuQrqvVu+HRt1/fkYuf 6qhKvHYMQvOuhvyt43VPj0fPY8XkAIwwtLZLRw== Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Building with link time optimizations produces a false-postive section mismatch warning: WARNING: vmlinux.o(.data+0xf8c8): Section mismatch in reference from the variable driver_template.lto_priv.6915 to the function .init.text:sym53c416_detect() The variable driver_template.lto_priv.6915 references the function __init sym53c416_detect() If the reference is valid then annotate the variable with __init* or __refdata (see linux/init.h) or name the variable: *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console The ->detect callback is always entered from the init_this_scsi_driver() init function, but apparently LTO turns the optimized direct function call into an indirect call through a non-__initdata pointer. All drivers using init_this_scsi_driver() are for ancient hardware, and most don't mark the detect() callback as __init(), so I'm just removing the annotation here to kill off the warning instead of doing a larger rework. Signed-off-by: Arnd Bergmann --- drivers/scsi/sym53c416.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.9.0 diff --git a/drivers/scsi/sym53c416.c b/drivers/scsi/sym53c416.c index 5bdcbe8fa958..e68bcdc75bc3 100644 --- a/drivers/scsi/sym53c416.c +++ b/drivers/scsi/sym53c416.c @@ -608,7 +608,7 @@ static void sym53c416_probe(void) } } -int __init sym53c416_detect(struct scsi_host_template *tpnt) +int sym53c416_detect(struct scsi_host_template *tpnt) { unsigned long flags; struct Scsi_Host * shpnt = NULL;