From patchwork Fri Feb 2 13:12:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 126704 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp631195ljc; Fri, 2 Feb 2018 05:13:24 -0800 (PST) X-Google-Smtp-Source: AH8x225ofPEkruF5qEP7rCJPb9v2NcO1PYVVlPyUfzsu/Ai5dEYFCXns2GImA3JjYZpuN54/q07G X-Received: by 2002:a17:902:223:: with SMTP id 32-v6mr35919456plc.77.1517577204253; Fri, 02 Feb 2018 05:13:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517577204; cv=none; d=google.com; s=arc-20160816; b=Fz5lkUuLwTbTDBmYfLtxrSErTmSIxtbrl6FC9FlX0ZWoNUHAqb+KzUqwXmUPXhg4Sb 5UaiLZp3KvE/cciKiaJIRrqkghK5sw04qCx3LJ5Pvet0RobnS+Bneh6eCIsfk0Ux1Trl CDhBiyGm8ukhDGzlDKty+o+/6TLLwVughgGeMuh+11I/ynpA5LsfDHJHniVixYgs7MGy 5jPqdTYsZP6+yMI8jXrwwxO4Sv1wlw3RdkRQ3/4NHx6OPH+Pw6t1V1IEvMPeh3+jXswD 9dYr+SpqwVPq3+JLMOPIjOfetmr3jsxNa/cF0j3vXzfZ5meAX+bQEnrBbi4F9+cQkXda 4/7Q== 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=QIx0mgyePEZPHCLf2ZeBkUTSIPicfL31Gs+0wuXpiMs=; b=O84iz4LuaML4Aw7pL53+n3dyIK+kURQKgI32E/7FoztSeVNoBxlzhyMVm/VrSKFxad 97nELXaAnQ/P28QmafPcdNNLlliCgVtCX+CKXGVO8VBtB6p9T34epEHSmg8n2VJaosiR JN1cUbo7zc0sfJznK3bB+Twd47KhsS6DnauydZr/Pw6WP2J2+6hBcVlRL6IdOCLtqEiY axbwfeqznlWvTeYyFqqrTatqfjbD4O00Hgur99xkCWLKjenvMMJrvMuaMg0pU1OvNJcg EbtcqkVDkGXRVhSJDJJclqO5pK8ZUYhlhPdcbzAWInWfxUX7tOIp7vPbNsLuTYG6OyW2 uGpA== 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 m15-v6si1864917pln.714.2018.02.02.05.13.24; Fri, 02 Feb 2018 05:13:24 -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 S1751638AbeBBNNV (ORCPT + 1 other); Fri, 2 Feb 2018 08:13:21 -0500 Received: from mout.kundenserver.de ([212.227.126.131]:62108 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751416AbeBBNNV (ORCPT ); Fri, 2 Feb 2018 08:13:21 -0500 Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue003 [212.227.15.129]) with ESMTPA (Nemesis) id 0MYJ7N-1eCzJl1Dwv-00V8uW; Fri, 02 Feb 2018 14:12:44 +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 2/6] scsi: NCR53c406a: avoid section mismatch with LTO Date: Fri, 2 Feb 2018 14:12:16 +0100 Message-Id: <20180202131225.1658853-3-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:YiX/S4C7AZzl1ZRkL/ZfgKL7eJ+TgFZ3OOrBDk4TV8DDokgB7+2 RxA+2xbU6E2LHoKV4M/4er11qchYq3vq1YA8yjVNLTB1BY+EL10nAt9KNTF0kqNNCHaH0Tl yG0UdW++i1C2lGEmmBCMdJoPtrKRqipVVFT8iE1oZWS3qdm1g3FCtkXRyyudASryi9ritL9 Ed3UMiu4/RJrnfoaVr1tA== X-UI-Out-Filterresults: notjunk:1; V01:K0:4xtqviWg+ak=:eOHwGyy+h1NGu2t/NTAeDG /0dEkb4bIltlV1/DN5/Oq7zLZB7N7bCqSJfoE5kuGwomQgIeeiPG5ju5tfUhPboxz5ekb7EyE SbaYsvYCMT7qMw3RTHbn5yCMI8RadUOfVK1RsHYw4GRen7sqgvqq/xC5A+pB/H3Zb7zird575 avws5xga0NR67O6MLc9RT49FEkB56N6j+pd7/K7troOr10ilt7NcP6JToUd+k0L7rSwJwJ0Wp nJawRs98UmcxB1igKNNBvMj3JMmdzhUcPDvDGTmu/98Qu/G71g6/A9Fc0vuvb1/qLTX6hDwmK tfw0UTGP6wj35MeiYPRu6jOgox+vjRtdozIPqahJ8Q01PhgLOrEHZKuBOzp7YKPIvV3uWf9kc sxzgbyHcuk7gxH4t6S6bTfdfRoA0dhh6zRQ2aFdlm5WYSBDqVThJ4bXLBHvgdhMa9Ymp/pJ/T PoV5/B7OrSVKvh40JIgQg+Jxh9fSd8pYe2fuQvMgsXWrRZcvDguKLXy0IurmQ+DSWAnoOn8f0 S8Hmx3ebpCaDbISCGnxHpS8qz4WMl09cFP8uysEIt9ivPoch3fiiJJsmfPLS9xSviidPNy14C DNJrm0Nstp7lK4SwpircbpA1iLEHKfXNW8PuR9ejKQa5IGvUihCwSnQ/nYwKFugMMP7ISPUh8 jbNHEtMIUdl8U+vmD6CGdyp/2GwF8SvToLOOtwu1ZrZ3/Sn0Ovamj3i7j/6b0/PnlSJap0Jo/ yU7JHvrDhCCO/2V9vKW7evkQ0/GCLM0MlNZ54A== 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+0xf7e8): Section mismatch in reference from the variable driver_template.lto_priv.6914 to the function .init.text:NCR53c406a_detect() The variable driver_template.lto_priv.6914 references the function __init NCR53c406a_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/NCR53c406a.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.9.0 diff --git a/drivers/scsi/NCR53c406a.c b/drivers/scsi/NCR53c406a.c index 6e110c630d2c..44b09870bf51 100644 --- a/drivers/scsi/NCR53c406a.c +++ b/drivers/scsi/NCR53c406a.c @@ -448,7 +448,7 @@ static __inline__ int NCR53c406a_pio_write(unsigned char *request, unsigned int } #endif /* USE_PIO */ -static int __init NCR53c406a_detect(struct scsi_host_template * tpnt) +static int NCR53c406a_detect(struct scsi_host_template * tpnt) { int present = 0; struct Scsi_Host *shpnt = NULL;