Message ID | 20240130111250.185718-2-angelogioacchino.delregno@collabora.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-44467-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2087:b0:106:209c:c626 with SMTP id gs7csp1147012dyb; Tue, 30 Jan 2024 03:26:13 -0800 (PST) X-Google-Smtp-Source: AGHT+IHWy3aTmhUuP+KMxK1BqipGViAKC694uze0LgAschfJVfbBC4wPay/l1GOUJQyFVd1TOkAz X-Received: by 2002:a05:6a20:d48f:b0:19c:9ebc:93b1 with SMTP id im15-20020a056a20d48f00b0019c9ebc93b1mr7172589pzb.59.1706613973488; Tue, 30 Jan 2024 03:26:13 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706613973; cv=pass; d=google.com; s=arc-20160816; b=NE5MUWRL0XW39sWJX2F780SLSXsH+DqPs5jyGCAKgmQb5OvXUl98Frkk872PULyg8T hONu5iDLD8L/Hm5Urhu7OuCFrVxAsZg4HwTpZ8OzQ9qWqyxpnsEuiYhEqWc0LVV526yi CupU7vlKLbAxFIivk7NmVwMHzbXHykw3wa9nOTrbMBNTODOcK/2jcwYJRZmlMA9sJ99M zZYeCuA1A3KC73HuKh8ikQ7RzETViiEDwFrTp2IBDuy/O9wJ3cqYAqnRSDpibdtsGB0v kt2xSkpHesSpllBO/Y8XNf4kAUy5mxSEvL3JxDT86DJRN3GvgY1W9HWV435QYXsvHAn5 YvAA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=pg9He0V97ZC0wYIO7pl10cx8/8jw0SITe3YcmpgM2Pk=; fh=TdB2JcrCfYG//vC2U/jVG9IoBrdfnUybS1jSXf1pcBE=; b=NdMXKciqU0zJzHOVsNgWuyFKYIgfpT4h2R7Z5HQ2MyeB/xM+eFY/IiowG67p57MWsU zba8FJSPHsWhgOVUw3Uga8Dzrow9YGggTjGz2a3NmuwuhwLrJmGNkuA83hPR4J7zbqUH Z1mjaOPf9deQSyXHmGk8fi1jaNr+GADhIYiGF9HVwkdpnrpebgrnWjeI9oL+YqAo4ot2 zLGz2Yxia7LeMzB3U3w+9DkHH2irDOq5ZS/zrhhhLlYuewYgflChE4/b4pIHp+d+ai1+ ZJJfSdbHN6t5jiE0kFeSUXvCUoP3bnjzABaoFLQRzc1MI4U5bKiak11/DoBbd3ZWhu5T ZfaA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=Qt0nsFEZ; arc=pass (i=1 spf=pass spfdomain=collabora.com dkim=pass dkdomain=collabora.com dmarc=pass fromdomain=collabora.com); spf=pass (google.com: domain of linux-kernel+bounces-44467-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-44467-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id m4-20020a632604000000b005d8b911b4adsi5294933pgm.435.2024.01.30.03.26.13 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jan 2024 03:26:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-44467-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=Qt0nsFEZ; arc=pass (i=1 spf=pass spfdomain=collabora.com dkim=pass dkdomain=collabora.com dmarc=pass fromdomain=collabora.com); spf=pass (google.com: domain of linux-kernel+bounces-44467-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-44467-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 60025291FE0 for <ouuuleilei@gmail.com>; Tue, 30 Jan 2024 11:13:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EA34366B58; Tue, 30 Jan 2024 11:13:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="Qt0nsFEZ" Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7B6C5664AE; Tue, 30 Jan 2024 11:13:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.235.227.194 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706613197; cv=none; b=ZZTncZ47W62MGa2Wc7ABxCURX8/bdOu1VXiRuE5AbJqknVhiZWxVJnKyi5cTc32JMuFFlnA760DiyqE8TjOhZ83OwCrhGZI1PjZfxZ27ZHgPVAlp3wRHcxEPzI1Q7fARAEmWt932tnbhnKaUdYxkWEZcaQt5qnCLTLddnznG1VI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706613197; c=relaxed/simple; bh=NMhqSFdRSjNI1p1vyp5dOffkk1ADZ0MeWiy+ifEvnrE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=a6A+YXIeqtedJSq1x3qSAwDSBg17IFFcZu0iFAc1qPE1fm8iu7FoWRPTrzn8d7GB8bak/k9QxmQtSrJ3LNYtr3tMuDKkxULbL4OW6rVWIESSECkeUb0/neYZQmQTMyH4pV4ldI0fTVLzJYngnDBVTZFm89ECfo4UrZCfjjgU1bU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=Qt0nsFEZ; arc=none smtp.client-ip=46.235.227.194 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1706613192; bh=NMhqSFdRSjNI1p1vyp5dOffkk1ADZ0MeWiy+ifEvnrE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Qt0nsFEZO5QpPc8PT9E0Lm/cgu375vY8D/mR9k7Z3W1Wv+myVR0nC/5GsZAjx1uOg IOPezeLBWscheyDiOgrc/qZAVxW2SIrVUutDo7DZ63z9zUaXkaOq4XWiQV+cYY6Cb/ a6gCdWmh3IEA5qY5GYnH3bdWQBTID73s0OeKIN3eC0naUOfwNSfz1+7Gn+mzXamZZ1 LbYglX3oHMZWJBash/KF827A8A2VN09xGuA48AaHftWY8fjbotKGMviiOHH6Ui9Wl9 +4O3dOIUxOrUpnxr2lKSbzRngscGghNZAZQNMEs9YlAtIaUx9luxx0GphbKNcEdKnI Xff/+eqNdXpPA== Received: from IcarusMOD.eternityproject.eu (cola.collaboradmins.com [195.201.22.229]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: kholk11) by madrid.collaboradmins.com (Postfix) with ESMTPSA id F116F37811F4; Tue, 30 Jan 2024 11:13:09 +0000 (UTC) From: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> To: daniel.lezcano@linaro.org Cc: miquel.raynal@bootlin.com, rafael@kernel.org, rui.zhang@intel.com, lukasz.luba@arm.com, support.opensource@diasemi.com, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, andersson@kernel.org, konrad.dybcio@linaro.org, amitk@kernel.org, thara.gopinath@gmail.com, niklas.soderlund@ragnatech.se, srinivas.pandruvada@linux.intel.com, angelogioacchino.delregno@collabora.com, baolin.wang@linux.alibaba.com, u.kleine-koenig@pengutronix.de, hayashi.kunihiko@socionext.com, d-gole@ti.com, linus.walleij@linaro.org, DLG-Adam.Ward.opensource@dm.renesas.com, error27@gmail.com, heiko@sntech.de, hdegoede@redhat.com, jernej.skrabec@gmail.com, f.fainelli@gmail.com, bchihi@baylibre.com, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, linux-renesas-soc@vger.kernel.org, kernel@collabora.com Subject: [PATCH v1 01/18] thermal: core: Change governor name to const char pointer Date: Tue, 30 Jan 2024 12:12:33 +0100 Message-ID: <20240130111250.185718-2-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240130111250.185718-1-angelogioacchino.delregno@collabora.com> References: <20240130111250.185718-1-angelogioacchino.delregno@collabora.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789514453855025121 X-GMAIL-MSGID: 1789514453855025121 |
Series |
[v1,01/18] thermal: core: Change governor name to const char pointer
|
|
Commit Message
AngeloGioacchino Del Regno
Jan. 30, 2024, 11:12 a.m. UTC
All users are already assigning a const char * to the `governor_name`
member of struct thermal_zone_params and to the `name` member of
struct thermal_governor.
Even if users are technically wrong, it just makes more sense to change
this member to be a const char pointer instead of doing the other way
around.
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
---
include/linux/thermal.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Comments
On Tue, Jan 30, 2024 at 12:13 PM AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> wrote: > > All users are already assigning a const char * to the `governor_name` > member of struct thermal_zone_params and to the `name` member of > struct thermal_governor. > Even if users are technically wrong, it just makes more sense to change > this member to be a const char pointer instead of doing the other way > around. > > Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Acked-by: Rafael J. Wysocki <rafael@kernel.org> or I can pick it up right away if you want me to do that. > --- > include/linux/thermal.h | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/include/linux/thermal.h b/include/linux/thermal.h > index b7a3deb372fd..65d8f92a9a0d 100644 > --- a/include/linux/thermal.h > +++ b/include/linux/thermal.h > @@ -214,7 +214,7 @@ struct thermal_zone_device { > * @governor_list: node in thermal_governor_list (in thermal_core.c) > */ > struct thermal_governor { > - char name[THERMAL_NAME_LENGTH]; > + const char *name; > int (*bind_to_tz)(struct thermal_zone_device *tz); > void (*unbind_from_tz)(struct thermal_zone_device *tz); > int (*throttle)(struct thermal_zone_device *tz, > @@ -226,7 +226,7 @@ struct thermal_governor { > > /* Structure to define Thermal Zone parameters */ > struct thermal_zone_params { > - char governor_name[THERMAL_NAME_LENGTH]; > + const char *governor_name; > > /* > * a boolean to indicate if the thermal to hwmon sysfs interface > --
Il 01/02/24 19:37, Rafael J. Wysocki ha scritto: > On Tue, Jan 30, 2024 at 12:13 PM AngeloGioacchino Del Regno > <angelogioacchino.delregno@collabora.com> wrote: >> >> All users are already assigning a const char * to the `governor_name` >> member of struct thermal_zone_params and to the `name` member of >> struct thermal_governor. >> Even if users are technically wrong, it just makes more sense to change >> this member to be a const char pointer instead of doing the other way >> around. >> >> Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> > > Acked-by: Rafael J. Wysocki <rafael@kernel.org> > > or I can pick it up right away if you want me to do that. > I appreciate having less patches to carry over with new series versions. Whatever you can take, please feel free to pick directly :-) Thanks, Angelo >> --- >> include/linux/thermal.h | 4 ++-- >> 1 file changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/include/linux/thermal.h b/include/linux/thermal.h >> index b7a3deb372fd..65d8f92a9a0d 100644 >> --- a/include/linux/thermal.h >> +++ b/include/linux/thermal.h >> @@ -214,7 +214,7 @@ struct thermal_zone_device { >> * @governor_list: node in thermal_governor_list (in thermal_core.c) >> */ >> struct thermal_governor { >> - char name[THERMAL_NAME_LENGTH]; >> + const char *name; >> int (*bind_to_tz)(struct thermal_zone_device *tz); >> void (*unbind_from_tz)(struct thermal_zone_device *tz); >> int (*throttle)(struct thermal_zone_device *tz, >> @@ -226,7 +226,7 @@ struct thermal_governor { >> >> /* Structure to define Thermal Zone parameters */ >> struct thermal_zone_params { >> - char governor_name[THERMAL_NAME_LENGTH]; >> + const char *governor_name; >> >> /* >> * a boolean to indicate if the thermal to hwmon sysfs interface >> --
On Fri, Feb 2, 2024 at 11:01 AM AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> wrote: > > Il 01/02/24 19:37, Rafael J. Wysocki ha scritto: > > On Tue, Jan 30, 2024 at 12:13 PM AngeloGioacchino Del Regno > > <angelogioacchino.delregno@collabora.com> wrote: > >> > >> All users are already assigning a const char * to the `governor_name` > >> member of struct thermal_zone_params and to the `name` member of > >> struct thermal_governor. > >> Even if users are technically wrong, it just makes more sense to change > >> this member to be a const char pointer instead of doing the other way > >> around. > >> > >> Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> > > > > Acked-by: Rafael J. Wysocki <rafael@kernel.org> > > > > or I can pick it up right away if you want me to do that. > > > > I appreciate having less patches to carry over with new series versions. > > Whatever you can take, please feel free to pick directly :-) OK, applied (as 6.9 material). Thanks!
diff --git a/include/linux/thermal.h b/include/linux/thermal.h index b7a3deb372fd..65d8f92a9a0d 100644 --- a/include/linux/thermal.h +++ b/include/linux/thermal.h @@ -214,7 +214,7 @@ struct thermal_zone_device { * @governor_list: node in thermal_governor_list (in thermal_core.c) */ struct thermal_governor { - char name[THERMAL_NAME_LENGTH]; + const char *name; int (*bind_to_tz)(struct thermal_zone_device *tz); void (*unbind_from_tz)(struct thermal_zone_device *tz); int (*throttle)(struct thermal_zone_device *tz, @@ -226,7 +226,7 @@ struct thermal_governor { /* Structure to define Thermal Zone parameters */ struct thermal_zone_params { - char governor_name[THERMAL_NAME_LENGTH]; + const char *governor_name; /* * a boolean to indicate if the thermal to hwmon sysfs interface