Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5615002imu; Mon, 26 Nov 2018 03:02:43 -0800 (PST) X-Google-Smtp-Source: AFSGD/U9onq7jXNADKTGHOKZGmJtDoqccVfkkeTM413nF9KOvaTaD+3EEHdSwfV3BD51Js1KqMoQ X-Received: by 2002:a17:902:365:: with SMTP id 92mr25991306pld.327.1543230163456; Mon, 26 Nov 2018 03:02:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543230163; cv=none; d=google.com; s=arc-20160816; b=QNsRTby7jXWg9iKLJ7vlgc72IZ6RIjvz6hW7JGNZarxQeS8WSBRmvLHO7pUWCur4de zMWWQutYvJ4hAfQZn3sVBzbGGXkTi9EzFQexmGmvKoYa4Z9ABG4fo4LzubAwTjSPMtsW SYOpkAUGVgHfyDQjfBRf1/RhaLHODWGb9W6Ij8sX1xCHRbS6nqFsFmxUT+tgOH26CBuC RYHiJQ9sUMP43IqVb8KxwMNRwnAYO+sLzXfGTFzOaffZp3Qq8ctlA7ObBKMO0cdXoB0b zl5axego09Ga2Hz2/URhxx2VGYpNzsG7DSu4QZFFWecDNjM7jIuAP+Av8ZqEnxPGJBP3 EsjA== 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:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=SmNdUn/o2JGMBZ8daUKwhxoSi2LlhQ6FM8DIz7SRePE=; b=IBheV4yyEJz6SePzC+WgXPbT3ria1rqZoWACO1JgTH70cpmf8wmCWdntEIrrdltkPQ KB9EP7iqDLkHIPorDu7NwQJxzfV6I4Bh03CZz0UeEmW/y/BRAXa94TBnxyM3FNJo9NKH HanfvFDTw4dJ5YjvrkQyXfSd182qvQJJJMY5zxhc/Eq3qAoSpH7JFaeJoi2RJn9FAGXc 4DOmSWn5d4cAvNXeWb2OP1WG4zijG4IZsEPvmKb0M2dhZ7p/PB+COg+70KA+1kpZNyd+ YlN3xmTEqNJ+3+UrrpzmBXtxr1EUfWxCVNHrmoyJmQvu7aGV8Am+W7qD/NSGMYUsCAWW EeVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=nr354HH+; 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 p91-v6si68681685plb.374.2018.11.26.03.02.26; Mon, 26 Nov 2018 03:02:43 -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=nr354HH+; 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 S1729622AbeKZVx3 (ORCPT + 99 others); Mon, 26 Nov 2018 16:53:29 -0500 Received: from mail.kernel.org ([198.145.29.99]:35218 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728810AbeKZVx2 (ORCPT ); Mon, 26 Nov 2018 16:53:28 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 16EA220817; Mon, 26 Nov 2018 10:59:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1543229983; bh=Yi0TBohtnkDtVN7zU9V101YcpIbHz/s7Q864U2KoYLc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nr354HH+rN+aG+1gCb0VAlSdAkbrBvAvaoJ3vMRjyejkp7B9JvVwqGU4kdPOO86nP XaIjkzCtmmbtYTbUJuAM0iPCbNqHPpwhG8eynrVbMLYMsRgo5IYAkUAqgKQuCoKhg2 Nm4p8Vr5mi0wSX0omyT/KdbHccpAaRyedKg0LA0o= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Geert Uytterhoeven , Guenter Roeck , Sasha Levin Subject: [PATCH 4.14 27/62] hwmon: (ibmpowernv) Remove bogus __init annotations Date: Mon, 26 Nov 2018 11:51:08 +0100 Message-Id: <20181126105052.996452896@linuxfoundation.org> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20181126105050.592727680@linuxfoundation.org> References: <20181126105050.592727680@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ [ 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 5ccdd0b52650..b38f4951c94e 100644 --- a/drivers/hwmon/ibmpowernv.c +++ b/drivers/hwmon/ibmpowernv.c @@ -126,7 +126,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; @@ -137,9 +137,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