Received: by 2002:ab2:7903:0:b0:1fb:b500:807b with SMTP id a3csp1193407lqj; Mon, 3 Jun 2024 13:07:50 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXwsQCWR5VmwMP3K5iZOBYidRY3E9Esv4cYVNMXz+khOLeWfzkoJee13QjbIR4tnac+EGgqMwtnouUxBei0OS15BwED5U0kQFvixkfq8Q== X-Google-Smtp-Source: AGHT+IFZ0SHi+ru5UhLi73QwWij2qFbj3e5ZjWbQUWsItHUbQkY7GgcYPnKrgjMTAJcJB8lAjNRK X-Received: by 2002:a17:90b:50c6:b0:2b1:e314:a5e6 with SMTP id 98e67ed59e1d1-2c1dc56c32amr9381796a91.7.1717445270593; Mon, 03 Jun 2024 13:07:50 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717445270; cv=pass; d=google.com; s=arc-20160816; b=I80iNTwbZN2iG1zqwYaMdp1GME/r1pEB/vMY7x6Ws+bCYlc2smqt8/uqKwa5S2h2y4 o9Ff/C/R6l+KsQW6KbdJOlvRv8PlJ0fRzXAxilDxJoasYdBD0+wphXwPNcrWGFefA6Tr MHOlTPcA7Cbkasb0wz0F7FAKdVWwlvVJtwWB5XLfmpnQx4oXGFM+/Lg3GCOzFKbxaqqA L1ngG1tJ4AGJ9OeCJJzvXsPgyHf82mkG4PjtkeX8TdImuJS2j4JmaBzZNh53CmVcY6qw dQB4MWZooC7HihMD2E7Zav0ko2vimsyOo8+qExOXkpp6MP7nhwfM9yw5+2bhTsnsfldi Zyeg== 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 :subject:cc:to:from:date:dkim-signature; bh=iye3A+BoyGUc9Uw7vyvm+hT3qtqd4TcsH30xgz5UTiE=; fh=vb/QAPsHH8oZQ/fqBhcRHhOxRpa/ImcaUCez+QI6+II=; b=bz3e6Bqlq6/4mzZClzn9lCRdPL2NKudVSDHGvoLXqYq3khDP8DRzQ2B13Pj5qj8xYd DiZa9R1tO9Qr9tQCOKDa10OBcdpKJpqf+8RXLdqKE2b9l6hguvBE4TEQo97F1jFA4+YR 8ElticsTiPxRc8WvkQnGOlRZcINgCwvknZbbyZ7gqY12VWdcgRRQXAH5y+DRxAt4XTbL 71cCyBIGCRlRWq29oecUOtqWOO3EmMgPUH+AbWSafGg0d2kgJjLVT1iFKVDLTpwvkGeR Ilogb3ZBWvL1oPZRiZSyI4z/qzncgFGADGRens/NNsvj1/Xev2n7mNnwm1IYx2UMQXev y0sw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Q8A992Fi; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-199649-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-199649-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id 98e67ed59e1d1-2c1fd0cbbdesi5146916a91.140.2024.06.03.13.07.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Jun 2024 13:07:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-199649-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Q8A992Fi; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-199649-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-199649-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 28B0AB25FE2 for ; Mon, 3 Jun 2024 19:34:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9159E13A24E; Mon, 3 Jun 2024 19:34:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Q8A992Fi" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 B3223374EA; Mon, 3 Jun 2024 19:33:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717443239; cv=none; b=pSjh/hdWS2TOvDl/z34txmmxRU6sAzWR8i/pHOfC+E4qHcb0OwIHS0/BEfAa62Tr3NTXoJsFV49tYocYPTyAM5YBIvZDK+DEvUruY99NXbR3yVKoJNo8lIVDIP5AvUJDddEKb6sqQlDa4qaixYZJwHUkTpuHtAbB5xF9NLo4gso= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717443239; c=relaxed/simple; bh=haGlENCzcFeEXC5BXPb/UFco0FCHDxQhg1Se5YhH8qE=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=R3/1MJ0EK0K9QN8/jl/KAvzx3QKh5z2/4AQH3iNjVRZP9XnavBLCerJnF4FF2XJIhmeXAgCSGfYhUZ2sj6q2yoxshtIOUHYPBm9kMdAQNxmo89drB3xi+IFVyfFQbg0crBiE+3Mt/mVWTu/nGvXIjAuH5aVu/AtSuhQnxcodzh4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Q8A992Fi; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 84DC7C2BD10; Mon, 3 Jun 2024 19:33:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1717443239; bh=haGlENCzcFeEXC5BXPb/UFco0FCHDxQhg1Se5YhH8qE=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Q8A992FibBYI/zwb/sU6+7SmTf3NUsSL0fhlEw+0WRb73i5bNOzn8ay2tT/zzHAa1 ngW4j2IEQW1b0bo5ZtE27BQtILZ8F9TkgANV8GS+YIrlH9yukecLDsoIntYk/7Wvc4 BeGYdi1mManqWYbuazFX0Ga1kHBnWCHvRcSbqI8nlGiJ/Opsl1+AIPZNqdpcb5QCzO SDPBXHt5sWkAYvYqtQV1nplQ0DDbmbouIh4h/PJfKpHOGzlCtiHCzuRl+C7TmLCsQb ouTw/G2BY6/xuQyD6tO+gXJaKUHJn5DN1dAIL/7dgDBdgZ5o1RlrbbUo3LV68sAmqO v1i8moNnZW9pQ== Date: Mon, 3 Jun 2024 20:33:47 +0100 From: Jonathan Cameron To: Johan Hovold Cc: Johan Hovold , Lars-Peter Clausen , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, Nuno Sa Subject: Re: [PATCH] iio: inkern: fix channel read regression Message-ID: <20240603203347.46500fb4@jic23-huawei> In-Reply-To: References: <20240530074416.13697-1-johan+linaro@kernel.org> <20240601142147.3ac40207@jic23-huawei> X-Mailer: Claws Mail 4.2.0 (GTK 3.24.42; x86_64-pc-linux-gnu) 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=US-ASCII Content-Transfer-Encoding: 7bit On Mon, 3 Jun 2024 09:24:38 +0200 Johan Hovold wrote: > Hi Jonathan, > > On Sat, Jun 01, 2024 at 02:21:47PM +0100, Jonathan Cameron wrote: > > On Thu, 30 May 2024 09:44:16 +0200 > > Johan Hovold wrote: > > > > > A recent "cleanup" broke IIO channel read outs and thereby thermal > > > mitigation on the Lenovo ThinkPad X13s by returning zero instead of the > > > expected IIO value type in iio_read_channel_processed_scale(): > > > > > > thermal thermal_zone12: failed to read out thermal zone (-22) > > > > > > Fixes: 3092bde731ca ("iio: inkern: move to the cleanup.h magic") > > > Cc: Nuno Sa > > > Signed-off-by: Johan Hovold > > > In meantime, Nuno please take another look at these and see if > > we have additional problem cases like this. Given the patch > > queue I have and a busy few days it will be a while before I > > get to it but I'll try and take a close look soon as well. > > Please consider getting this one into mainline as soon as possible as it > breaks thermal mitigation, which can cause literal skin burns, on all > Qualcomm platforms (and probably other platforms too). I'll queue this fix and we can follow with any others that surface from reviews. Need it to sit in linux-next for a day or two before a pull request though as I've just pushed some other fixes out that needs some build coverage. > > > Longer term, in my view the readability and chance of bugs > > is reduced, but churn always introduces the possibility of > > issues like this in the short term :( > > I just worry about some of the cleanup.h conversion I've seen where > inexperienced developers potentially break tested and reviewed code for > something which is often not very readable and for very little gain. > Fair comment. There have been some 'interesting' patches. On the plus side this one highlighted that our docs are wrong. Applied to the fixes-togreg branch of iio.git Jonathan > Johan