Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp7278478imu; Wed, 14 Nov 2018 14:44:57 -0800 (PST) X-Google-Smtp-Source: AJdET5d6RydJu0kKeCPQCPWWo7140vkL/EEl5a8tnh9LEiLlZpqGII6zBI81/Ch39OQZRT2P2hp4 X-Received: by 2002:a63:ea4f:: with SMTP id l15mr3437929pgk.102.1542235497137; Wed, 14 Nov 2018 14:44:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542235497; cv=none; d=google.com; s=arc-20160816; b=iTowIJewWzM8QTb6fz7+gk30ROjOPQRQ+JzQXtyPDEnEfaoiv7RKszoU1OWrrBeon8 P19gkO/sGAq+g/BNcLRG7cVzAlFwI3NKOAyziW4ii5cKd0+5mgXITMNBwygHvucvcxuz noxeXuqLyhMTVM6q+3AMGKAYvVofyultlpwK9LP2FvvnaWWYjjM0J6xqAIzmQkPoq5bM n0QnJcI0YHKNMqaGwNIFXXKJZIdJ8R68+e9A3VuVhJ645VgtDqJ7NrWY+6CO/HQa4yv+ UOyo1tC15wMCzsEz3Ax5DgTx5NEMLsOuxU8n0TqkZ7cboD7xg/YSYTI2prDJB5vYFsn+ Mg4Q== 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; bh=KeLziWqynTlioTZxEEiCVRaVodrr3ZYqsqLWE0+MKkA=; b=ZZam84N4giLmnzyZ0ZeVJKDluAq3pDqifO8S7lHfLzSKx5mtd6BN7jc3wz+xr3/Pz2 YN+dFAEQMiTUqH93KgykQxTiP3mcvlD9HNY68j6QefQdAvgzjex/xKu6GMi9FtCpXOVY fqO3n/m/S5XaQNLMH+EhzP/0BCL4EXEjzSRznp7AWFcbcjUcd1jBf2RtBZva+x30W7J3 wP0HpZGMOSfb0HGDElI75lsHjlDBnMoHqRpaEtdCbC+Y1MXu14UbDwmy35uz/dIdVRQI yvRtuhfOQWFbhIMP1OoQ7J//H3xWex6zmO8Y3uy0L3v8nsfIYYmE/RewaMuNAgBZ5Tyv qO6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=L3hn5gwr; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r2-v6si22920413pgj.139.2018.11.14.14.44.43; Wed, 14 Nov 2018 14:44:57 -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=pass header.i=@kernel.org header.s=default header.b=L3hn5gwr; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388193AbeKOItI (ORCPT + 99 others); Thu, 15 Nov 2018 03:49:08 -0500 Received: from mail.kernel.org ([198.145.29.99]:34402 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728460AbeKOI1S (ORCPT ); Thu, 15 Nov 2018 03:27:18 -0500 Received: from sasha-vm.mshome.net (unknown [64.114.255.114]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 2DAFA22521; Wed, 14 Nov 2018 22:22:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1542234135; bh=Us6UiZBUTbzch3LAcm2n72cJ39r5UsvdLqBOJAjln7c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=L3hn5gwr2ijzmdAmsmU0oBi/MR03cIH5lHKiU3LTyTEyNK4UqYrhigLNF9bsjSYl6 frURWVGn+CaTH9yKIxZ3Z51Cv4SCE8MmRIQp3oo/iKMvNlS4KYD7bnSiM+vctukQ9x 3gr0YDusQGsLmDnia5RCgLKUw4JJbVonz5vn8be0= From: Sasha Levin To: stable@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Geert Uytterhoeven , Guenter Roeck , Sasha Levin Subject: [PATCH AUTOSEL 4.19 28/73] hwmon: (ibmpowernv) Remove bogus __init annotations Date: Wed, 14 Nov 2018 17:21:22 -0500 Message-Id: <20181114222207.98701-28-sashal@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181114222207.98701-1-sashal@kernel.org> References: <20181114222207.98701-1-sashal@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Geert Uytterhoeven [ Upstream commit e3e61f01d755188cb6c2dcf5a244b9c0937c258e ] If gcc decides not to inline make_sensor_label(): WARNING: vmlinux.o(.text+0x4df549c): Section mismatch in reference from the function .create_device_attrs() to the function .init.text:.make_sensor_label() The function .create_device_attrs() references the function __init .make_sensor_label(). This is often because .create_device_attrs lacks a __init annotation or the annotation of .make_sensor_label is wrong. As .probe() can be called after freeing of __init memory, all __init annotiations in the driver are bogus, and should be removed. Signed-off-by: Geert Uytterhoeven Signed-off-by: Guenter Roeck Signed-off-by: Sasha Levin --- drivers/hwmon/ibmpowernv.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/hwmon/ibmpowernv.c b/drivers/hwmon/ibmpowernv.c index 83472808c816..64d05edff130 100644 --- a/drivers/hwmon/ibmpowernv.c +++ b/drivers/hwmon/ibmpowernv.c @@ -181,7 +181,7 @@ static ssize_t show_label(struct device *dev, struct device_attribute *devattr, return sprintf(buf, "%s\n", sdata->label); } -static int __init get_logical_cpu(int hwcpu) +static int get_logical_cpu(int hwcpu) { int cpu; @@ -192,9 +192,8 @@ static int __init get_logical_cpu(int hwcpu) return -ENOENT; } -static void __init make_sensor_label(struct device_node *np, - struct sensor_data *sdata, - const char *label) +static void make_sensor_label(struct device_node *np, + struct sensor_data *sdata, const char *label) { u32 id; size_t n; -- 2.17.1