Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp2992238pxu; Tue, 8 Dec 2020 00:04:33 -0800 (PST) X-Google-Smtp-Source: ABdhPJyVF/9yJex6pqz61MGRNDkYpZeCUSoyGnQXvnHN3a1mQMevV3wkgDpGHqWZvJ3bgDpM8Spl X-Received: by 2002:a17:906:3ec8:: with SMTP id d8mr22419445ejj.32.1607414672975; Tue, 08 Dec 2020 00:04:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607414672; cv=none; d=google.com; s=arc-20160816; b=IFu3qIGJpbjv4S4WcacjG5dGtLF100ZCdI1KcywFGA62+gkHiNNe6Yg71hlV2K0S0z H+6e8z9OpJtS2hiB9fM14w1BLWLToS3xxh4KBOvZbX9LyRcS1Z50ox+hLoBx9fdPct3e YSx19F/6+Eket7Re+8rU4mmAr0SNeBH0oHGZP9U5LRNmAm6gmYjn3l/Mv3+P1rvAhGHj +MURqwAsdmXMMtqASaQS6fVTgYsau73DqNpWEBJyL/33iVIfqFTFBw+A8ByMLqryBc0z YURRTb3pGH00zfskJMWiYipcoNAjTQ77rHll6Cu8c9rGwv4U7tQ2uIXLDBa+ZB1RcctF 8q7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=0V/LeijamyQo5W8ILf91j9VZbolEFP2v7e6MOG3FTC8=; b=k8Wsy2F/RIKE7DLm92WSVB0822Gvu9mbd3Ex7kDMX5kjJAqf355C0ZmNrGZ9ywbnmS Y7uZYGtRPljbN447TD9XcKvHvk5bI5Fnfe2d3W9HUU+u3xr4loeR3SHGXmVBZgRnHGuk L2qfOJ7JcFkybePVg6pL8BswLjCG6PDjt4s1nrpnwdsJYSRzwZbxdhEa+l7Au2ixt/3f QXh04MwWc8jOFOFzSjnJrEqkfeJuwJzfQjN2fvZESeNart93PtmzP6azb7LFoSbb5h1p SGhXlmP/fvw+/jWNwG+Ohqu9hP/DN7d5hf3tLGBZ3bSU39B35op8rjXI5slm9eFgG1D6 KrvQ== 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 a10si2291016edq.184.2020.12.08.00.04.10; Tue, 08 Dec 2020 00:04:32 -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 S1727788AbgLHH7W (ORCPT + 99 others); Tue, 8 Dec 2020 02:59:22 -0500 Received: from mx2.suse.de ([195.135.220.15]:45578 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725768AbgLHH7W (ORCPT ); Tue, 8 Dec 2020 02:59:22 -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 875CEAD6B; Tue, 8 Dec 2020 07:58:40 +0000 (UTC) Subject: Re: [PATCH] drm/drv: switch to using devm_add_action_or_reset() To: Tian Tao , maarten.lankhorst@linux.intel.com, mripard@kernel.org, airlied@linux.ie, daniel@ffwll.ch Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org References: <1607303055-5199-1-git-send-email-tiantao6@hisilicon.com> From: Thomas Zimmermann Message-ID: <84176f0f-56e2-c8dd-2f4d-651ec4abe435@suse.de> Date: Tue, 8 Dec 2020 08:58:39 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0 MIME-Version: 1.0 In-Reply-To: <1607303055-5199-1-git-send-email-tiantao6@hisilicon.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="OBOk2NzH9KUjppU08qVTZvjsi2x5bTcac" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --OBOk2NzH9KUjppU08qVTZvjsi2x5bTcac Content-Type: multipart/mixed; boundary="swqm5MMhWIed7od01E2Dqsm0Nt5PbPvnu"; protected-headers="v1" From: Thomas Zimmermann To: Tian Tao , maarten.lankhorst@linux.intel.com, mripard@kernel.org, airlied@linux.ie, daniel@ffwll.ch Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Message-ID: <84176f0f-56e2-c8dd-2f4d-651ec4abe435@suse.de> Subject: Re: [PATCH] drm/drv: switch to using devm_add_action_or_reset() References: <1607303055-5199-1-git-send-email-tiantao6@hisilicon.com> In-Reply-To: <1607303055-5199-1-git-send-email-tiantao6@hisilicon.com> --swqm5MMhWIed7od01E2Dqsm0Nt5PbPvnu Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: quoted-printable Am 07.12.20 um 02:04 schrieb Tian Tao: > switch to using devm_add_action_or_reset() instead of devm_add_action. >=20 > Signed-off-by: Tian Tao I'm surprised that devm_drm_dev_init() didn't already use=20 devm_add_action_or_reset(). But it doesn't look special, so Acked-by: Thomas Zimmermann > --- > drivers/gpu/drm/drm_drv.c | 7 ++----- > 1 file changed, 2 insertions(+), 5 deletions(-) >=20 > diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c > index 7343038..b92f7fd 100644 > --- a/drivers/gpu/drm/drm_drv.c > +++ b/drivers/gpu/drm/drm_drv.c > @@ -675,11 +675,8 @@ static int devm_drm_dev_init(struct device *parent= , > if (ret) > return ret; > =20 > - ret =3D devm_add_action(parent, devm_drm_dev_init_release, dev); > - if (ret) > - devm_drm_dev_init_release(dev); > - > - return ret; > + return devm_add_action_or_reset(parent, > + devm_drm_dev_init_release, dev); > } > =20 > void *__devm_drm_dev_alloc(struct device *parent, >=20 --=20 Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Maxfeldstr. 5, 90409 N=C3=BCrnberg, Germany (HRB 36809, AG N=C3=BCrnberg) Gesch=C3=A4ftsf=C3=BChrer: Felix Imend=C3=B6rffer --swqm5MMhWIed7od01E2Dqsm0Nt5PbPvnu-- --OBOk2NzH9KUjppU08qVTZvjsi2x5bTcac Content-Type: application/pgp-signature; name="OpenPGP_signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="OpenPGP_signature" -----BEGIN PGP SIGNATURE----- wsF5BAABCAAjFiEExndm/fpuMUdwYFFolh/E3EQov+AFAl/PMi8FAwAAAAAACgkQlh/E3EQov+BE 9BAAmMZPjUjeeWxDYuc6FgJrELz9Ip1vR9sOpN9vVRc6Gb6oeZQrAUHQZER8dfHuNJyBez10q6G9 FlyX/WMc3p4viih51xU826TEWomOChZyzrNG325VjKH1wpXdJv5h36EOPzu+VjDrI5SG+obwPsBY XnPNO+JWey7Q3l59g9hfcGhKahKVwdyAb0ymasP1o8eD1YeOgFENP0fz2+q8IdY4YpsamuSMixKY TxEt6VqTxKBJXrTzgHMIM/VBtCSACg3SwWj40RKgo1vvTR4IPzd33ys7Q/OJ8tqVKslWU/X7J8ij vwsv/2IzvoK+eam3deWVVyhqc3fu2xW76xgJbSch2i1sjuiecLhl9aFlVkvzirHy0MMSwoj7Hi5S 6r+QA9PhUsL8eHcziNzTt7wa1g4v/wyVzqY7HzAQywKPRCsA350ePbUebvrQbELI5kb8SKxfFs27 /oTOyxuAcT/6KQIuzPQts4KDo406TcHOTTJmB6u4ZqUVYHfZ4oao7ROciq0ib85JlLVYHK6Ihnyl RX8KBZQp11jwZKxNTt+U8Mrk/SQpSoWd/fNyLZe6HCdF6o5fVy/HIKdr4DjY0GPd5DFdgsaA7CHO C8nvRS/ymdIUm4QkhNPmkTovoG2ElyhKUcrMUCAKMRJ6hij+Voe/8RNgYWmTDH8xd8QD+veJZfHQ 8V0= =+YfB -----END PGP SIGNATURE----- --OBOk2NzH9KUjppU08qVTZvjsi2x5bTcac--