Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp735621rwb; Tue, 4 Oct 2022 09:55:56 -0700 (PDT) X-Google-Smtp-Source: AMsMyM51peB+VLkYVj48ja6ea2Ky889yAuTV0UNiD5OCr9n9sfF5+HZ5hGogZVJbEuSR8y/Oh7bU X-Received: by 2002:a65:6c08:0:b0:448:c216:fe9 with SMTP id y8-20020a656c08000000b00448c2160fe9mr13833507pgu.243.1664902556666; Tue, 04 Oct 2022 09:55:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664902556; cv=none; d=google.com; s=arc-20160816; b=VllTHxd7eWoRTT4g0L5KIAxj0ZFR2jL6M9prrJ7Mc9VY1lnpkMMt26O4l1F6R2pam7 q9Kar6SU0M7QvG/+wKHaZKi50YohH6OCY8+ulSGlYuUx1Wyxy3rEN9mJgIIeGH4kOVSt iNAL7fsxG3BHEP7xboJZYNMe36L46XHlMlxFW3JV4Z3Bm024SrIpAruhyAjDb49B+nMh bRpvFKrwqjmoCXku6xCPKkAKc/GMJfQwQyJvsartOvQyVRUHDJm84DKn3iFITWLHmk0u v9sy+4QK8siJrRh6vKr0sqqXhzx5g+Q4LPi7bfdzgzYqSvYLore4EHJYZLZo7xclVMpW YDdA== 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; bh=Qei4jyCN8ahNAMqBliKuZuNC4nNiOEBoSeyebUcOq20=; b=cQvXJcExBBU1/Yg2vVdIwGGHA3RzIIQh+3AsvNRleuC3CUMZm6W1n/FPv4IURp3kzn CKtk5J+O23A04oV2w4Yk//7TqZkHyjHvVBVsHm3IG6C6E17h5EPhn8GrmRzWdpyhra5G T6vaEBl81KkDVZ4l7FMulNiuGZGUededvNUGr1WATLLRnCpWm90ut4nV4Z5SCoATfzTP nNydQXwrNPcnuk6NuShELiPclFhy70aTZ171OAaBUH9qQ5W77VvTuXtGVQ7dTVuiOUUn fFjI4WczRY/H+t+zX1Tfdf+FVa4kMsy9LMpm4s5C7XygHc4qyJK86ff0v0n6DzEQKTlX hhRA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 1-20020a630d41000000b0043c22e9127bsi14511367pgn.831.2022.10.04.09.55.44; Tue, 04 Oct 2022 09:55:56 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230152AbiJDQdO (ORCPT + 99 others); Tue, 4 Oct 2022 12:33:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51132 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230139AbiJDQdJ (ORCPT ); Tue, 4 Oct 2022 12:33:09 -0400 Received: from cloudserver094114.home.pl (cloudserver094114.home.pl [79.96.170.134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 512E25E65F; Tue, 4 Oct 2022 09:33:08 -0700 (PDT) Received: from localhost (127.0.0.1) (HELO v370.home.net.pl) by /usr/run/smtp (/usr/run/postfix/private/idea_relay_lmtp) via UNIX with SMTP (IdeaSmtpServer 5.0.0) id e0dca31dcbf500c5; Tue, 4 Oct 2022 18:33:06 +0200 Received: from kreacher.localnet (unknown [213.134.189.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by v370.home.net.pl (Postfix) with ESMTPSA id 139566665FB; Tue, 4 Oct 2022 18:33:06 +0200 (CEST) From: "Rafael J. Wysocki" To: Linux ACPI Cc: Srinivas Pandruvada , Zhang Rui , Linux PM , LKML Subject: [PATCH v1 2/3] ACPI: thermal: Drop redundant parens from expressions Date: Tue, 04 Oct 2022 18:32:08 +0200 Message-ID: <2256715.ElGaqSPkdT@kreacher> In-Reply-To: <12068304.O9o76ZdvQC@kreacher> References: <12068304.O9o76ZdvQC@kreacher> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="UTF-8" X-CLIENT-IP: 213.134.189.18 X-CLIENT-HOSTNAME: 213.134.189.18 X-VADE-SPAMSTATE: clean X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvfedrfeeiuddguddtfecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfjqffogffrnfdpggftiffpkfenuceurghilhhouhhtmecuudehtdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvvefufffkjghfggfgtgesthfuredttddtjeenucfhrhhomhepfdftrghfrggvlhculfdrucghhihsohgtkhhifdcuoehrjhifsehrjhifhihsohgtkhhirdhnvghtqeenucggtffrrghtthgvrhhnpedvffeuiedtgfdvtddugeeujedtffetteegfeekffdvfedttddtuefhgeefvdejhfenucfkphepvddufedrudefgedrudekledrudeknecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepvddufedrudefgedrudekledrudekpdhhvghlohepkhhrvggrtghhvghrrdhlohgtrghlnhgvthdpmhgrihhlfhhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqpdhnsggprhgtphhtthhopeehpdhrtghpthhtoheplhhinhhugidqrggtphhisehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtohepshhrihhnihhvrghsrdhprghnughruhhvrggurgeslhhinhhugidrihhnthgvlhdrtghomhdprhgtphhtthhopehruhhirdiihhgrnhhgsehinhhtvghlrdgtohhmpdhrtghpthhtoheplhhinhhugidqphhmsehvghgvrhdrkhgvrhhnvghlrdhorhhg pdhrtghpthhtoheplhhinhhugidqkhgvrhhnvghlsehvghgvrhdrkhgvrhhnvghlrdhorhhg X-DCC--Metrics: v370.home.net.pl 1024; Body=5 Fuz1=5 Fuz2=5 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 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 From: Rafael J. Wysocki Some expressions in the ACPI thermal driver contain redundant parentheses. Drop them. No functional impact. Signed-off-by: Rafael J. Wysocki --- drivers/acpi/thermal.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) Index: linux-pm/drivers/acpi/thermal.c =================================================================== --- linux-pm.orig/drivers/acpi/thermal.c +++ linux-pm/drivers/acpi/thermal.c @@ -326,7 +326,7 @@ static int acpi_thermal_trips_update(str /* Passive (optional) */ if (((flag & ACPI_TRIPS_PASSIVE) && tz->trips.passive.flags.valid) || - (flag == ACPI_TRIPS_INIT)) { + flag == ACPI_TRIPS_INIT) { valid = tz->trips.passive.flags.valid; if (psv == -1) { status = AE_SUPPORT; @@ -399,7 +399,7 @@ static int acpi_thermal_trips_update(str if (act == -1) break; /* disable all active trip points */ - if ((flag == ACPI_TRIPS_INIT) || ((flag & ACPI_TRIPS_ACTIVE) && + if (flag == ACPI_TRIPS_INIT || ((flag & ACPI_TRIPS_ACTIVE) && tz->trips.active[i].flags.valid)) { status = acpi_evaluate_integer(tz->device->handle, name, NULL, &tmp); @@ -654,8 +654,8 @@ static int thermal_get_trend(struct ther * tz->temperature has already been updated by generic thermal layer, * before this callback being invoked */ - i = (tz->trips.passive.tc1 * (tz->temperature - tz->last_temperature)) + - (tz->trips.passive.tc2 * (tz->temperature - tz->trips.passive.temperature)); + i = tz->trips.passive.tc1 * (tz->temperature - tz->last_temperature) + + tz->trips.passive.tc2 * (tz->temperature - tz->trips.passive.temperature); if (i > 0) *trend = THERMAL_TREND_RAISING;