Received: by 2002:ab2:6309:0:b0:1fb:d597:ff75 with SMTP id s9csp1295978lqt; Fri, 7 Jun 2024 14:00:34 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXPeFsDRBCmynWZFXUi0DotsQR9g+DOwxXwVcIHG0/d7uOM0S0/hIcuyVhHVKip38iI1FP3Stx6HiJBUycnIgcbR4dEdX6t9RhtrR/2Jg== X-Google-Smtp-Source: AGHT+IFKTBiAlq8c+Svaq7tnDvbp1ejiGusETONqWWvj0ifi0FzjgcyN2LOEseH02I7/qF2HSCQr X-Received: by 2002:a05:620a:4442:b0:795:1cc3:55d8 with SMTP id af79cd13be357-7953c5c6fb9mr434679085a.77.1717794034363; Fri, 07 Jun 2024 14:00:34 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717794034; cv=pass; d=google.com; s=arc-20160816; b=0IN8e27YXiGay03p5LVcQadgU7a9znZjZNlkmZ92GswiLUOEISAeBnWww/QjIEKbe/ kavHJUnzUNn4X7GoXMEzdOLCChBu9vSsDrUhyrsWUO7OIZRCwISCSZvltsAHXyVo7gLb s003T2TIKCvySD9mt8WcGojAniVp8as36CRF8acnvQVtxvZdpFhnMsRZ8Pnq9h2z4ZC1 WnxwfA44cIH60w7EgGh8BgvgHO4w+LAPYtIOHswQ60zb2URdnTwtAB2JXKfUni3YxwQl 1wN6jGeCtHSJKgVLmK0bD3Zj2GSnbvU9xaGLMAD0VdQK5yna7065oOKj1i5zShpH54Co 1xTg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=QslBPCPaaB+ZOzzWf1yvlb/8i+T4YYI9EZK5xnRWDPQ=; fh=XvzPzabmaoAJp2SHM1GLvhnQdPD0urn35bBG1O7OshI=; b=0WndzZ/y4gyt5M41O+JYHx3zR0dAPvqnjSrtU0QhmIMVyHGEJ53p9oT3JXCZdGVj/0 92a6IAQPB6CwevomogxctN9hcCHnbJIIMiCGtKJl+I5BOB0hQaSMUdpvPTVSMlxEQK/A jz9Ho5mutVGQLU2cNBliV2dT3nizdbV6dPvxLC0tr22dPArUOZnTPivQNyYawI7y0/TK nSv5a5FESY8xxqnv2nT0n1ek1Y5W/XlsarIzm2BITTKQpcs+7PpKQzdYYop+ETaAXm5Z 34OZ+Pmw0iRvun63Hn16bYXxqnLQ87Y501PGNIPi8XPFbE6iB+ezK8aLN+0xTjSONH9H 4ugg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=bfQcR8D3; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-206750-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-206750-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id af79cd13be357-79533337204si303845185a.529.2024.06.07.14.00.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Jun 2024 14:00:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-206750-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=@gmail.com header.s=20230601 header.b=bfQcR8D3; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-206750-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-206750-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com 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 75A6D1C21DCA for ; Fri, 7 Jun 2024 21:00:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AAE8C154449; Fri, 7 Jun 2024 21:00:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="bfQcR8D3" Received: from mail-lf1-f42.google.com (mail-lf1-f42.google.com [209.85.167.42]) (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 4838044C8C; Fri, 7 Jun 2024 21:00:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.42 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717794026; cv=none; b=eczJwMaP7OGThkknEpZznpA9bOLGsuRqJcZitSH2znGsruwIY8jGQ70IECNqqyY5SscjosUVBGvSiXhjZgDCIxEDZb0Hj173WC6p0121iWgyE6dGH8f4xjEgkF1rUQ9lUA9UjraPrlsGObzjiHpDTL7xgUDZ9zYpWbH+6lh1V98= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717794026; c=relaxed/simple; bh=ef3MWoAXTfNUCcOtFjro99oNO2Ai0BPF9p5sAINVR/c=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=pFScaetZjGdB00Cw6+aA8edg5nJK+1Giv2HaHk+bzdmgI2M5kdaZaz6uSJRHL9r/xUVlnIOaOAGdGBY4k6TvFeugGyLlfIhIiZbs6Q7MGzq/5HtGMI+7xQ7Si2oI4r1CBIWx5DAERccQ8YMDs2UBy5m0EM+yIIMbhkpVewacNBY= 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=bfQcR8D3; arc=none smtp.client-ip=209.85.167.42 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 Received: by mail-lf1-f42.google.com with SMTP id 2adb3069b0e04-52c525257feso259251e87.1; Fri, 07 Jun 2024 14:00:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1717794022; x=1718398822; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=QslBPCPaaB+ZOzzWf1yvlb/8i+T4YYI9EZK5xnRWDPQ=; b=bfQcR8D3ZUB38fk1MSkNbmf8dmDofk0eqd9xo37sTKZ9+XbVQwP0I/BnmtoLaO7aZH +dSRvDZWgFvtbHUrJ8NRWxvdTBIZXvcrbaioBa68lemUAdf0qefiXoWhd4suthujAruX VGnrvi/ie4S0gEl+Om3iD8Duu0eGc8DeFhT6WJcuHyQ152jS8eGz1PYyREqFioltKU87 4dVSJaPzTdsGiT3hoTFZV4qBQixkrDtMu8Ot0nUrElCP5fse1u6tKIkJbhDSW1WNYqUS VhYNU4mzBZaewNDKcsSsnfhALvfze40oespa+kfEI50siwowPJtulI9DUg8c+W18iA8k /9FA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717794022; x=1718398822; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=QslBPCPaaB+ZOzzWf1yvlb/8i+T4YYI9EZK5xnRWDPQ=; b=ffAY+pAcuOO3rpr8oeLS1EUWOD9LRmZXQkQx+oQ3z7oRMni20mn8xeXsjBFSmA7+EK H6dbvIUy4R1r+PF8gR8g5om9UAaLVKObNJdZo4SLcGFunN+JExUGQzcTYxFlmQZuDkar nQyDpE/aFrgjRZtWzRnZbWHdicoWn6HlcEzm7SRNfSGtirH9CQM8ukkZqeel3YaNvGqn IHgpCR4eJQhLCMYdMX0jOMfqQLg83x6+1aJGTnXdiyVA83P0wqjOe1UiTPOmNOmREPLf h5RK2NxJjPNqi6/+NKknf5n8lxxX8HF8MRTKIZqBPdTmiyvzUy778xjtLGC4/efK5XWp Uorg== X-Forwarded-Encrypted: i=1; AJvYcCVx6o7SSANxu3KbyecR8mD6KUMlwRf56KoyqeJJ4hP7BeCguOyNHUmAGImTv+aG5TTmcWfDmvrqZcEljuSfJADcR0jtmEwRRGrQv6KJ X-Gm-Message-State: AOJu0YyS2mDwXEEhqWAz14XWwkf6U/Sx0otluRaLdX6uJt4b4sym77iB l9YGJ5nB5krP8igjPGl1D0Wc063ZdNGmUi3P0vwOqt9RSlRei357 X-Received: by 2002:ac2:48a2:0:b0:52b:ce2f:5d11 with SMTP id 2adb3069b0e04-52bce2f5df1mr617884e87.25.1717794022092; Fri, 07 Jun 2024 14:00:22 -0700 (PDT) Received: from [192.168.0.31] (84-115-213-103.cable.dynamic.surfer.at. [84.115.213.103]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6c9717b6e3sm198436766b.13.2024.06.07.14.00.20 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 07 Jun 2024 14:00:21 -0700 (PDT) Message-ID: <0e0d9d44-d7f2-4dc0-9851-06b1f7290976@gmail.com> Date: Fri, 7 Jun 2024 23:00:19 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 0/2] hwmon: use device_for_each_child_node_scoped() To: Antoniu Miclaus , Jean Delvare , Guenter Roeck , Tim Harvey Cc: linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org References: <20240404-hwmon_device_for_each_child_node_scoped-v1-0-53997abde43c@gmail.com> Content-Language: en-US, de-AT From: Javier Carrasco In-Reply-To: <20240404-hwmon_device_for_each_child_node_scoped-v1-0-53997abde43c@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 04/04/2024 13:13, Javier Carrasco wrote: > Switch to the _scoped() version introduced in commit 365130fd47af > ("device property: Introduce device_for_each_child_node_scoped()") > to remove the need for manual calling of fwnode_handle_put() in the > paths where the code exits the loop early. > > There are only two users of the non scoped version in the hwmon > subsystem: > > - ltc2991 > - gsc-hwmon > > All calls of fwnode_handle_put() were in error paths. > > This series is based on the master branch of linux-next (next-20240404) > to profif from the scoped version of device_for_each_child_node(). > > Signed-off-by: Javier Carrasco > --- > Javier Carrasco (2): > hwmon: (ltc2991) use device_for_each_child_node_scoped() > hwmon: (gsc-hwmon) use device_for_each_child_node_scoped() > > drivers/hwmon/gsc-hwmon.c | 7 +------ > drivers/hwmon/ltc2991.c | 11 +++-------- > 2 files changed, 4 insertions(+), 14 deletions(-) > --- > base-commit: 2b3d5988ae2cb5cd945ddbc653f0a71706231fdd > change-id: 20240404-hwmon_device_for_each_child_node_scoped-6e581c1d8a31 > > Best regards, Hi, this patch appears as "superseded" in the patchwork, but I could not find what series actually superseded it. I just noticed that the cleanup in ltc2991.c turns out to be a bug fix as well because there is an error path if "shunt-resistor-micro-ohms" is zero that misses the required fwnode_handle_put(). This is something similar like the recently applied fix for the ltc2992 [1], but in this case the _scoped() macro already exists and is in use in the mainline kernel, and no explicit call to fwnode_handle_put() is required unless the fix is to be ported to old kernels that don't have the device_for_each_child_node_scoped() macro. Link: https://lore.kernel.org/linux-hwmon/20240523-fwnode_for_each_available_child_node_scoped-v2-0-701f3a03f2fb@gmail.com/ [1] Best regards, Javier Carrasco