Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp1003939pxb; Fri, 13 Nov 2020 01:23:32 -0800 (PST) X-Google-Smtp-Source: ABdhPJxafC71YT9dj+o6/rVXlaFw7z9cWfe97289CMnxop8lt07LAyURl2roJ/UiHG+XsYTEEHAM X-Received: by 2002:aa7:d9c2:: with SMTP id v2mr1481441eds.95.1605259411893; Fri, 13 Nov 2020 01:23:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605259411; cv=none; d=google.com; s=arc-20160816; b=cgsEAnPn2L5gFr1srbJRoqatm1mYDqVYR8zQ17UM5cMOyO8f8Le/abpyeHIltuZgAT uWGZlsa/Dk7qbUsXkAnzEzZ7nN/aFa6RTjCM7l872TEC0IjZ3AkBcotobQuHj0mVQOmb yR4/WeoqLOGHpu1eM8+x0vzl3l4HHaMINRRrfgM7LEDXrpOu+DCs7t6XwSQoncnjKcQg Pw9blpA+M4VMljSqYy4Zzz03xLSMx/3/zY09aApw7uXbg6G9yEr+WMH9iMNwHCjPdwRa V8AoBVmIAqj5RRf+6HY3xNRxBV2RVv6dLIWouw7LfaQJkyKb+882JxIURF0cBGve/R+t f1rw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:in-reply-to :date:cc:to:from:subject:message-id; bh=ptvL75SwvzxLGYVcfoEP95rxTmXej8DCc1jjD9nyJGg=; b=ocpoevV/9vg0Tg1CNqYckPBZVYdc34wTWw3Ttsy6RFtoa4MZNbhrNQQzQgkyDC0ONA WqXE5RcBnTZziCyKlGnYTM5dNxaaJ35P1uBR5t9ids7fNWPinA5uYwKxuXtuw7qE7T00 sDzjsrGM/bgYHiGX7bbmCHKNoGd+vseTfWg6Xp3vqa+bOQ5We1Ld/2NVKkhlGCgc6crS aZUJowOquFhAcS0CsvHz5pg1KU/EuwoPcaNdJvvm5rO1j7EHwgd962oSY1FWeLUIRb+m HZlklYH3Yh5y43UeOyzKd1uMPTpF5LgYfqWoc8MY4meJRo9Lw+rISDFz1FXzav23iRjA /uZQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a35si5703938edf.202.2020.11.13.01.23.05; Fri, 13 Nov 2020 01:23:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726395AbgKMJVe (ORCPT + 99 others); Fri, 13 Nov 2020 04:21:34 -0500 Received: from mx2.suse.de ([195.135.220.15]:58080 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726176AbgKMJVc (ORCPT ); Fri, 13 Nov 2020 04:21:32 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 2523CAE92; Fri, 13 Nov 2020 09:21:30 +0000 (UTC) Message-ID: <3af26701a12b0bcb55b8d422e2a18f06a8e94d4d.camel@suse.de> Subject: Re: [PATCH v4 02/11] firmware: raspberrypi: Introduce devm_rpi_firmware_get() From: Nicolas Saenz Julienne To: Bartosz Golaszewski Cc: Uwe =?ISO-8859-1?Q?Kleine-K=F6nig?= , LKML , Florian Fainelli , Ray Jui , Scott Branden , bcm-kernel-feedback-list@broadcom.com, linux-pwm@vger.kernel.org, arm-soc , linux-devicetree , wahrenst@gmx.net, Linux Input , Dmitry Torokhov , Greg KH , devel@driverdev.osuosl.org, Philipp Zabel , linux-gpio , Linus Walleij , linux-clk , Stephen Boyd , linux-rpi-kernel@lists.infradead.org, Andy Shevchenko Date: Fri, 13 Nov 2020 10:21:28 +0100 In-Reply-To: References: <20201112163630.17177-1-nsaenzjulienne@suse.de> <20201112163630.17177-3-nsaenzjulienne@suse.de> Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-lVAZyxFfZVTn1rZzZexc" User-Agent: Evolution 3.36.5 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-lVAZyxFfZVTn1rZzZexc Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, 2020-11-12 at 18:25 +0100, Bartosz Golaszewski wrote: > On Thu, Nov 12, 2020 at 5:44 PM Nicolas Saenz Julienne > wrote: > > Itroduce devm_rpi_firmware_get(), it'll simplify the firmware handling > > for most consumers. > >=20 > > Suggested-by: Bartosz Golaszewski > > Signed-off-by: Nicolas Saenz Julienne > > --- > >=20 > > Changes since v2: > > - Introduce devm_rpi_firmware_get() > >=20 > > drivers/firmware/raspberrypi.c | 31 +++++++++++++++++++++- > > include/soc/bcm2835/raspberrypi-firmware.h | 8 ++++++ > > 2 files changed, 38 insertions(+), 1 deletion(-) > >=20 > > diff --git a/drivers/firmware/raspberrypi.c b/drivers/firmware/raspberr= ypi.c > > index 438e17074a97..4ab2dfdc82ad 100644 > > --- a/drivers/firmware/raspberrypi.c > > +++ b/drivers/firmware/raspberrypi.c > > @@ -237,10 +237,17 @@ static void rpi_firmware_delete(struct kref *kref= ) > > kfree(fw); > > } > >=20 > > -void rpi_firmware_put(struct rpi_firmware *fw) > > +static void __rpi_firmware_put(void *data) > > { >=20 > The '__' prefix is very vague and usually used for unlocked variants > of functions. The casting to void * in rpi_firmware_put() is also > unneeded. I would much prefer that the devres release callback be > called devm_rpi_firmware_put() and that it call rpi_firmware_put() > which would then call kref_put(). Yes, that's better. I'll change it. Regards, Nicolas --=-lVAZyxFfZVTn1rZzZexc Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEErOkkGDHCg2EbPcGjlfZmHno8x/4FAl+uUBgACgkQlfZmHno8 x/6lEgf/d59t0Td5W4xLTNBLofc0Vh4uZHeN9Gvi6L52ayUePt+6T8iYBizcBSD7 gMFFnbzAziAWiKl7DSZjZTOaVNPohvZqyhssPCN/xAs2Xw4k/9iy8SfjtY0LyJ5S cY0As+Fny0/3v+hdAXAcl0O26eMFecffjVnEne56Iyy9pA1GAsjf2IU2XO6bE2sX qED6OKxz+B+3vVZOyHv4E10B0L1rIs64Tjrh0fUElpaT+d8jPJ2aog1LKEjPe+rD 1QA4cwN8xmkiB6Tj97LK6q2yG2Cji9OHBP6QEw9orQHti/aKKhozLyw+stmIq/uF gGk9YGb3/9okyNRC33V9EFN+3zjzCg== =Sbj8 -----END PGP SIGNATURE----- --=-lVAZyxFfZVTn1rZzZexc--