Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp7588633rwr; Wed, 10 May 2023 09:59:00 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5EHvGbNRKDnFxdbylpHr3MuDfSmg2X1mgQG7sjH2wQ6Iulq+8QDeCsq4s9VZxoV44AD8BW X-Received: by 2002:a05:6a21:78a8:b0:f1:f894:9e6e with SMTP id bf40-20020a056a2178a800b000f1f8949e6emr24662342pzc.5.1683737940016; Wed, 10 May 2023 09:59:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683737940; cv=none; d=google.com; s=arc-20160816; b=XbhBVXZUh3daqTIunqKXX2Cb8oTaVtpAsMN7tYlqr2nciBTj9zBGzaWAPNiJNOMY3l Sb/Pijq+dF3MRh/Oe6/rNuyAPmcWdgu0xlCkUkDFuX1hGVS/DLYzLKuT82EmuXJNSVUU rTNWq7Ffu4MXhDmVwt4mORdx4eeNJhyjWS2DF6I13v8uPf6c4y+Au9VSzZGiBVHTwqXH TOpGYKEHjZ/UbAX341k1srdLA/EVJvpVQgqo2/JKe8W33XgT3qt07JFO3V17mNjgaGnE 1vIgcpJOMNZ4dO3WkSofdBhYjtoBOPdF5G0+qTcAjMqtN5tA+GjFgM6Wkoqig4SvuBsg 0N/A== 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=hqFHy1xe5YqFmgQ/GgNRtOR0JMnEzFxt/51kgPUMKZ0=; b=SnmfeOogmrp8MLRyBH3vOBHKhdn3YjHQ0uOwf4ZkKBByk2EBLc7N1wPWupffvjYASf UpvsAgK5tzClGRMWov+w88pUpOq5LfSuebrOzzKk9OmceWFtlJ3ZV4N97k46Wus4918b drFzRiYXvWRh2r4nxQcF2ccsm4LirX+9dMncMzX9nt7fcjPKnE3SbPYeJVSRPNBUC15d c8FXrHR588Gaqfl3a9+gjzv3YwMXQR/tQS5KEbm1VKPHGRg4setnxIY6jk+I+ZQkt+7k wiS15HQInJIh0azFB6HuYmCWEHjUrZW9V9egSjVRHQAMVvizPoxK7oOdZQeTYSq7bONE 4Kqw== 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 190-20020a6300c7000000b0050bea5bf413si4511603pga.705.2023.05.10.09.58.47; Wed, 10 May 2023 09:58:59 -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 S229506AbjEJQnq (ORCPT + 99 others); Wed, 10 May 2023 12:43:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33342 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231527AbjEJQno (ORCPT ); Wed, 10 May 2023 12:43:44 -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 D079C7ED3 for ; Wed, 10 May 2023 09:43:41 -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 1pwmuc-0006yl-CH; Wed, 10 May 2023 18:43:34 +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 1pwmuY-002XCA-O2; Wed, 10 May 2023 18:43:30 +0200 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pwmuY-003ALi-5f; Wed, 10 May 2023 18:43:30 +0200 Date: Wed, 10 May 2023 18:43:30 +0200 From: Uwe =?utf-8?Q?Kleine-K=C3=B6nig?= To: Fei Shao Cc: Hans Verkuil , Andrew-CT Chen , AngeloGioacchino Del Regno , Matthias Brugger , Mauro Carvalho Chehab , Tiffany Lin , Yunfei Dong , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-mediatek@lists.infradead.org, "Rafael J. Wysocki" , Pavel Machek , Greg Kroah-Hartman Subject: Re: [PATCH] media: mediatek: vcodec: Convert mtk_vcodec_dec_hw platform remove callback Message-ID: <20230510164330.z2ygkl7vws6fci75@pengutronix.de> References: <20230510233117.1.I7047714f92ef7569bd21f118ae6aee20b3175a92@changeid> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="q7mthi6fgfcgjjj5" Content-Disposition: inline In-Reply-To: <20230510233117.1.I7047714f92ef7569bd21f118ae6aee20b3175a92@changeid> 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=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham 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 --q7mthi6fgfcgjjj5 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable [expanding the audience a bit for more expertise] Hello, On Wed, May 10, 2023 at 11:31:35PM +0800, Fei Shao wrote: > This aligns with [1] and converts the platform remove callback to > .remove_new(), which returns void. >=20 > [1]: commit a3afc5b10661 ("media: mtk_vcodec_dec_drv: Convert to > platform remove callback returning void") >=20 > Signed-off-by: Fei Shao >=20 > --- >=20 > drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_hw.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) >=20 > diff --git a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_hw.c b= /drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_hw.c > index b753bf54ebd9..bd5743723da6 100644 > --- a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_hw.c > +++ b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_hw.c > @@ -193,16 +193,14 @@ static int mtk_vdec_hw_probe(struct platform_device= *pdev) > return ret; > } > =20 > -static int mtk_vdec_hw_remove(struct platform_device *pdev) > +static void mtk_vdec_hw_remove(struct platform_device *pdev) > { > pm_runtime_disable(&pdev->dev); > - > - return 0; > } > =20 > static struct platform_driver mtk_vdec_driver =3D { > .probe =3D mtk_vdec_hw_probe, > - .remove =3D mtk_vdec_hw_remove, > + .remove_new =3D mtk_vdec_hw_remove, > .driver =3D { > .name =3D "mtk-vdec-comp", > .of_match_table =3D mtk_vdec_hw_match, While the patch looks fine, I wonder if having a remove callback just to do pm_runtime_disable() is worth keeping it. Doesn't the core care for things like that? I grepped a bit around, device_unbind_cleanup() is called after device_remove() which calls pm_runtime_reinit(). Does that mean calling pm_runtime_disable in .remove() is useless? In that case, you could just drop the .remove() callback. Best regards Uwe --=20 Pengutronix e.K. | Uwe Kleine-K=F6nig | Industrial Linux Solutions | https://www.pengutronix.de/ | --q7mthi6fgfcgjjj5 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEP4GsaTp6HlmJrf7Tj4D7WH0S/k4FAmRbybEACgkQj4D7WH0S /k7BlggAtOk4RsuBv4L9tAsMlhTGVIueKXhZIiBT1IZ0G0tp9SBTwlWNxwIay133 Q1RFJRhgq7GTusiGx3dw62EeiF9Wxaqa7W+uB9GrAfPs5k8qRyiU/LC27sAfjg9x eS4MkSR3dw7iN7wB1DSEiitHVOYXdq+zZ5aqhNNzQZE3DymxwR91cxuK+gG1k/ax c4Izpg74XIDk8Q1CrUo1A1N5CQ0qKS1NRRlfZy/7/DjIYzG+tjrhSoUO/h4AQOtR lxTcA9knL0vx0NPs7o18g9ZngmMUTtQWgADLgJfFlPcyWs5CABUAnF3Nkafa9nNS nLsTffuOpkHKy4mmgrnT0qEGFaGqRA== =gg+q -----END PGP SIGNATURE----- --q7mthi6fgfcgjjj5--