From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.8]) (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 721EB28DBD; Mon, 19 Feb 2024 11:47:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.8 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708343224; cv=none; b=rQwbdpBmjn2H662N67iIqecfc+TqMIF+6pO1+sfaYsYe/rtA8bdAomUo3NGDH9jUyiB9kfAmdRhdtc5mHem2k3q96/pr0dX5ujDXU/qIzZGcdQ7DrhDkvCoUyUA+ebrhj+dttGNocDasNNSA3mAhT3XyFOT80ndtD7w4vlSUrtY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708343224; c=relaxed/simple; bh=wyM173WXobkqcMdBuV/vTYBDtXpq/fDb2dNUkfTTQdE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=SzdbTM3Y3wnSzOhxrmiDvL/UmGDAcvUPYtH+/L/0RbDTyRPgdmlQ63wnl2xz0AkE2fiZ8VKLzIuqzbe7btfuO2z2hEqG+Ij4UYtZ1+KU5Um5bmnPjvmLWlAEv7uGUTZjb+738hrbnxwugXcgQCuWDaDl05F/KfyvOcy+beVaUMw= 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=QypcSBS3; arc=none smtp.client-ip=192.198.163.8 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="QypcSBS3" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1708343223; x=1739879223; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=wyM173WXobkqcMdBuV/vTYBDtXpq/fDb2dNUkfTTQdE=; b=QypcSBS3ZppD+3OhbIvXx99WRauTdMW1Yk5aTif4U+YA/HCEXx+d9gus zMvwSOw0BXBXt4q91L6gW4aHms2sHfbim8J2trf6xGF98pOpSWooepwUF uRkyWO2Bsay/nNtdjBrO3XwrbzHxa1FxtQ9vHga7ulaF0eUpvwIYq4zQx +nzX0xpzgKeT+WOItWjcmocPNmLrkPu4vlVboEYxhmcJH2QdnTBvbp0+J ELWQ7UACXeTDm+EowX1/3vtRVl15IR5VO7afpdgLbPghwCPhMDeYzENh5 TjTFHu5N0/eItpvIkUZdq5/hTJjbGZaAkTxwDhy/gCf+rQeK9d0303kZf A==; X-IronPort-AV: E=McAfee;i="6600,9927,10988"; a="19949732" X-IronPort-AV: E=Sophos;i="6.06,170,1705392000"; d="scan'208";a="19949732" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmvoesa102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Feb 2024 03:47:01 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10988"; a="912861667" X-IronPort-AV: E=Sophos;i="6.06,170,1705392000"; d="scan'208";a="912861667" Received: from smile.fi.intel.com ([10.237.72.54]) by fmsmga002.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Feb 2024 03:46:55 -0800 Received: from andy by smile.fi.intel.com with local (Exim 4.97) (envelope-from ) id 1rc26l-00000005oJ5-07Ji; Mon, 19 Feb 2024 13:46:51 +0200 Date: Mon, 19 Feb 2024 13:46:50 +0200 From: Andy Shevchenko To: Jonathan Cameron Cc: linux-iio@vger.kernel.org, "Rafael J . Wysocki" , Len Brown , linux-acpi@vger.kernel.org, Greg Kroah-Hartman , Daniel Scally , Heikki Krogerus , Sakari Ailus , Julia Lawall , Nuno =?iso-8859-1?Q?S=E1?= , Cosmin Tanislav , Mihail Chindris , Rasmus Villemoes , Tomislav Denis , Marek Vasut , Olivier Moysan , Fabrice Gasnier , Lad Prabhakar , Dmitry Baryshkov , Marijn Suijten , Marius Cristea , Ibrahim Tilki , Peter Zijlstra , Jonathan Cameron Subject: Re: [PATCH v4 13/15] iio: dac: ad3552r: Use device_for_each_child_node_scoped() Message-ID: References: <20240217164249.921878-1-jic23@kernel.org> <20240217164249.921878-14-jic23@kernel.org> Precedence: bulk X-Mailing-List: linux-acpi@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: <20240217164249.921878-14-jic23@kernel.org> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo On Sat, Feb 17, 2024 at 04:42:47PM +0000, Jonathan Cameron wrote: > From: Jonathan Cameron > > Switching to the _scoped() version removes the need for manual > calling of fwnode_handle_put() in the paths where the code > exits the loop early. In this case that's all in error paths. > > Removing the goto err; statements also allows more extensive use of > dev_err_probe() further simplifying the code. ... > err = fwnode_property_read_u32_array(child, > "adi,output-range-microvolt", > vals, > 2); Side note: ARRAY_SIZE()? -- With Best Regards, Andy Shevchenko