From patchwork Fri Sep 24 12:43:50 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 514566 Delivered-To: patch@linaro.org Received: by 2002:a17:906:f46:0:0:0:0 with SMTP id h6csp1254344ejj; Fri, 24 Sep 2021 06:03:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxBYt4+b56SqYdnqevvQCGbMknPXAoeamZDiWP4JV9bsa//LeJS+vGaCq3o9ehnYF4XYD5u X-Received: by 2002:a5d:8ac1:: with SMTP id e1mr530111iot.40.1632488627043; Fri, 24 Sep 2021 06:03:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632488627; cv=none; d=google.com; s=arc-20160816; b=on/HaVzYLPkNlVIaJ+xJqATZqFd2qQFZa4gyyyRs1lamqs8UhcMX1HNadhC6nylpRz 7XN2s7FXTPcWF72RDrXhkWgqwZvNDfMWihUZm+3nPecQD7tPByYjC2ht2O5yAgrip+he eguZNonlGMEa9vmLFJH74wBg69nvzxIjQR5jKMYJNgOUbiXO5zPGuMD+sRYHdjnnYodH DVGG8DUM0cf65umOe1v6oH5YoRjawCUvEbI6di3h/bnJ6PAeR4AYLq8jHdiEGTffrMJ0 f/cVFNYmhLr2Xog1/+yeiNH+rVb9EIuAiNul2C3rMnIQiY6osoyIouEbZSkWbjc1K3s+ zRbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=VyZ7gmx8wHrPE0CooNRMytk5TmTyz9FDb9Pkn1teDOU=; b=WgHCFQgk1qS3tl71B6/CaypkiOI3LOw+S8iAiYTuJefOa6+nP0pBwCX6C5fQtIAd00 hr0GuZwdZPQYOMK0Cm549QfObI9yMny1erqM6M7dg+3tLefwUiBJ31yDFz0WCwpTBZK0 je/qYsNTUNgcvcdj+NVp+kI+LsnIU6N5Rtd/NWGO96fwKsJDyvanN9kwhuueYJBS2Og8 UZaCqOBf/VT4RZwnX9L6bcfBMOhDx++Zn8qroXQ55cNDPcmmHM7q2DnR9sa7MhWngROP lQz1AffFWB5qgBilzVLS/8uIyxTAaQldTBdUmlhjOpZfguE2mof+RtQNHCDg0rqt8veC YuUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=nLkEwL4O; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h15si9756452jaa.28.2021.09.24.06.03.45; Fri, 24 Sep 2021 06:03:47 -0700 (PDT) Received-SPF: pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=nLkEwL4O; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345671AbhIXNEY (ORCPT + 11 others); Fri, 24 Sep 2021 09:04:24 -0400 Received: from mail.kernel.org ([198.145.29.99]:34394 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345491AbhIXNCS (ORCPT ); Fri, 24 Sep 2021 09:02:18 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 12B1961452; Fri, 24 Sep 2021 12:54:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1632488071; bh=m1Kujgook1PbYh+KRb/Tnz6OmjVPOuTODtLuTsMfw3I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nLkEwL4Ofvt1i+yA15/yDiNfjj0EsWfHI349TP2L2FsoE9d85ANQ06ivy5v66y+1E Ckm1p5ls0W+K0OTmJYfPB612+Zrt4uGF12KWCxfHaAgiveCHeXM2O+cSejfaCSLCU+ BGKsolbUtnbosCTdVe3j0oSMNoFkTXwj4JWN59p8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Arnd Bergmann , Jean-Francois Dagenais , Daniel Lezcano , Sasha Levin Subject: [PATCH 5.14 041/100] thermal/core: Fix thermal_cooling_device_register() prototype Date: Fri, 24 Sep 2021 14:43:50 +0200 Message-Id: <20210924124342.832465960@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210924124341.214446495@linuxfoundation.org> References: <20210924124341.214446495@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Arnd Bergmann [ Upstream commit fb83610762dd5927212aa62a468dd3b756b57a88 ] There are two pairs of declarations for thermal_cooling_device_register() and thermal_of_cooling_device_register(), and only one set was changed in a recent patch, so the other one now causes a compile-time warning: drivers/net/wireless/mediatek/mt76/mt7915/init.c: In function 'mt7915_thermal_init': drivers/net/wireless/mediatek/mt76/mt7915/init.c:134:48: error: passing argument 1 of 'thermal_cooling_device_register' discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers] 134 | cdev = thermal_cooling_device_register(wiphy_name(wiphy), phy, | ^~~~~~~~~~~~~~~~~ In file included from drivers/net/wireless/mediatek/mt76/mt7915/init.c:7: include/linux/thermal.h:407:39: note: expected 'char *' but argument is of type 'const char *' 407 | thermal_cooling_device_register(char *type, void *devdata, | ~~~~~~^~~~ Change the dummy helper functions to have the same arguments as the normal version. Fixes: f991de53a8ab ("thermal: make device_register's type argument const") Signed-off-by: Arnd Bergmann Reviewed-by: Jean-Francois Dagenais Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20210722090717.1116748-1-arnd@kernel.org Signed-off-by: Sasha Levin --- include/linux/thermal.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) -- 2.33.0 diff --git a/include/linux/thermal.h b/include/linux/thermal.h index d296f3b88fb9..8050d929a5b4 100644 --- a/include/linux/thermal.h +++ b/include/linux/thermal.h @@ -404,12 +404,13 @@ static inline void thermal_zone_device_unregister( struct thermal_zone_device *tz) { } static inline struct thermal_cooling_device * -thermal_cooling_device_register(char *type, void *devdata, +thermal_cooling_device_register(const char *type, void *devdata, const struct thermal_cooling_device_ops *ops) { return ERR_PTR(-ENODEV); } static inline struct thermal_cooling_device * thermal_of_cooling_device_register(struct device_node *np, - char *type, void *devdata, const struct thermal_cooling_device_ops *ops) + const char *type, void *devdata, + const struct thermal_cooling_device_ops *ops) { return ERR_PTR(-ENODEV); } static inline struct thermal_cooling_device * devm_thermal_of_cooling_device_register(struct device *dev,