Received: by 2002:ab2:7855:0:b0:1f9:5764:f03e with SMTP id m21csp322401lqp; Wed, 22 May 2024 05:55:50 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUQaLI/GLjdLiZe81JWntbjF8CNt7Qf7ioFHmkeVWq14rxK0naGJ2ExWgBVLskosiO4e33/Dp5EJ41RdRrFPp4Rm8hPpRp36CC73F4NCA== X-Google-Smtp-Source: AGHT+IGNv//jza10uMMEVwUaak+AlZ9ur6p6upS88P2GnbP0haynJrPOeesUH27D2AcxJz4mBF15 X-Received: by 2002:a17:902:f813:b0:1eb:7aeb:54f3 with SMTP id d9443c01a7336-1f31c994a30mr17539715ad.36.1716382548991; Wed, 22 May 2024 05:55:48 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716382548; cv=pass; d=google.com; s=arc-20160816; b=blzFjd4R668O9HKjG9DkmSSKz2wGK7SG5lK/pDu0uY9I0N5hL1Vj4d95EcDGi8/z2S errRFqZUsCuTHAT2GNPfbmpGrGxrWxzoZubXreDnV6mMWUpfLbw20AZ7KlensEeVKFQK tQelYfuDF0NGuUm9O1ch3tTP6nfaumkTyOueDt/0dQEXaKEZXtp72UAhfQ8Z8HKIw+kz Y2HWZY2J885zpzbEZpjP/yE1jU3hWdZUcW9DdoJOr86GpULlN4S8wLo1RSJDcdGaoSDp 6HkzWgUBn2qStn7O+N/OiTMidyHxyLPJ5DqwKIP5EYqhSxTgyVss7Zf6WffGSlprM1tH i4Mw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=organization: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=QAX/Y2MAQYVydG1B/hzYuu5ERniqQiCuUscU+sNln+Y=; fh=Ca+hkUv7OKAgADOE9uOuI2TiXWsg+DFWaNeAQf4Oa9I=; b=e48elXauZy5hKUnojyps1uCXpVwMt2cnaM/HLS3Csdh8iEfTGB8BzW5tPKiNutf+w6 JhOuDiyPJMOBESjmvvESjMK410vd1EA/8E0+5GLvCym56+YjZxyzYbXqYSZiVt4kxtHL GMk2f5cTqPeyCbuJP/vqr1kEF2OvdsJUAhXp5B5Di4Sr43YQpmQJ/KHqiqC4WxVdhvQf /AsoLJxOK6h++k+QqryAxkGk/YkpnNeJ2E9hD6bK4D7pB9RWg940WFqVdM6kxLTisNu1 GyKq1LHWAIXy22PaVHdj8CZfmC4noxo6aptxkvm3WWC5drn6Y2UnpSDs0/XiMwuPnUfV Y5IQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=QEhmjH5f; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-186150-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-186150-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id d9443c01a7336-1f0978ccf70si123554955ad.595.2024.05.22.05.55.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 May 2024 05:55:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-186150-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=QEhmjH5f; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-186150-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-186150-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 09F52282258 for ; Wed, 22 May 2024 11:37:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D545A82891; Wed, 22 May 2024 11:37:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="QEhmjH5f" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.14]) (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 8A5357F7FD; Wed, 22 May 2024 11:37:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.14 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716377864; cv=none; b=N1b5mVhgf7ozRSR72ML6KtxtBkNJU7Gps2rlPAvSIYnrNJQJOpePw23RL159SIx8+7Vy1az4dKdxy941sGOVVt9LhwjOiPXPx2zTZl8GMtW0VJBTOGNs/E6Y0r5M3WpYFYDH9l6VLZYGxok1fqtZW362tGbZpv7ofLI1LgwdYvA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716377864; c=relaxed/simple; bh=ncAhPReHQsINppuuHQJkanT4redij6dVT742FCMChbE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=lfClAPe0CPdmYSBZVACJcGUyh244JGQRAvl3KbR0znPH3Uc4m1cW6uah61evpHsrz/n0MJm8+N9eHX4tp3qR2Cc7Y3GVmqruTf8K9Z7v8oM/B2pMnjp0qbgUE31z/PLV1BMSI9y9IuICvauk4KbLthRY1ViS2FWmDd/bvgQdxC8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=QEhmjH5f; arc=none smtp.client-ip=198.175.65.14 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1716377863; x=1747913863; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=ncAhPReHQsINppuuHQJkanT4redij6dVT742FCMChbE=; b=QEhmjH5fvx6tz/NdjFlLd+xVHBZr5o+3qO6BdBQz9cZ7ZSm2IbsZtZyd 0j/QqQanCJGWvHLx7GiZuEQ50X5zoG39QRxaZSDFjb9L+PiEEkror0H7I Zuk3ZXP473XTqbZwVyH33kId/gMSw9WXeKoRvcvwRbZTgURZXu1DDkxPE WPVg+5HLrDmh7kzyonoDgg65T+L5wNz5QkbjP/UrfA4eczJ2bZFLcIqaM e3oCRXX/m+EUmxfaMK3rZgEesl7cc+sonFT0+gNLN4odW8X5333ykcC2p GURYGs4bexH47qPOXMP/7Lw7zSR6Zw8JTRndDnnfAetV2gcwgxEZGgpgP w==; X-CSE-ConnectionGUID: O0RureqgTnCmiXV+CWQSfg== X-CSE-MsgGUID: HHzPlGtkTuKRS14vD9wuWw== X-IronPort-AV: E=McAfee;i="6600,9927,11079"; a="16450460" X-IronPort-AV: E=Sophos;i="6.08,179,1712646000"; d="scan'208";a="16450460" Received: from fmviesa004.fm.intel.com ([10.60.135.144]) by orvoesa106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 May 2024 04:37:42 -0700 X-CSE-ConnectionGUID: uXLZJLUITt2/WzQ36eXdfA== X-CSE-MsgGUID: O5as8n//Qre+NXSX2RI5UQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,179,1712646000"; d="scan'208";a="37842814" Received: from smile.fi.intel.com ([10.237.72.54]) by fmviesa004.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 May 2024 04:37:38 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.97) (envelope-from ) id 1s9kHn-00000009xQt-44Tc; Wed, 22 May 2024 14:37:35 +0300 Date: Wed, 22 May 2024 14:37:35 +0300 From: Andy Shevchenko To: Javier Carrasco Cc: Greg Kroah-Hartman , "Rafael J. Wysocki" , Daniel Scally , Heikki Krogerus , Sakari Ailus , Jean Delvare , Guenter Roeck , Antoniu Miclaus , Jonathan Cameron , linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-hwmon@vger.kernel.org Subject: Re: [PATCH 2/2] hwmon: (ltc2992) use fwnode_for_each_available_child_node_scoped() Message-ID: References: <20240522-fwnode_for_each_available_child_node_scoped-v1-0-1188b0da12dc@gmail.com> <20240522-fwnode_for_each_available_child_node_scoped-v1-2-1188b0da12dc@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=us-ascii Content-Disposition: inline In-Reply-To: <20240522-fwnode_for_each_available_child_node_scoped-v1-2-1188b0da12dc@gmail.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo On Wed, May 22, 2024 at 11:18:08AM +0200, Javier Carrasco wrote: > The error path from a zero value of the "shunt-resistor-micro-ohms" > property does not decrement the refcount of the child node. > > Instead of adding the missing fwnode_handle_put(), a safer fix for > future modifications is using the _scoped version of the macro, > which removes the need for fwnode_handle_put() in all error paths. Not sure if the fix for easier backporting is better, up to Guenter and Greg. If the above is the case, you will need 1) backportable fix; 2) the patch 1 as of this series; 3) conversion patch. > The macro defines the child node internally, which removes the need for > the current child node declaration as well. FWIW, Reviewed-by: Andy Shevchenko in case it will go the current way. -- With Best Regards, Andy Shevchenko