From nobody Sun Feb 8 05:30:10 2026 Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CD90F2580F3 for ; Tue, 2 Dec 2025 12:02:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764676959; cv=none; b=mSulqOHZozlf8eAq0BYBB1lDyvShlXH2RtD3heN401LxWiSFhHdTvxUeMpH56LdylYoSwJDn+8DewJOtTmmCcLfAu3GqhjR+ZlBufWHRB6jNBJSctmqfharNeDTJs89Go/uAt47o/kvfNdvxOkLAy+tkwPXQpF2yzskxbg+J37w= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764676959; c=relaxed/simple; bh=ge1x2oWZ+hs365NmMpqJ4TN/I4SI4ABtvBiRX4AlaQM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:To:Cc; b=mSwyip6zxD6gyQr21oL13BYJXbqWojE58dg3plfK6oXN2YQhJV0FUlNigCIoUCLwcFp4+GfdjsAvyAgUatS3X5UZIBp4BSCEb2IkmO/Uufsd+BSWP0+LQNBrlXFJFbwx+3QQ7c++AoVl4GWbU4iInba+sRdVw0UpJpWLHZe3BMo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=yUT7E4eA; arc=none smtp.client-ip=209.85.128.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="yUT7E4eA" Received: by mail-wm1-f51.google.com with SMTP id 5b1f17b1804b1-477aa218f20so36772915e9.0 for ; Tue, 02 Dec 2025 04:02:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1764676956; x=1765281756; darn=vger.kernel.org; h=cc:to:message-id:content-transfer-encoding:mime-version:subject :date:from:from:to:cc:subject:date:message-id:reply-to; bh=FVGsHORFfS62JoCVlAaVjxuR8v8htnbnxQ0FZyoahLk=; b=yUT7E4eA4MQkVLW9xM06lCewijzwC3ksi6FRttLU+8hy83Fme4nnqWOTqLUeHufyJg wkw84N2Ks1X1HePbEiA3p2lt4pxVdGOXtvWlf/jG1PERNGebvH05DQFStiFcwoYZD1je d1xI8pwiMPS+k13s/VewWPU7yR4oXYsynch9mDjgVZ4pGZk/GSIkx8RZz1RjtLJJLcQH 4XLdCbKBZ36hsmrg+qeaxbNv9o4oB2B4srYP2td/kJbFG7A3ICK5R4CPCTDMqkLSnPSo YrVk6jWpoYwz+C+9CAzAcXHpT7naoPs1aaFq7n9o3ioi/aCKmHlLnbDZIHurK7TDOJkg gJcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764676956; x=1765281756; h=cc:to:message-id:content-transfer-encoding:mime-version:subject :date:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=FVGsHORFfS62JoCVlAaVjxuR8v8htnbnxQ0FZyoahLk=; b=mOocDvGXLHewd/5oLV5JExugK+WzbIYqmW9HCkylxQX46ysDzDbianU80DKU8sAnjS 3W2c8yomwoo/nF9+BvvGdH5mY3n8BgxFaUXn8z1qV0b1XOoQKMc35hJhFvXTCEi5F/Er X5ZCmVmj4g0lwC3ALfDA+VCERxGEAcPMSBlJVblBrLFDqPATVxMwXvebo50ItM77pUQH 20YfOuEzoGO3/i74eJp3oxbOnbVKqNNLDHzIT3FsEI0MpNGP/s0BDcygTYpNvrJukKEm rUFArbvO3+EyfbsJYVd1PuQPbmdwPZJdolgFS/UzZ74zKAjv0mDNPWgo7Rr0lMa4Kaa+ XbnA== X-Forwarded-Encrypted: i=1; AJvYcCVYt4/o49szVRU20A4Z52cHcHeqF2GGXKUn9iLcTK8ZIGZQsFapT9KV4x4HEVvSiCMSDvlyPqflxODrWSE=@vger.kernel.org X-Gm-Message-State: AOJu0Ywn07ZS2koCrs8iUM4uw41tjBcm2f7+HxIgS6mR3eWsDT2OsyZK ctrT2ykp1ru+nfgWgfF2O92GgiZJP5rCJROI//UGmVU3vMWH9MpVs3x5jFUfwi1H1Eo= X-Gm-Gg: ASbGncsu5diMZ6tDn+j/ICf+lS1Zj9XbT9nJhnkuM5CQr9atMZNVEd72Ov8WvMspFZy ZzQfAnnDkGMaHCqCJ3vuwWLa3UEHpXJgpN4hCOrfvw+Z9mahyqFcE5DREN8Zg5nVg3NEFmXhRbS 3tztAzmGeLtM70A+TZbow7L1lP3XfA0lZFHdMymp5Tu5/NYxn+hoP0SusV4IBv33MBdrGIM9M4D V72PUvUqPsrYcIukj+vYxm2XLe8CxpM13JGiIikbxMT14OC5LhRSUJlrZQYwPSvZIB0j/1MQPWE KIIMNC8ppqcPYuZeJYL1TmptS856tCWnuKy/N2Rjqa31XpM6YvYqHeS1ap50QZDY4MNgVL3ZvWN 37TrlhhRh4a3nTKOuCkHnS9WSbSMuUPRcMECCuTzozWhl+p+mBQTtqRCD+tA7Vr8nrfFIjJpCBh NlIql5OPPpNlvy1lRIF74v8Av3bj0cach1K7ghp6Zczxefp8EwdEdVfe6aafb5f08iuI4ci1YsJ WqlYg== X-Google-Smtp-Source: AGHT+IFE5uAtt+SD+gnxgEcSOfhYD+5ANP6IoR0nePsdS8RDBM8wp8CK1WLeWWdDh/y2R4AL51kMLQ== X-Received: by 2002:a05:600c:4588:b0:477:a21c:2066 with SMTP id 5b1f17b1804b1-477c0165d5bmr376336125e9.5.1764676956095; Tue, 02 Dec 2025 04:02:36 -0800 (PST) Received: from ta2.c.googlers.com (17.83.155.104.bc.googleusercontent.com. [104.155.83.17]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4790add608bsm362778215e9.5.2025.12.02.04.02.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Dec 2025 04:02:35 -0800 (PST) From: Tudor Ambarus Date: Tue, 02 Dec 2025 12:02:29 +0000 Subject: [PATCH] thermal: thresholds: change thermal_thresholds_init to return void Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251202-th-threshold-init-v1-1-7e5d7e878b6c@linaro.org> X-B4-Tracking: v=1; b=H4sIAFXVLmkC/x2MQQqAMAwEvyI5G9CqF78iHqSJNiBVEhGh+HeDM CzMYaeAsQobjFUB5VtMjuzS1hXEtOSNUcgdQhOG1gev5ChbOnZCyXJh5Kaj0PUL9QT+O5VXef7 mNL/vByRdtlFjAAAA X-Change-ID: 20251202-th-threshold-init-ce03d234ad4d To: "Rafael J. Wysocki" , Daniel Lezcano , Zhang Rui , Lukasz Luba Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Tudor Ambarus X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1764676954; l=2592; i=tudor.ambarus@linaro.org; s=20241212; h=from:subject:message-id; bh=ge1x2oWZ+hs365NmMpqJ4TN/I4SI4ABtvBiRX4AlaQM=; b=s/he3mk1qHiaCP+v3rvROdSJCSCPjte6+AMp4pVY0Xd4Jm1RNEm05yWvKlhQi2036qIPVtk+3 FvHmQZu4PR/DcOYT9wKOYNKouwRUZ519xECDIT223a7AMrtZYQF/l/b X-Developer-Key: i=tudor.ambarus@linaro.org; a=ed25519; pk=uQzE0NXo3dIjeowMTOPCpIiPHEz12IA/MbyzrZVh9WI= The function always returns 0, so change its return type to void and remove the return value check in the caller. Signed-off-by: Tudor Ambarus --- drivers/thermal/thermal_core.c | 6 +----- drivers/thermal/thermal_thresholds.c | 4 +--- drivers/thermal/thermal_thresholds.h | 2 +- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c index 17ca5c082643592b46cbbe708c716230fac215ef..05c1e2ff6a0a29e640646132a8d= 4a0ee63a200a8 100644 --- a/drivers/thermal/thermal_core.c +++ b/drivers/thermal/thermal_core.c @@ -1618,9 +1618,7 @@ thermal_zone_device_register_with_trips(const char *t= ype, goto unregister; } =20 - result =3D thermal_thresholds_init(tz); - if (result) - goto remove_hwmon; + thermal_thresholds_init(tz); =20 thermal_zone_init_complete(tz); =20 @@ -1630,8 +1628,6 @@ thermal_zone_device_register_with_trips(const char *t= ype, =20 return tz; =20 -remove_hwmon: - thermal_remove_hwmon_sysfs(tz); unregister: device_del(&tz->device); release_device: diff --git a/drivers/thermal/thermal_thresholds.c b/drivers/thermal/thermal= _thresholds.c index 38f5fd0e89303aca32be3c6b11928196b825502b..351f4a464b11df1b64f45f980a3= 49d19a3521b4b 100644 --- a/drivers/thermal/thermal_thresholds.c +++ b/drivers/thermal/thermal_thresholds.c @@ -13,11 +13,9 @@ #include "thermal_core.h" #include "thermal_thresholds.h" =20 -int thermal_thresholds_init(struct thermal_zone_device *tz) +void thermal_thresholds_init(struct thermal_zone_device *tz) { INIT_LIST_HEAD(&tz->user_thresholds); - - return 0; } =20 static void __thermal_thresholds_flush(struct thermal_zone_device *tz) diff --git a/drivers/thermal/thermal_thresholds.h b/drivers/thermal/thermal= _thresholds.h index cb372659a20d648e92d7800628d29f4343f4137b..5e2629ca369875f4336a2b334fa= 0da4bcfe9e54b 100644 --- a/drivers/thermal/thermal_thresholds.h +++ b/drivers/thermal/thermal_thresholds.h @@ -8,7 +8,7 @@ struct user_threshold { int direction; }; =20 -int thermal_thresholds_init(struct thermal_zone_device *tz); +void thermal_thresholds_init(struct thermal_zone_device *tz); void thermal_thresholds_exit(struct thermal_zone_device *tz); void thermal_thresholds_handle(struct thermal_zone_device *tz, int *low, i= nt *high); void thermal_thresholds_flush(struct thermal_zone_device *tz); --- base-commit: 63d26c3811421ceeb5b82a85489b88bf545e33c7 change-id: 20251202-th-threshold-init-ce03d234ad4d Best regards, --=20 Tudor Ambarus