From patchwork Fri Feb 3 17:33:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 52584 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp969713wrn; Fri, 3 Feb 2023 09:36:57 -0800 (PST) X-Google-Smtp-Source: AK7set8KyAXA9M6oMyL8j+9M47URLq7KCfFU0kf5bxNhqgOjSI8xzZk4s2IGuTBmztQzKSEDuDRT X-Received: by 2002:a05:6a21:3942:b0:be:ea27:3c16 with SMTP id ac2-20020a056a21394200b000beea273c16mr11583031pzc.35.1675445817660; Fri, 03 Feb 2023 09:36:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675445817; cv=none; d=google.com; s=arc-20160816; b=KpncLx4X9LOTTEZYJSznTi6nX0wsne7Uw7ho2Bjejqu6ITHhsRXVEsQ+vaqWmjPoMY IEOp9eLFhm7HHf2QFUO0L4RH0bKNe5zWLzOkYR5RgsSGS92PKpJ8ltKwtBYckjGV/EMj ExDtCOXbpDnOHTcKYzZv2GnIvUtKUAowtX9w7HOjnXOj5OzskBUkEPhfW11gNOLr5ISG l0qMaex7ifgOMWYhxznOaX52V0+l+NX5kQrp5z+Bi7nkMo3huMEr4wm55fyk2Y7ILGs9 fiSGB6Tm3v8a28ZQBz/Fq5FREtN5G5eiXDch9RpZmIcnpkDUspiDLI4Bn5TqL5zcWgXg L8NA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=n5nHHSh5TfhObVB27BdAlj0+jr/HbFgiMaA9A4Ts7wk=; b=B6Uox1dFzFlX42gaM6ChdS0dFbIPmhKf+Ua1Sg7JM9EcpecY5WLY/27fcVVgJQhfm4 p8Un8uXZ/8ZQdq6jIp/R9dVrkH8g5kam4NdeSRgF+t2ld738mBczSqijMO5eihtIX+Jz oYG1Mo/7TTCzUdnWniyI3mC2euzY28p5m55cCkN18CI00xOhPFcSO03RJAld99uN3CSg B0agGkRnvYze7+KnGPjN+mxxGHIEQBTBHb7DGB94z/Xbos4KypgzYQ7IbUpyyDASWBfw kIny9wz+mWa9nKQo76+3mrOt72iJHeZmeObPh7mjeTXvxuJlI+M0yJe7NQYr12ApgjCo zueA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=woZ+KOPP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r9-20020a63b109000000b004c86424dc69si3029263pgf.876.2023.02.03.09.36.44; Fri, 03 Feb 2023 09:36:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=woZ+KOPP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233777AbjBCReW (ORCPT + 99 others); Fri, 3 Feb 2023 12:34:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39676 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233362AbjBCRd7 (ORCPT ); Fri, 3 Feb 2023 12:33:59 -0500 Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E9B7EA2A7F for ; Fri, 3 Feb 2023 09:33:57 -0800 (PST) Received: by mail-wm1-x32f.google.com with SMTP id q10-20020a1cf30a000000b003db0edfdb74so5909543wmq.1 for ; Fri, 03 Feb 2023 09:33:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=n5nHHSh5TfhObVB27BdAlj0+jr/HbFgiMaA9A4Ts7wk=; b=woZ+KOPPRvuO4deKvfXWa7zhtaLVQWO5ATsvUf7wxj9cB3oCEOS6Y6K6ah2x9jepdA qpLNa35s8wIuA1S9XvXx04R1O1IzpRNF+u+r2keduAfcCF6HX+1+IlpmjSgj6ewCzA+B 4XxyYtdpZx3geySdx1BzE53jCY7KAVsHL9Hb66OCeDjnhHxutTZz/feVkmWZp8DSM44E 6pKC0axYJJcwE5FLkAgEl1+KK2DskUOYq1UrzvzymvwXRrlsHCAm63KtiW0pfBSck/Dq sUDFYUBxnQEx9G05J7csNae1o9MS+3Covr3I6OYA6mEFxj5j3+BTwf3A3TYycZksUeVm 1vEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=n5nHHSh5TfhObVB27BdAlj0+jr/HbFgiMaA9A4Ts7wk=; b=GDBuZrg4/rW36i1/23qr3MHq/RSg7jRkNur6T11tijIynJIcR+KFsAWLPIGx9dw+ws saHJdFoAT/JJj+ONgfmGyThz5eYLUTLkB6EOvvTvyTFkMUuEoZvtEGU89vxKUH5QT0S7 W7dOAOMmKfOfT1Pzfm4smbfrTCRunNRGjnHyj2RHYH+0aFLASAcW8dCQZsRjchKKTprL loBok8ot77rwVYLvm6mbNWQdk5e/QndKG9eHqG+woCaEqsWzY7reLdJ+z04INhd+qrWN eanrUxRGm2HSF4XVgTF0sNVdEWcGdG294xXcMVMlwy/8U8ANYUq29WUIvIs2Li0rlF11 vhlw== X-Gm-Message-State: AO0yUKUQG57bnrzZwpFVZB9P3dwVEIeq0nOJVp5juBGduNVoMEy9xEJY fZYKPVbpkeGAFj0m+50nKYD/Dw== X-Received: by 2002:a1c:f603:0:b0:3df:dea7:8ec with SMTP id w3-20020a1cf603000000b003dfdea708ecmr6280583wmc.20.1675445636284; Fri, 03 Feb 2023 09:33:56 -0800 (PST) Received: from mai.. (146725694.box.freepro.com. [130.180.211.218]) by smtp.gmail.com with ESMTPSA id z4-20020a05600c0a0400b003dfdeb57027sm5876356wmp.38.2023.02.03.09.33.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Feb 2023 09:33:56 -0800 (PST) From: Daniel Lezcano To: rjw@rjwysocki.net Cc: linux-acpi@vger.kernel.org, linux-pm@vger.kernel.org, "Rafael J. Wysocki" , Zhang Rui , Len Brown , linux-kernel@vger.kernel.org (open list) Subject: [PATCH v1 08/11] thermal/acpi: Remove active and enabled flags Date: Fri, 3 Feb 2023 18:33:28 +0100 Message-Id: <20230203173331.3322089-9-daniel.lezcano@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230203173331.3322089-1-daniel.lezcano@linaro.org> References: <20230203173331.3322089-1-daniel.lezcano@linaro.org> MIME-Version: 1.0 X-Spam-Status: No, score=1.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: * X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1756832273479818937?= X-GMAIL-MSGID: =?utf-8?q?1756832273479818937?= The 'active' field in the struct acpi_thermal_state is never used. The 'enabled' field of the structure acpi_thermal_state_flags is assigned but never used. Remove them. Signed-off-by: Daniel Lezcano --- drivers/acpi/thermal.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c index c7c2b3d63e90..316a16ac1a09 100644 --- a/drivers/acpi/thermal.c +++ b/drivers/acpi/thermal.c @@ -117,14 +117,12 @@ struct acpi_thermal_state { u8 critical:1; u8 hot:1; u8 passive:1; - u8 active:1; u8 reserved:4; int active_index; }; struct acpi_thermal_state_flags { u8 valid:1; - u8 enabled:1; u8 reserved:6; }; @@ -1138,17 +1136,14 @@ static int acpi_thermal_resume(struct device *dev) for (i = ACPI_THERMAL_TRIP_ACTIVE; i < ACPI_THERMAL_MAX_ACTIVE; i++) { if (!tz->trips[i].flags.valid) break; - tz->trips[i].flags.enabled = 1; + for (j = 0; j < tz->trips[i].devices.count; j++) { result = acpi_bus_update_power( tz->trips[i].devices.handles[j], &power_state); - if (result || (power_state != ACPI_STATE_D0)) { - tz->trips[i].flags.enabled = 0; + if (result || (power_state != ACPI_STATE_D0)) break; - } } - tz->state.active |= tz->trips[i].flags.enabled; } acpi_queue_thermal_check(tz);