Received: by 2002:ab2:2441:0:b0:1f3:1f8c:d0c6 with SMTP id k1csp196454lqe; Thu, 4 Apr 2024 04:13:57 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUyAJiC73PA3PFutLJWKE9Zj2bfLhMEKig8x2wsfirB9B7JQEIYUiSs9QEFdd+5isEoYwGI/fUSQDr6jwmEEc0Q1YIWVjrgvx6gSFdjTw== X-Google-Smtp-Source: AGHT+IHRr83v+eSXaYOJFsuI7AjqE5h1oyI4sUnYwHssXAO12X7PKjv9c3Q0mpByIR5uTr2HF8Bz X-Received: by 2002:a17:906:ae91:b0:a51:9061:2bd5 with SMTP id md17-20020a170906ae9100b00a5190612bd5mr579780ejb.24.1712229237584; Thu, 04 Apr 2024 04:13:57 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712229237; cv=pass; d=google.com; s=arc-20160816; b=EzwvKdlab4aGECtDyikUe4BBgl/ykQG/fnLAFCoUvLyUVQVNLT6FICTgulabazVz+n 5sHfmQa9MZjqOTPMezatLfcSilz3jh/37tIINKwVK3b2nAAnfYT55yMFTLhxyQ1T7xdI GHg5kLhzfBmvPQRyhFimWvz0WM7gCUXbqR8Em1DPKlxBftAOcybMfnLbuBG425QaCFPS oBnlWyfgtRKDyz3jK0jb+HcMli2WlRrBnNAih8XxQslcuwcirFE6dAcpjRBsDqZjWQqR 1PqL1WVinlO6BMUWMbj3Chzojz6FrD8sI4s1nNSu9HRjFbT+MIAaLO4Nwu82fawZ2TWP qfcA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:from :dkim-signature; bh=zCsn4lzXWs4WfV1FaDxO83EPbiXy0Y7pqCwVUGDrT6g=; fh=mNXPZHmt1JIBiqQ+KCXGQ/zeC15qQ0+zShE+v9PCWPA=; b=ggcBC18Qp4YfsCX9w7GIq06x2SDq/GE7A1Yr/2ZH3BjxIVwIsns+N0vWsS9exdJ1bG WLwJ3MX8+7NNl+IPBw5xERb7c2fz5YhTZTisPS+tQikO2ta63zDFxelA6UyEAWHPJiD9 gHYWv5wbhuUvDIHMbbJWz6lujWsZbysrCHhmfgtznm/5+beLTU/S+yoru+RaWCqoanyI RJkHtAVl+toZzFSdomQ6JdYwRhYhjwscGdNtdJ+HMRyp8sInBTltA9vItcSMbRoMSiOq tXjgTBr7XnH0mgv+YCsHbsqrgylMmQwRHi7N/59CJ+LiqSalEvtQSvhHbdzCRqsccTBL rmqw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=jkG6uGwM; 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-131294-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-131294-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id oz12-20020a1709077d8c00b00a4e98614b44si2102037ejc.958.2024.04.04.04.13.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Apr 2024 04:13:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-131294-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=jkG6uGwM; 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-131294-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-131294-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 5013D1F277D3 for ; Thu, 4 Apr 2024 11:13:57 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6679281ADB; Thu, 4 Apr 2024 11:13:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="jkG6uGwM" Received: from mail-ej1-f44.google.com (mail-ej1-f44.google.com [209.85.218.44]) (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 0942A811E0; Thu, 4 Apr 2024 11:13:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.44 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712229229; cv=none; b=XNYhJm/8ANrqK139GjQbthCWLli2ds5yt7czyydd3n0N09V1sYKbhSxzqdzeItg8NGHvtGWFvWqoeCgyPJM+JDT6lo5Haj2xNaqF2ZemAa/UJVdrkS+32bC/lCGH4IVKd3AcSEHgv54x0UyS6aPJ9lBteIcpoSuLsuepOhe2xzw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712229229; c=relaxed/simple; bh=G/hhAJMF+CbYhDeRpV0Tleivjbkh5uITYHeK9CExz8k=; h=From:Subject:Date:Message-Id:MIME-Version:Content-Type:To:Cc; b=AiFV1HFeHOdrIUx2GzALZdDdjpfpDijRu0xlTHOtX/0GIS/6/4Fx2mgtKAhPKsQl2ezNBrbeGMa9nKhrccV/2sNTnsioTCEiXCxRtshQTkoaXvhlll1vHy0nM+jk7XeAtCS2hI0UFbYbFjpbhse7Q4N/dH7AppkvdtkmtqOv5nU= 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=jkG6uGwM; arc=none smtp.client-ip=209.85.218.44 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-ej1-f44.google.com with SMTP id a640c23a62f3a-a4a3a5e47baso115529966b.2; Thu, 04 Apr 2024 04:13:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1712229226; x=1712834026; darn=vger.kernel.org; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:from:to:cc:subject:date:message-id:reply-to; bh=zCsn4lzXWs4WfV1FaDxO83EPbiXy0Y7pqCwVUGDrT6g=; b=jkG6uGwMtNFvGA4EySHDMQPZVqDGaWp+yVuXMVjKeOkmh+/gBcEN8ykQj2fR0RjQUc 0ki9te0m1qtFjQl5Qp1VYMCJt2WEye4h/Hi4/aNarApd3rzcpmNzz/Qv1vzFMnHOCsEC LymiRlxEPdnW+i8oqvwpDMCiY+kgbYjLm+xO7WLs/Yv01f1Vh8fX09cklSONFG8okYFd spmbnazTcKY6CLrY1blUzIOKqETOR5oBkATst4n5CbSNJV7SoCgdH1lJbL8BH5eWXMrP 5NxYBtlOTH0fOcw9PCHOqgN5kCrhdQsEmGuIzJkAeWC4rjvWmTF3yGftcoUu28cpb0Z3 /q4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712229226; x=1712834026; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=zCsn4lzXWs4WfV1FaDxO83EPbiXy0Y7pqCwVUGDrT6g=; b=Z3+2Zn0sBGwNLCaae1tes4kMJF+sjG4DiCT0BdAYCRsmcvnV+z0jSWwCDFqpcEPPCo ajLW8b5x0QIq64UNzPGkoP6dkP++yo/bBdGrCrIeeAfeVWOMGOFH2TGBPHOhfmgQq3XF sA1wKf8Z6kaXAURj65RQ3Mv2xSxDuq68opttsPKwAXysQTpd3j3cUr0mXWiIPl6l5+iA jBa3S1ch9+IIFJyxYbifI5muBNGJu4dyxJkD2VwHcj6cmbBY9AMDTLuiePOiwzk1ZRdU cML5j1B/P3pHOQqyaIMC+vVnSNEsUxPwxpT5wgWjw5RDH80XcE97xG9V0Z2Rjj5XRMEJ a85A== X-Forwarded-Encrypted: i=1; AJvYcCUiQnCDHyzwr/9L/o/E/OBqaNZy0NyvBILpFAxNaTmfXLyvMZ6gMtwwF+gvqO6AcnqERxouOP2vJ48dSkpklOUB9VzdSkiU9Ow0dXwj X-Gm-Message-State: AOJu0YzKgc13Oc9ieMigeXYOsptoKqvYsMynp7HWMgtgE4aUJ4RqyejC E5XLo5NSBiSQ7eUb32wO0Vnre2gAXsoJ0DVpqftBL07s6wO0iNnl X-Received: by 2002:a17:906:4554:b0:a4e:9dd2:45a4 with SMTP id s20-20020a170906455400b00a4e9dd245a4mr1685521ejq.9.1712229226122; Thu, 04 Apr 2024 04:13:46 -0700 (PDT) Received: from [127.0.1.1] (84-115-213-64.cable.dynamic.surfer.at. [84.115.213.64]) by smtp.gmail.com with ESMTPSA id qf4-20020a1709077f0400b00a5195edf8e8sm104659ejc.62.2024.04.04.04.13.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Apr 2024 04:13:45 -0700 (PDT) From: Javier Carrasco Subject: [PATCH 0/2] hwmon: use device_for_each_child_node_scoped() Date: Thu, 04 Apr 2024 13:13:26 +0200 Message-Id: <20240404-hwmon_device_for_each_child_node_scoped-v1-0-53997abde43c@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: 7bit X-B4-Tracking: v=1; b=H4sIAFeLDmYC/x2N2wrCMBAFf6Xss4GmXij+isgSdk/NgiYlARVK/ 91F5mlgOGejjmbodB02anhbt1pc4mEgyak8EEzdaRqn0+iE/HnVwuqpgJfaGEkyS7ancqkK7lJ XaLjgPEeJOqdjJF9bGxb7/p9u933/AXISOJN5AAAA To: Antoniu Miclaus , Jean Delvare , Guenter Roeck , Tim Harvey Cc: linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org, Javier Carrasco X-Mailer: b4 0.14-dev X-Developer-Signature: v=1; a=ed25519-sha256; t=1712229224; l=1123; i=javier.carrasco.cruz@gmail.com; s=20240312; h=from:subject:message-id; bh=G/hhAJMF+CbYhDeRpV0Tleivjbkh5uITYHeK9CExz8k=; b=jjpFMtyQdzpDpa6B57uBezKVWY+wqIgtOVmOcSc1yViDGk8Iw9G/sIZHk0qH+zz7I4SISxiyH L7BvC/Xa4qcAsN4aDvlTvmd1joO1U38RB6I/nlf16ZZPzqdrSnibHEf X-Developer-Key: i=javier.carrasco.cruz@gmail.com; a=ed25519; pk=lzSIvIzMz0JhJrzLXI0HAdPwsNPSSmEn6RbS+PTS9aQ= 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, -- Javier Carrasco