From patchwork Fri Sep 15 19:23:13 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 112745 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp971771qgf; Fri, 15 Sep 2017 12:23:39 -0700 (PDT) X-Google-Smtp-Source: ADKCNb4OuGlxs+rLmQZwbJeCfRiQYQHPWFG83+YzpuQFPGawhGrhsor50jCY18aZgc6Quec0hBMo X-Received: by 10.98.211.193 with SMTP id z62mr25584189pfk.118.1505503419581; Fri, 15 Sep 2017 12:23:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505503419; cv=none; d=google.com; s=arc-20160816; b=TzPLHjTe4VDPF1dsDF1nYC4W2+R9GdKS0f8HZmtZloIBuQH+MgsaYIHsLpnAFlCw8d n+PSTM8brcY6KMhCxjsNdzG2zrJiVPYqrXMtWXQDfYjWu1SRpFcM8wplKj5kJdskKgli yGyaNHuGHhSQEN36ZprpgN+eIbQ4iINnFgOLirngaS8rlDefBhJmyNYzBDT92M8kRMZR 7EaRvf4vTGmhgHq7pDgG0VBZGPd0OYL0Ki5y7w/kiZXxxyc7uOic6M0qDN/URM/WbYuC vi1XCuPhTsU/Q6lOT4uGtstpblKi9dAokcoCSkPxHHn2wmBg5nKRp2VwhzMcMvOEkti0 j4MA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=WXq7jGA+m5krSSn+O0Azlcauy6+6AJ68miD6Gs4FBjQ=; b=stoyMaKBnZz2ZCoEn5EHojjsHQg8eqx9lWV8oEBlI3P0S3qX8zE5yQ+eVWpSKTHzzK RXKc5WXosDj0dyHVIdznCYvTDcqb3vuCGV1D8LdeuT2c1+BtdO+vw7CyJdDhb138hxIP +Ilw/wZ9P70EJzcMczc4zSEVcBkJFlxTkB9BhmQgt+2bmfb+xQ1lrQ406wmdBkPEfs1Z cOlTYjFUbcjOOhnX2wPNx01YZ301P/Wyl8TqUYDfg7+VUOst9/UkODXjXujQzRExMFm6 2a6b/cEYRo2rjoBPmTKWNvAVKVrelbCk5BJVI1cr+BScPNJhMVpfkEbtTWOMh60XkS8g uqwQ== ARC-Authentication-Results: i=1; mx.google.com; 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 n72si1014952pfi.610.2017.09.15.12.23.39; Fri, 15 Sep 2017 12:23:39 -0700 (PDT) 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; 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 S1751828AbdIOTXh (ORCPT + 26 others); Fri, 15 Sep 2017 15:23:37 -0400 Received: from mout.kundenserver.de ([217.72.192.75]:59692 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751388AbdIOTXf (ORCPT ); Fri, 15 Sep 2017 15:23:35 -0400 Received: from wuerfel.lan ([95.208.190.237]) by mrelayeu.kundenserver.de (mreue102 [212.227.15.145]) with ESMTPA (Nemesis) id 0LrbAL-1dPgPU2d9p-013O0l; Fri, 15 Sep 2017 21:23:29 +0200 From: Arnd Bergmann To: David Kershner , Greg Kroah-Hartman Cc: Arnd Bergmann , Tim Sell , Sameer Wadgaonkar , David Binder , Bryan Thompson , sparmaintainer@unisys.com, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: [PATCH] staging: unisys/visorbus: add __init/__exit annotations Date: Fri, 15 Sep 2017 21:23:13 +0200 Message-Id: <20170915192327.414928-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:sC74jwEVfLzGgMJFx1lN+Tv67dtIM2f0ThkaAwc+SQfXf9rW+H1 nHDAyH+35jvuzvjd768wYaRv9Qch3QjZirIXOWQAbHDo27TZG4rc/8AjFB766/Hj6KoIKjx iATv24cQWTVYjwL+4q9oZZ5AKLyEpahBasVhot5nuZkxv4fxm9Y/PYaIDZUSzxuIz4IZ8d6 ucJYHb18q/mlMy3jBSovQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:YnFwRjhVw50=:7k5t1bRXdbZtJ6x/lKTCab G17Q6TxOilqqZrZ7yBkw72g3T/NHjrwCxMeKUB8okmzyopOePFk5//vH7E9aYWr1SIFI+pSww gYrzq/EYEZmX9avduBb+97k9iIJXd+fviN6egNF7AelKDMIoP6YKIMgK6xiSJWLHWSzA1OD++ oeQXFuQwB8gsqSigPpxeSoSl1q1gKcTSlo+lbJ4Rjvv/Rzb75c6IFpqQvyMFnkXMmtFuxpRZO CPBq36NF6FQYFbszkZoAUftw51+5qvMS8nitDAPrIvRVjZrOF7CvR0RZ8G81Jzd17eOxeKf3F 5pyS0IoGtbHwOWtDMVr/wQvYYq1WHA1zn9KOefZng1GGIdsk1YiJN414qFd+NkC+1EYFuSlPj 1SyBO7bAysQO1qRad66498CYYKCSqAxdumI5nlS+rd4f4zabNNjRFBvdqdPCcZmvDEMvLXGiS 0qLzFpN6479RAkW4z5idRRFsbgljMiJ2a+BMQutoUQ12+PO8VSlNLkYmwapqSnvbn+jIVmASf hJn3Cltyng09szL/rqazrBbN41zDDLoLb87ieYISPkNxCWFgVXozwR0VtRnnmNtzncFFqFGSR pAMJIbZCTQPIOwY5HMZvK2+r+oo7pgYFoR1JkH9hjud61MxAMq1VNZhTT6gDrl8mmURqFrSmx w8NKAYswD9FB+5e5fhx/cTSE9i4jJ7LS6C0au6xbU6FjJmiROxw3WsuLr+cfR4QJxSAi4T51a aVh+O3TKm0SwOEYsGJMorwLBmNhGD10MUzT+ow== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org gcc-4.6 causes a harmless warning about the init function: WARNING: vmlinux.o(.text+0xed62c2): Section mismatch in reference from the function init_unisys() to the function .init.text:visorutil_spar_detect() The function init_unisys() references the function __init visorutil_spar_detect(). This is often because init_unisys lacks a __init annotation or the annotation of visorutil_spar_detect is wrong. It appears that newer versions inline visorutil_spar_detect(), end up with an empty __init section. This marks the module entry points as __init and __exit respectively, which avoids the warning and slightly reduces the runtime code size. Signed-off-by: Arnd Bergmann --- drivers/staging/unisys/visorbus/visorchipset.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.9.0 Acked-by: David Kershner diff --git a/drivers/staging/unisys/visorbus/visorchipset.c b/drivers/staging/unisys/visorbus/visorchipset.c index 74cce4f1a7bd..27ecf6fb49fd 100644 --- a/drivers/staging/unisys/visorbus/visorchipset.c +++ b/drivers/staging/unisys/visorbus/visorchipset.c @@ -1826,7 +1826,7 @@ static __init int visorutil_spar_detect(void) return 0; } -static int init_unisys(void) +static int __init init_unisys(void) { int result; @@ -1841,7 +1841,7 @@ static int init_unisys(void) return 0; }; -static void exit_unisys(void) +static void __exit exit_unisys(void) { acpi_bus_unregister_driver(&unisys_acpi_driver); }