From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8B632C4361A for ; Thu, 3 Dec 2020 21:34:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 382C7217BA for ; Thu, 3 Dec 2020 21:34:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729666AbgLCVeY (ORCPT ); Thu, 3 Dec 2020 16:34:24 -0500 Received: from asavdk4.altibox.net ([109.247.116.15]:47560 "EHLO asavdk4.altibox.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728014AbgLCVeY (ORCPT ); Thu, 3 Dec 2020 16:34:24 -0500 Received: from ravnborg.org (unknown [188.228.123.71]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by asavdk4.altibox.net (Postfix) with ESMTPS id 22B508050C; Thu, 3 Dec 2020 22:33:36 +0100 (CET) Date: Thu, 3 Dec 2020 22:33:34 +0100 From: Sam Ravnborg To: Tian Tao Cc: airlied@linux.ie, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, xinliang.liu@linaro.org, kraxel@redhat.com, tzimmermann@suse.de, alexander.deucher@amd.com, tglx@linutronix.de Subject: Re: [PATCH drm/hisilicon 2/3] drm/irq: Add the new api to install irq Message-ID: <20201203213334.GB81406@ravnborg.org> References: <1606898835-40775-1-git-send-email-tiantao6@hisilicon.com> <1606898835-40775-3-git-send-email-tiantao6@hisilicon.com> <20201203200711.GA74163@ravnborg.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201203200711.GA74163@ravnborg.org> X-CMAE-Score: 0 X-CMAE-Analysis: v=2.3 cv=Itgwjo3g c=1 sm=1 tr=0 a=S6zTFyMACwkrwXSdXUNehg==:117 a=S6zTFyMACwkrwXSdXUNehg==:17 a=kj9zAlcOel0A:10 a=TJU36lUpsagq2rwV8KQA:9 a=CjuIK1q_8ugA:10 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Tian, > > + ret = devm_add_action_or_reset(dev->dev, devm_drm_irq_uninstall, dev); > > + if (ret) > > + devm_drm_irq_uninstall(dev); > devm_add_action_or_reset() will call devm_drm_irq_uninstall() if ret is > != 0. See include/device.h. > > I guess that is the "_or_reset" part of the name that can tell us that. > So you can drop the if condition as it just will cause the code to call > drm_irq_uninstall() twice. Noticed this was fixed in v2 - so all is fine here. Sam