Received: by 10.223.185.116 with SMTP id b49csp1203039wrg; Wed, 14 Feb 2018 13:17:01 -0800 (PST) X-Google-Smtp-Source: AH8x227Mf6sIZuWQw9VRmI71PbsEZl7KtMLgsJwpvDOjerVsEhj35UxjnR/VTyYjbGIWXbvvWJ0U X-Received: by 10.99.125.13 with SMTP id y13mr295501pgc.282.1518643021630; Wed, 14 Feb 2018 13:17:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518643021; cv=none; d=google.com; s=arc-20160816; b=bLl0SU10qVcKgANqGA5r8++BuCXjx1MJFzO6MxAgVq6Enp3ARniWkx9wD3xzj8cXZQ ZUqhq6Iud3rD2a12Cax2IKGHiuup01mNcH+ZbW/WbwaUIfpzw2r99GUxUi/ATdIBCDfR +KvprKVlpkyEMywTtV7ll1NbKS2sKMkpwJYQGLfpnmXYnA1gNHr7Xfcl+tuSefEzqntS mcH4UGaUB0sWeBg4u4EQe3qV+phaPMI3k8jfUvfYu8GGgfdhRMqbrGa+SlwcmcaBLUGY V0zWWr52n3C7Aw70v7Zna5071/MG5t1q1VjgX858zWv/QiZaUtcYtGVStbLwG2v1syNH jtoA== 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:dkim-signature:arc-authentication-results; bh=3wF517ALH/0HeN6a7ZOcgauSD9xIId/eluDhZAcnLKk=; b=wpJpBQJ0pJdCcqVHpID91WWPVJNc/2A8y1xzGn/LIiWuRqRmCmeME3R5gRr3pwvZM9 Owao4QGTvS/KkNwjXNTM7xPE6NR6bF5qsG89uZMvFtSyImNlfccW6hIEsB0Q1auaUi4X VpmaEnDKpRYdee9a4LmBAKVUXrQGRwHBQ5VxyQAD0G4Dr1vMXyViIkn12ccRux1XHBTu aMGMbAwxtjn0xc62Zp4B7vrb19a1MzkvVKqGz1PSTfGIVa8bYppS87sJN4cITrqlN5IX I0+A/uDYwn7eptDBgxHU7Cz7AwWUu/pFPB13KqTEpdPtl2AtiveMVsURQY06cduOvhtM Yb0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=SK2pI8Ms; 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 a8-v6si2661919plz.36.2018.02.14.13.16.46; Wed, 14 Feb 2018 13:17:01 -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=fail header.i=@gmail.com header.s=20161025 header.b=SK2pI8Ms; 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 S1031320AbeBNVPf (ORCPT + 99 others); Wed, 14 Feb 2018 16:15:35 -0500 Received: from mail-wm0-f68.google.com ([74.125.82.68]:53103 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030501AbeBNVPd (ORCPT ); Wed, 14 Feb 2018 16:15:33 -0500 Received: by mail-wm0-f68.google.com with SMTP id j199so13132518wmj.2 for ; Wed, 14 Feb 2018 13:15:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=3wF517ALH/0HeN6a7ZOcgauSD9xIId/eluDhZAcnLKk=; b=SK2pI8MsV73FLsAPzmz1+crxm61x3Y0hJQG6aWzY2JLYQa9DSSIdMZNqCwGvexfNBO Tr9I6gS65QyweokW9ECHuA0lgMdBvVlUEam+2UyP0vuO0UGRjalMtkYwe6S7zF4UFjUy sOy83XmNbHyRy2YjYtMxbPWT37WCwYkQ3Cgr9tFuCCcbgnX2WfQ+bMEWfuk+5ye37rjS l5QXknkPwAWe7lvvPeKkLQ/IiDg6+rpHUvRyr8iLAmRMueTlSXtUBIVbYgpKyBJnXlWH qpmVtEkIGWhlp59GxOcRH7lYomErQWq5fxS/x+zilP3+cAmHZBDFdIdZvrotZStAA6lw oMxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=3wF517ALH/0HeN6a7ZOcgauSD9xIId/eluDhZAcnLKk=; b=FNDNFBViLAOSVY7YvX755DBuzyS4jedElDYeRvm9xm+s9PkQmk+N3Vn7rXqy3j8ZKe QNy6YAv+kO3Z+jtq8atBKtY+/QPP2jut9MlU5wz4zBUOn1GsgG6OWllC4A8z+k5CsHa9 3KNrmZ//bLUisr7XyGDasTgwVnPvIo2CljN6Av7KQ+qwUYN8h61e/1O8Hk44Uy8wZqob A+VWJXOhM7BZ6MgnUOC2SyD9+I7N8P737pozTlbJrMbHXp3uZfwYA5axyJy9RfO0Nmqg ackN6//6pqM4oPxRKeryTO0X7tcZtT+iIMS21xqBBIkc4y/TYqbb8PO4C+4nKRl/9N6W SmXA== X-Gm-Message-State: APf1xPByHz5s02myFZl16N4njFK9WatATaHIJFeLMO4A6hy++JhiyyGq zBp8ELTpnYGObYn8zrcffvQ= X-Received: by 10.28.228.197 with SMTP id b188mr322080wmh.44.1518642932041; Wed, 14 Feb 2018 13:15:32 -0800 (PST) Received: from macbookpro.malat.net (bru31-1-78-225-226-121.fbx.proxad.net. [78.225.226.121]) by smtp.gmail.com with ESMTPSA id x135sm11059088wmf.35.2018.02.14.13.15.31 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 14 Feb 2018 13:15:31 -0800 (PST) Received: by macbookpro.malat.net (Postfix, from userid 1000) id 56ABE10C04A8; Wed, 14 Feb 2018 22:15:30 +0100 (CET) From: Mathieu Malaterre To: Michael Ellerman Cc: Laurent Vivier , Mathieu Malaterre , Benjamin Herrenschmidt , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: [PATCH v2] powerpc/via-pmu: Fix section mismatch warning Date: Wed, 14 Feb 2018 22:15:18 +0100 Message-Id: <20180214211519.15683-1-malat@debian.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180207194439.32680-1-malat@debian.org> References: <20180207194439.32680-1-malat@debian.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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, -- 2.11.0