Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5611149imu; Mon, 26 Nov 2018 02:59:57 -0800 (PST) X-Google-Smtp-Source: AFSGD/UPVa27qdG9zabXdh9HqjQIo9B1Qizw8Yy1wS88ALiPa81CqdMLA0DyvbpFiT3FA62wExkN X-Received: by 2002:a63:ab08:: with SMTP id p8mr23976921pgf.87.1543229997752; Mon, 26 Nov 2018 02:59:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543229997; cv=none; d=google.com; s=arc-20160816; b=diQGahNWHz/Iju9RgHWdYyhs03k1UC1c7BohqwGlhNTmmgbto5BwDFEGK7hJ2C4fWM ggslsprRHW0sNJuoJ99rTaniX+nTzXj00H4yUWkVFwUT5Qj982nPAWmd3cSAUalWKvYq NpC+yEMzU+Vsv6KLsFhOIaAms7lyx5EpWIgJ+9N8/CTHF48v5zsCAZc2BErUs0cnYRXn CAEhHCI5i34DqwQ12hWVjczp3YgPojrxxlsnw11cGqRdh3TXdkbBMBHgzsBtYpX9zL5D A++irr4VPrmz9smFR+XA+xpQVtRwXTMBzce0K8EYT8pbBABsDDmwXGzQQUBR/n3ck+DX XHhw== 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=L3tGCBf2WwbeNPWgh+xRVgvxeyEV0fq6E/KA/HaV7E4=; b=C6EDyaQTGGTeHqzIV3fxZhsc8CWBD7tsh2OVoMyQxIXWXhbcWwmt0fd7CB+wi29Tn+ ofIN3rDQziSvoyO7qu5UdPxrCXARFoPWO01UaLLkvy0YeNSIb/ICsfkWgzP8qbgRCXt3 Yf3+RElbkrOizoNIqKoe8H/TWElpTR4z23wo6aCYwcLOn4IYcrA8uaUNH+/eTWWVTNmP P1rbo+PWNsD+r7XbQqRjNZpBsGfV+RU/VsuEKtpXdF+4XPOKOjLpbN1Iz21kuKNwaZWc BbMukvA81TXatL+tAGSIn5N7vGE5w/LfwYsddpnRUDTnasIrvj/wfMXg1qwEyh25NqCY tJSg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=u2i0kHKs; 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 c22si43348179pgb.254.2018.11.26.02.59.42; Mon, 26 Nov 2018 02:59: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=u2i0kHKs; 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 S1728747AbeKZVu4 (ORCPT + 99 others); Mon, 26 Nov 2018 16:50:56 -0500 Received: from mail.kernel.org ([198.145.29.99]:60256 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727203AbeKZVu4 (ORCPT ); Mon, 26 Nov 2018 16:50:56 -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 403222089F; Mon, 26 Nov 2018 10:57:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1543229831; bh=/Y8+AUC/stYZsSRCzkvFFJBCEsBLY9y3fNJtH/JhpUo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=u2i0kHKszH/ncocGrD2sodafsfrAooFBYKbJajh0C9eYpjTTbSvB+o+/ZaLIv5Aa3 MhBd7TULPG0PsErEba2/hxws39yhuWGjKfhXItY+q12iwSNSEiP6zRyOEgb2bCdxLt 4sQ8fKDynaT7xv6JgkWTEnH2yzUMOstiumVSMTYM= 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.9 19/46] hwmon: (ibmpowernv) Remove bogus __init annotations Date: Mon, 26 Nov 2018 11:51:08 +0100 Message-Id: <20181126105047.999651887@linuxfoundation.org> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20181126105045.447291262@linuxfoundation.org> References: <20181126105045.447291262@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.9-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 6d2e6605751c..18b3c8f258bf 100644 --- a/drivers/hwmon/ibmpowernv.c +++ b/drivers/hwmon/ibmpowernv.c @@ -114,7 +114,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; @@ -125,9 +125,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