From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 49F2B33E345; Thu, 7 May 2026 12:46:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778157987; cv=none; b=A5rhmZ5ZsqviEtyIfWQvuu0Z6yaPN7sLJVOIXvCe5rytibEzZ5IKKZqnSP7NYM6b8/7XVGmiEVG03QrucOOHtSPQT06u/Z1WUWTc/1KlzLNtvtUQkHnlahga6g7PHbLv0b7YZdzdZyqoKebkPiyqh+7TUmgaZbE1imemSPYhXpA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778157987; c=relaxed/simple; bh=MCVZsR5HzPh6m3Tl7NULfqVTBbuOyj3XwdZNPC2OaLM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=qgy0QjB9OzDN1BQWsq7HGswzNIiFYov/DLWJASA7Bcc5t2MnI/I6MjjsQZlHit0qUtRsE4WfKBtAs/ItiYQxbO5SjAV7z216kpgBBckHOBpoysftvQQmG8D45jmGWLQ+6FSAf3XRx06N952AkydwiGY8tsN2zi5wuRHPMiOdktY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=JujDHvch; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="JujDHvch" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7EE79C2BCB2; Thu, 7 May 2026 12:46:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1778157987; bh=MCVZsR5HzPh6m3Tl7NULfqVTBbuOyj3XwdZNPC2OaLM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=JujDHvch3M9RUnoOOesFvpyWzkFfagT93Ll5dd1RA1C5nrKCQv22j9n/6CtarjXip aGsHGsAJsF0LrGEttVu7GSn9D+qAQlq2p/fVWNNJkdrCL+PNi+PniX4gxW8ckfHdgN +fIgVTIIi/Btz0b8EddJJgf3gTwHKRjnPdWLgGW/EDlKupG2Kov9FffzDRR3NxcHYh 1DbphBaiIZeEurCj3ADAdRZyDyTvZc1tyz/0nOmLttwRjdBFiqnnrckRGDhFbkA3VW F8K+dR7hy32uQVlvO80rCiaPsIzacp3+pKeg5uj+KK3YcYpDd1bAAH/QpEYUk6CVdm QkuGpRJHPgpxQ== Date: Thu, 7 May 2026 13:46:20 +0100 From: Lee Jones To: Cosmin Tanislav Cc: Biju Das , Daniel Lezcano , Thomas Gleixner , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Geert Uytterhoeven , Magnus Damm , Michael Turquette , Stephen Boyd , Philipp Zabel , linux-iio@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-clk@vger.kernel.org Subject: Re: [PATCH v2 03/10] mfd: rz-mtu3: use device-managed mfd_add_devices() Message-ID: <20260507124620.GJ305027@google.com> References: <20260410163530.383818-1-cosmin-gabriel.tanislav.xa@renesas.com> <20260410163530.383818-4-cosmin-gabriel.tanislav.xa@renesas.com> Precedence: bulk X-Mailing-List: linux-clk@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: <20260410163530.383818-4-cosmin-gabriel.tanislav.xa@renesas.com> On Fri, 10 Apr 2026, Cosmin Tanislav wrote: > Replace mfd_add_devices() and the custom cleanup action with > devm_mfd_add_devices(). > > Remove the ret variable as it is now unused. Do this first, then the changes in the first patch make more sense. > Signed-off-by: Cosmin Tanislav > --- > > V2: > * no changes > > drivers/mfd/rz-mtu3.c | 15 ++------------- > 1 file changed, 2 insertions(+), 13 deletions(-) > > diff --git a/drivers/mfd/rz-mtu3.c b/drivers/mfd/rz-mtu3.c > index 6b9c6831dffa9..3be6f6c900b82 100644 > --- a/drivers/mfd/rz-mtu3.c > +++ b/drivers/mfd/rz-mtu3.c > @@ -300,11 +300,6 @@ void rz_mtu3_disable(struct rz_mtu3_channel *ch) > } > EXPORT_SYMBOL_GPL(rz_mtu3_disable); > > -static void rz_mtu3_mfd_remove(void *data) > -{ > - mfd_remove_devices(data); > -} > - > static const struct mfd_cell rz_mtu3_devs[] = { > { > .name = "rz-mtu3-counter", > @@ -320,7 +315,6 @@ static int rz_mtu3_probe(struct platform_device *pdev) > struct rz_mtu3_priv *priv; > struct rz_mtu3 *ddata; > unsigned int i; > - int ret; > > ddata = devm_kzalloc(&pdev->dev, sizeof(*ddata), GFP_KERNEL); > if (!ddata) > @@ -353,13 +347,8 @@ static int rz_mtu3_probe(struct platform_device *pdev) > mutex_init(&ddata->channels[i].lock); > } > > - ret = mfd_add_devices(&pdev->dev, 0, rz_mtu3_devs, > - ARRAY_SIZE(rz_mtu3_devs), NULL, 0, NULL); > - if (ret < 0) > - return ret; > - > - return devm_add_action_or_reset(&pdev->dev, rz_mtu3_mfd_remove, > - &pdev->dev); > + return devm_mfd_add_devices(&pdev->dev, 0, rz_mtu3_devs, > + ARRAY_SIZE(rz_mtu3_devs), NULL, 0, NULL); > } > > static const struct of_device_id rz_mtu3_of_match[] = { > -- > 2.53.0 -- Lee Jones