Received: by 10.223.185.116 with SMTP id b49csp1849520wrg; Thu, 15 Feb 2018 02:36:47 -0800 (PST) X-Google-Smtp-Source: AH8x227eGKhf2lw8EEQQR+vcO9dL2rfo4ehD0lJasokMBAdgDcPVUvjMqzZdzAtJzIpvpF1I7LGP X-Received: by 10.101.80.69 with SMTP id k5mr1850725pgo.431.1518691007216; Thu, 15 Feb 2018 02:36:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518691007; cv=none; d=google.com; s=arc-20160816; b=ij2Ybur/F+VMg7T5LgAi6cMdxE9qfxOPxMh2SYxsHltCecz983V6W4pHcZYcNH94b2 Jf+tg2BDxNhRyhWCv+lubDpJj/hfws+CVGqauzvgNW/mgwp5JOt+n1em1xjcYwT6anNV S/JgK5AKE91d8q7ZlnrQzM0OPg0gOqUiJd7ZeQjhwZ2ERw0rLfYDyVQFNMFZti0lmI2c cAOrkstmSl48+EgkHz29Kpbuc+YntjJkaxsqpWVxgccuHX+kg0ac6fsByT0iQHQwWNFp 4mXJ49Fogn6SK8t7aJnXWO7Li2ZCE1DtDRIeyCM3TyMyC3kEQ4K3Y5MXcdpYqWA+hp86 Qy+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=NDx+bGmEn/npNY1P8MiCTH3O0MYeO3PFU0XAio8ugvQ=; b=Dj1/DVE8+YddDkyZh+Lq9DZciCFCDVspq8hQPP2b9Bms/81w5T+95/eT9nRTBIaTYA 3zgA8NO7sbs9vwwdl0yLJPlaOeFo08VOmOeHD/ToL5rSka83PQx0/i6cd4dI9tsc08by eCpwl3IuinlyUkC/bqj6Go7inxUJct8Ste5b+CtXuP/5Myup6cUZ6ZxL4udYuSYMO3lB wTkKGG9VgLPG/7mgnbOSRBBn3DgegvV9rLpHeMz/jX7HSFArL/bPtASdLT4ctCPKbjET dWpubOFwKaJlKCS9ITZTSYtjq5aiMeiUPXtMeHbrGa5n0yt4aWIk5r54kAw0Lb2nyK6h dN1g== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e14si7549020pfj.86.2018.02.15.02.36.32; Thu, 15 Feb 2018 02:36:47 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966743AbeBOKf4 (ORCPT + 99 others); Thu, 15 Feb 2018 05:35:56 -0500 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:35584 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755300AbeBOKfy (ORCPT ); Thu, 15 Feb 2018 05:35:54 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5F5A67D67B; Thu, 15 Feb 2018 10:35:54 +0000 (UTC) Received: from [10.40.204.209] (ovpn-204-209.brq.redhat.com [10.40.204.209]) by smtp.corp.redhat.com (Postfix) with ESMTP id E94422024CA8; Thu, 15 Feb 2018 10:35:50 +0000 (UTC) Subject: Re: [PATCH v2] powerpc/via-pmu: Fix section mismatch warning To: Mathieu Malaterre , Michael Ellerman Cc: Benjamin Herrenschmidt , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org References: <20180207194439.32680-1-malat@debian.org> <20180214211519.15683-1-malat@debian.org> From: Laurent Vivier Message-ID: Date: Thu, 15 Feb 2018 11:35:50 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: <20180214211519.15683-1-malat@debian.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Thu, 15 Feb 2018 10:35:54 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Thu, 15 Feb 2018 10:35:54 +0000 (UTC) for IP:'10.11.54.4' DOMAIN:'int-mx04.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'lvivier@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 14/02/2018 22:15, Mathieu Malaterre wrote: > Make the struct via_pmu_driver const to avoid following warning: > > WARNING: vmlinux.o(.data+0x4739c): Section mismatch in reference from the variable via_pmu_driver to the function .init.text:pmu_init() > The variable via_pmu_driver references > the function __init pmu_init() > 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 > > Signed-off-by: Mathieu Malaterre > Suggested-by: Laurent Vivier > --- > v2: pmu_init() is really an init function, leave __init marker > > drivers/macintosh/via-pmu.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/macintosh/via-pmu.c b/drivers/macintosh/via-pmu.c > index 94c0f3f7df69..fc56c7067732 100644 > --- a/drivers/macintosh/via-pmu.c > +++ b/drivers/macintosh/via-pmu.c > @@ -198,7 +198,7 @@ static const struct file_operations pmu_battery_proc_fops; > static const struct file_operations pmu_options_proc_fops; > > #ifdef CONFIG_ADB > -struct adb_driver via_pmu_driver = { > +const struct adb_driver via_pmu_driver = { > "PMU", > pmu_probe, > pmu_init, > Reviewed-by: Laurent Vivier