From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) (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 14D673403FD for ; Wed, 20 May 2026 15:55:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.53 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779292554; cv=none; b=mJPWTSg2AwPfFUPPYRG31+qvds/1dbx+et+hY2hrmNqbTqgcd6OTHGnx7ivcw4szFX3v1u/h79zBYb5RPO1mlHeKlHP8EZKRfgiNQy0HcLk6K6XZKh1K21sWzCqqGt54Qy8pHfIIpVRz33My4i9IU9PazveHtsRtkX7NrcZiQR0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779292554; c=relaxed/simple; bh=xObQCOiN0w+zUIIotJQUzrX+GI6lzkrYiMyhdIqPchs=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=ad2V51yj81e400wjeqiyDenHhhim1EEqH1U0TRdpS3B8Pa45nir2BfUUHHeKrjKIzvmxTnnG4NYZyXtCY7lDmUYue4w2dv2l75O8VnazK0hoTQky0dsdhenMN7vLt06Pch0jBb/RJ6yncdeN1agUPzYTnCK8UmTucZLHeGlJhio= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=j/ry8pf9; arc=none smtp.client-ip=209.85.128.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="j/ry8pf9" Received: by mail-wm1-f53.google.com with SMTP id 5b1f17b1804b1-48d146705b4so56077685e9.3 for ; Wed, 20 May 2026 08:55:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1779292549; x=1779897349; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=GV5z0VH3S60eKaBNh37Ayp3vpCM7R2YdmjwXSt3Qs84=; b=j/ry8pf9D2wyaWwdx5UUKrTNiuH/vuTTnRGIYiSAhv+cfgsZoCfkvDFVixh+bMNwtG 2iAvEtPLgWoedHXJ/h1YMlWWtLGGjrctel3HjRX++4V82F3qprmKxER5W5Xtl5E1P+Kl cPKGW7QG6hIJqaZdN6WtrgPKUn4FYdprfPObH/flFxsP8ltM6ta444+OKZMjj7m8bDJk IwIJD23EdjDdpiZlSOxRQrZJkhkRU85FFNMnin92imZprpXbs11QWhDsODe+7wI05LRY R7je0B0t6X+WnBEVsHw9gGIYlBH3sMbBB5gWeuBMpJCZJy648SeVYn/+GGiK2mXn5Obv SXZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779292549; x=1779897349; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=GV5z0VH3S60eKaBNh37Ayp3vpCM7R2YdmjwXSt3Qs84=; b=K6bSbZKJO1QIo7TS+9oi0wnoVrte6N43JcQBb15gTi1jSFUoJ14/Y0r+ZpehuThiNS EPkF/Wv39Jo+nzzfHzTY8WCo5rXLnp6+C3S0iDWN7IQZjVq4QBvU2nbCSdYRPhb9IZXJ 2wfHxCH8ZIImgG4Iy8EPMnqS5Ue4T/jauz9QB8OdF+dHWT1d3csr/IVAQ594wSz50wzq GFlCxpfF7hKKtgaf2p56A70z9kUa5NK/m2nKBTAEi2DHHDfu461CzEP/1tm9iNDJSkDH myj1qnDWhH++rPlVv13bIz3ollh0HnRx6eyfPVRZPDINrYBY7QsUqs1AIhHONguhEfh5 CncQ== X-Forwarded-Encrypted: i=1; AFNElJ+b2wRdwYM4bm9BPI4HhsV/HwFuwoUBMGe77ahQrFucJWyQeVHniTN0WyZq4DB6UwdPFTf6KTuR5aW6U+o=@vger.kernel.org X-Gm-Message-State: AOJu0Yy9JPzDh4WEhuWrwUrl9JiK+JFUBOLBvIj6JmrAWOXXJALo9ZTp WyC/x51ov20WAhDVAxKkRHsjukzTDZhosBDP966Bug1wvQ5G3UDSL93X X-Gm-Gg: Acq92OEXgqAs3ttyoroGSBhrnuAnvLQAjNZNumfK9sRaJNKoepLimPfjNbgLozNI26Y BbMd3Wypxcp4ynAO8ULhFglPqSRPQk4AQCErikl1yiRVJvZ4G1phChw9lmkfhxE362H9IV0atmg tQHpfQH4fe8VJF1Q3CiH4ryvYfpqZRhfXIQrAHMfxMRSJ6UGK/lXndigVAkSApBH6ncbDUnv1Gd et+Q/YKJipdASlSYtkBH51aMrItO/5XuVpJnz7KL8bDbaxik4fZBEDbO/jTkuvjF6vgB5L2qwQ1 RnwPt0VMBT5bW001+DntmyKH3w/CsNYodFU3Py+VXwSnlEQVNOSVJs8pE4Ae1Dj1fVS2qD7Rp+l B8UxRqA5bOzMVbM8uk0lbXbNzPSQ5nQ12yNkhonghsK7RWz2x/Pbbr4sSMCy6PELX6vb25Lf1N+ I4IY91Ow1140MKg6bPY7jmNND5dvGfVvcnErnwdO116B+32bTAteN7z+FH8pm3Lnk= X-Received: by 2002:a05:600c:3b21:b0:48a:f18:ece4 with SMTP id 5b1f17b1804b1-48fe6514dd6mr361015365e9.24.1779292549009; Wed, 20 May 2026 08:55:49 -0700 (PDT) Received: from Ansuel-XPS24 (host-79-22-5-99.retail.telecomitalia.it. [79.22.5.99]) by smtp.googlemail.com with ESMTPSA id 5b1f17b1804b1-48fed253f93sm132123215e9.16.2026.05.20.08.55.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 May 2026 08:55:48 -0700 (PDT) From: Christian Marangi To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , "Rafael J. Wysocki" , Daniel Lezcano , Zhang Rui , Lukasz Luba , Christian Marangi , Lorenzo Bianconi , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org Subject: [PATCH v5 1/7] thermal/drivers: airoha: fix copy paste error on clamp_t low temp Date: Wed, 20 May 2026 17:55:14 +0200 Message-ID: <20260520155525.22239-2-ansuelsmth@gmail.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260520155525.22239-1-ansuelsmth@gmail.com> References: <20260520155525.22239-1-ansuelsmth@gmail.com> 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: 8bit In airoha_thermal_set_trips, there is a copy paste error on clamping the value for the low trip temp point. Fix it to the correct value and actually clamp for the low variable. Fixes: 42de37f40e1b ("thermal/drivers: Add support for Airoha EN7581 thermal sensor") Signed-off-by: Christian Marangi --- drivers/thermal/airoha_thermal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/thermal/airoha_thermal.c b/drivers/thermal/airoha_thermal.c index b9fd6bfc88e5..439aa011b75c 100644 --- a/drivers/thermal/airoha_thermal.c +++ b/drivers/thermal/airoha_thermal.c @@ -273,7 +273,7 @@ static int airoha_thermal_set_trips(struct thermal_zone_device *tz, int low, if (low != -INT_MAX) { /* Validate low and clamp it to a supported value */ - low = clamp_t(int, high, RAW_TO_TEMP(priv, 0), + low = clamp_t(int, low, RAW_TO_TEMP(priv, 0), RAW_TO_TEMP(priv, FIELD_MAX(EN7581_DOUT_TADC_MASK))); /* We offset the low temp of 1°C to trigger correct event */ -- 2.53.0