From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fgw23-7.mail.saunalahti.fi (fgw23-7.mail.saunalahti.fi [62.142.5.84]) (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 3087813C9A4 for ; Sun, 10 Nov 2024 19:52:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=62.142.5.84 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731268365; cv=none; b=BK+3DTTSrFQmhG3tTzpO4T+OczVpmzav9gmRuyCfTjODwhIEVdUOhDI8JFmEgdn9IbVPLUAWqr6p8+aUi0w1XuVuTdJmpxl7eQ6mChKbFJ8oofqozltFyZDYDVbBSJ/sS0ewpAa+oYHh1yWSRQ1uqPW1FmtAUFXufTBDuBFKHGU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731268365; c=relaxed/simple; bh=PgYesiTdPA5OVXXO/NUazx9gOX69ohmxZNRoY8rs0cw=; h=From:Date:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ZtNQw23ufzHyj41eDqkfxqAIk2ZbMSJp1Ho4A+8guST5/df/pTa901DslNA0E6TjavvGCXglv3HbCMDqhkdoGY9jMWOfRtvIQ78h6m6aq9I0wUgYklGGSGxG/EH0XkdgVCedwUV3ZmneCAILlhHI95hy48apbQvf3TsgT6AY3nk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com; spf=fail smtp.mailfrom=gmail.com; arc=none smtp.client-ip=62.142.5.84 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=gmail.com Received: from localhost (88-113-24-75.elisa-laajakaista.fi [88.113.24.75]) by fgw20.mail.saunalahti.fi (Halon) with ESMTP id 1eef05fe-9f9d-11ef-9aff-005056bd6ce9; Sun, 10 Nov 2024 21:51:07 +0200 (EET) From: Andy Shevchenko Date: Sun, 10 Nov 2024 21:51:04 +0200 To: Aren Cc: Andy Shevchenko , Jonathan Cameron , Lars-Peter Clausen , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Kaustabh Chakraborty , =?iso-8859-1?B?QmFybmFi4XMgQ3rpbeFu?= , Ondrej Jirman , Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= , linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, Dragan Simic , phone-devel@vger.kernel.org Subject: Re: [PATCH v4 2/6] iio: light: stk3310: handle all remove logic with devm callbacks Message-ID: References: <20241102195037.3013934-3-aren@peacevolution.org> <20241102195037.3013934-7-aren@peacevolution.org> Precedence: bulk X-Mailing-List: devicetree@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: Sun, Nov 10, 2024 at 01:38:39PM -0500, Aren kirjoitti: > On Mon, Nov 04, 2024 at 10:32:08AM +0200, Andy Shevchenko wrote: > > On Sat, Nov 02, 2024 at 03:50:37PM -0400, Aren Moynihan wrote: ... > > > + ret = devm_add_action_or_reset(&client->dev, stk3310_set_state_disable, data); > > > > Why not simply 'dev' as in below call? > > I was trying to avoid refactoring the entire function to replace > &client->dev with dev, I'll add a patch for that to the next revision. I'm not talking about refactoring, I'm talking only about the lines that you have touched / added. > > > + if (ret) > > > + return dev_err_probe(dev, ret, "failed to register cleanup function\n"); -- With Best Regards, Andy Shevchenko