Received: by 2002:ab2:7903:0:b0:1fb:b500:807b with SMTP id a3csp797239lqj; Mon, 3 Jun 2024 00:24:50 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXbPemv0vwNQE2f66vfugqde6iHY9Jv7GwvGbL6+80+F/cZk58E9V9aHnwk6H1mrtymzqcap9NEFJc3TtI76WX1FUlppqOGLtiSB7h62A== X-Google-Smtp-Source: AGHT+IFXs47Nm01joSenVPh6AK5fbdC0lo8YE+VCbhvpvgMXGqIho2xLw8wcUxAsfBW6JGTs7bnO X-Received: by 2002:a05:620a:1a18:b0:794:bc03:8a36 with SMTP id af79cd13be357-794f5c5e964mr1168092985a.5.1717399490207; Mon, 03 Jun 2024 00:24:50 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717399490; cv=pass; d=google.com; s=arc-20160816; b=LmkGcF+JsR8V2uzbUSwV5AvstKOJJp+vgebBEjRlcnVKTIqe3Z491j17aV9GHP2ICP LjvBB6C9tcfAWiUVWrFiroPEeRpB02C28fVWG0IeVNatW2Em69Lvuwfu7YCGtodptjYB 1j1+MCzFSC4Dzv8mrjL0yLrOZYYk5qMDNjGau25NiNMPizg3auCNXotg5SqsFMY5daY/ lFniiQxuQ/5NjvUAeRKJeir8Y5TEK9eVYkd3ZxscvqQH/zm6etpaFBv3SAzr60z69G7b W5RGr3B6xPzhAjVRFY3Ryu3pEtlRQGIwq5SKHzW9FVCDbQuA/o1sGvcFK2tOkODtEcnE YqPA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=/MumdEp7qFH6eXvlrHCy3t5mtaxxCGiw9mQCmmT4AZI=; fh=gbCFLHqEDNUVtMhhhVIjoRbpLR/KCPkb41Vw5yGHsvE=; b=y4F9SBkRPXlHWLVlXEWauFffQZt7Qea+4harqRbj/pGVwppwF0IznX/RyPbwWz4SdT gvkB6qNI9LD3PWSxwme9L3OwpnYf0pX/PkKqdSe5KLYRhKDmyJ4i54qVkYNgx/g2nkvW wf34tMwEtqt9MoJHotv1+VKsc6nuNQFEpEhEPUf5yh2vDCPbusuApMKuqv8JU+VQhvpx FLhcND59P8jWRoyJ0HJLrkdLedMOxknDArPykGbruIx10wK3C2/WtVCscWgNlFieQsfZ q7WuH/+rJwpJu/M3eB0lQrgKi/fXhlr92kwjFR0c9J6lVWeTyjDktbhOC050h2cBj5+q M7jg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=itJLId7o; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-198708-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-198708-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id af79cd13be357-794f3064dbesi789558085a.376.2024.06.03.00.24.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Jun 2024 00:24:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-198708-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=itJLId7o; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-198708-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-198708-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id E01E51C21B0F for ; Mon, 3 Jun 2024 07:24:49 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 74AB544C94; Mon, 3 Jun 2024 07:24:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="itJLId7o" 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 9B17E3FBB7; Mon, 3 Jun 2024 07:24:42 +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=1717399482; cv=none; b=cABHJVHUsBihwDj3+sguHhECrcN4y/YZZy0vlkPmSfZ8exRkYXR/shhmMPdjhXGl1tQ2OJfUrH+dBPSLPNmjgNl5FI2r0b5Z1NDofltz5C9o0pQ2lgttZItYRRCnI2c5856CnvZIP2pPHgWH/w+TNahnEbIaqGWbPH5kIh5j+eE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717399482; c=relaxed/simple; bh=FOhXogo/ndaJHFsPJGaYQZam1yDI2Ba7KUL/q8kkfOc=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=O4QElxgWW69AWOzRWkNi4r0CmLMS1/BZeaCGeABJW1yW2B5z/z/GYtsOoRbV4xsY0MyaNufznH7lUs3VGGbWrRe0FbWwKG03gJgZjs4xpZeBSTn3o7Iu6YD6VBsjmkwiV9/B9vCtuANEH5ge+WwnkVWevM6PyttjyELYtr9yyac= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=itJLId7o; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 35987C2BD10; Mon, 3 Jun 2024 07:24:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1717399482; bh=FOhXogo/ndaJHFsPJGaYQZam1yDI2Ba7KUL/q8kkfOc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=itJLId7oTsc8I4+W0j/LT+LHNHvYuxLUUaQSBvnt6A0xYWh08CZ25iXwjnz6QWooM snTYbJ9dljJg0mh5EZP3WtA+3PoojrAqU+Iva/teaIpqs/AXQC/ix13TNbXhzUhqsK gX/wBgkM1GqIdYuVLNDHuc/pbC2Oz+mGnL+PrZER11cZgMUdhYx3uTOo+iDfPU+Qg3 0ZF6vy/AosWzFQ+VZFq+DACbnyCKKAhTbDrvkqTZQfP19m18zjyehCdzQQwxvaConQ M2fdeRMBzUpzvhwudD5WAafus8zYbs664XYhG2I/19gQGzloUUFvI+XsnwZrzxZHVv DwB6xutZCt0NA== Received: from johan by xi.lan with local (Exim 4.97.1) (envelope-from ) id 1sE23a-000000004VU-3wdn; Mon, 03 Jun 2024 09:24:39 +0200 Date: Mon, 3 Jun 2024 09:24:38 +0200 From: Johan Hovold To: Jonathan Cameron 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: References: <20240530074416.13697-1-johan+linaro@kernel.org> <20240601142147.3ac40207@jic23-huawei> 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-Disposition: inline In-Reply-To: <20240601142147.3ac40207@jic23-huawei> 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). > 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. Johan