Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp8214796rwp; Wed, 19 Jul 2023 06:56:08 -0700 (PDT) X-Google-Smtp-Source: APBJJlFxt8dVv24dhSNvndn0QI6EqBD/rkYa25QTBHSg7Jn7/Sqeyjs+ihx4/AahN5tN49Tuz8z+ X-Received: by 2002:a17:90a:af92:b0:263:3b44:b0d3 with SMTP id w18-20020a17090aaf9200b002633b44b0d3mr1840463pjq.46.1689774967960; Wed, 19 Jul 2023 06:56:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689774967; cv=none; d=google.com; s=arc-20160816; b=zdPbyyESHYxstDSvAqGKxJa+2p8low8nw0G0hUGA+3ZWxSE9t2FFeob9XY0/zfBxaZ fWKlu+RaDzCqSISHiGNOwCmrL1GtsUjdhiRetc6yBED5PO4kZbZ8lIuonSbLOyj9dJK0 mcL+Pp9R84zWKmHjtuGLygSRUzpq/oqaWzrcrNLKsWGnxj9BwyBD5Ph1PjCJzZAM5k6w siO1t4TH9CP4h5RSuAWzPJuN+SHaFJDKa6B5SXnkJpRPPV6MRuBc2BWLTtVoaJaFme6G UNH1Rq0c1f+inuFqmYRxTjLj60ygh7dJ3sfzuj3AZWGQlp077Gsbd29Qzih4eP0Vwack 7V9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=jm+gUXt23kIGLv+H5ZLIhgUawHV7Gc+jvSiTghhyjQY=; fh=gFaGVIFHSNSFi+X7aYXvQO5am/4HmH75JS7RRg0bHQ0=; b=yf0BUUdMSajjwdFTt543/lMR8XSAzatlOpgLf7Rej0gFpzWcTxXfJ874RShFicJJPE RZKjME5KttvzJNhvz81aiPoDe/S6DdpTGwxDYbiPP8u6z27wLT7U6rpVvROj0F3KEi+s PLspB5dHjwyZZG+80xzLxBPpU2wxHeieY9AgSdSBVF93n+4H5wPUr9z8UtKEQ82h5owo JKU7rmfZXFUxSsG+OUesI2Z4m2nhKnJ4dxCO8rw9Wvp6vvNEMcV3K93rHmv/88bpTz4E 7/AWfq+u+CK7+kJ/ZAuYZ3Cgginr53ThCkTnDO4bKRu5cu5JYvAV3vAdqsZRXwIXcFSr 06Nw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id nu9-20020a17090b1b0900b0025eab041423si1462688pjb.189.2023.07.19.06.55.55; Wed, 19 Jul 2023 06:56:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230049AbjGSNkt (ORCPT + 99 others); Wed, 19 Jul 2023 09:40:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59060 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229744AbjGSNks (ORCPT ); Wed, 19 Jul 2023 09:40:48 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DE176123 for ; Wed, 19 Jul 2023 06:40:47 -0700 (PDT) Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qM7Pz-0007az-Nb; Wed, 19 Jul 2023 15:40:39 +0200 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1qM7Py-000cHN-Ir; Wed, 19 Jul 2023 15:40:38 +0200 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1qM7Px-0066y8-RK; Wed, 19 Jul 2023 15:40:37 +0200 Date: Wed, 19 Jul 2023 15:40:36 +0200 From: Uwe =?utf-8?Q?Kleine-K=C3=B6nig?= To: Andy Shevchenko Cc: Bartosz Golaszewski , Thierry Reding , Linus Walleij , Andy Shevchenko , linux-pwm@vger.kernel.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, Bartosz Golaszewski Subject: Re: [PATCH] gpio: mvebu: fix irq domain leak Message-ID: <20230719134036.w5lsqxcg6u3v3ynm@pengutronix.de> References: <20230719114101.55051-1-brgl@bgdev.pl> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="ujodkpnhmenu4mny" Content-Disposition: inline In-Reply-To: X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --ujodkpnhmenu4mny Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jul 19, 2023 at 04:02:39PM +0300, Andy Shevchenko wrote: > On Wed, Jul 19, 2023 at 2:41=E2=80=AFPM Bartosz Golaszewski wrote: > > > > From: Bartosz Golaszewski > > > > Uwe Kleine-K=C3=B6nig pointed out we still have one resource leak in th= e mvebu > > driver triggered on driver detach. Let's address it with a custom devm > > action. >=20 > One nit-pick below, in either case > Reviewed-by: Andy Shevchenko >=20 > > Fixes: 812d47889a8e ("gpio/mvebu: Use irq_domain_add_linear") > > Signed-off-by: Bartosz Golaszewski > > --- > > drivers/gpio/gpio-mvebu.c | 18 +++++++++++++----- > > 1 file changed, 13 insertions(+), 5 deletions(-) > > > > diff --git a/drivers/gpio/gpio-mvebu.c b/drivers/gpio/gpio-mvebu.c > > index a35958e7adf6..67497116ce27 100644 > > --- a/drivers/gpio/gpio-mvebu.c > > +++ b/drivers/gpio/gpio-mvebu.c > > @@ -1112,6 +1112,13 @@ static int mvebu_gpio_probe_syscon(struct platfo= rm_device *pdev, > > return 0; > > } > > > > +static void mvebu_gpio_remove_irq_domain(void *data) > > +{ > > + struct irq_domain *domain =3D data; > > + > > + irq_domain_remove(domain); >=20 > The from/to void * doesn't need an explicit casting in C. This can be > a one liner >=20 > static void mvebu_gpio_remove_irq_domain(void *domain) > { > irq_domain_remove(domain); > } I slightly prefer Bartosz's version, but wouldn't get sleepless nights =66rom that one. Reviewed-by: Uwe Kleine-K=C3=B6nig for whatever variant you pick. Best regards and thanks for acting on my report, Uwe --=20 Pengutronix e.K. | Uwe Kleine-K=C3=B6nig = | Industrial Linux Solutions | https://www.pengutronix.de/ | --ujodkpnhmenu4mny Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEP4GsaTp6HlmJrf7Tj4D7WH0S/k4FAmS359QACgkQj4D7WH0S /k4e9Af8CqmHYpZTvAibrO7NUTwH5Wv9wPOjn08hjFMA9+EVEq0IZWC04rJdNXxK Q9N+jeCJoAWVQNL73ZVUlIzK1CjcJnppEsn92O0G4b4PybMCQGqd+UPyR1naMW7d ieNq857UHMYaUUBt1Y+yDNTahs5EsTXXV7uEmlgyHAQXzIGc+4KHzCSF9umSYxyq foaTpnOe3llRQGh3TtZVDDsRdDy5HK/wbAwG0Hn9mgYKK0UOJ0P2dpxJncKl2Hgx LlNUmXQ4SoF3PlEXBYc7pCSEHF62Qm0agQke4dQHP+af/cBk1QSQQT51UJAzBw3X j81qfIKaAF02tBPKvuPlKdWXMNQaaQ== =uUOV -----END PGP SIGNATURE----- --ujodkpnhmenu4mny--