Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp822340pxu; Thu, 3 Dec 2020 13:36:24 -0800 (PST) X-Google-Smtp-Source: ABdhPJxnm7AhXRV/d2mhjh8bgwFnX+4l+9YFyFYLYKbTfj4QnWwG/AkoHPEbQpW20hIesLzDxyTH X-Received: by 2002:a17:906:3c11:: with SMTP id h17mr4273812ejg.20.1607031384382; Thu, 03 Dec 2020 13:36:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607031384; cv=none; d=google.com; s=arc-20160816; b=Yp4MUsAxBCk5ns30PmHzFeCatpBr3JEehARg6sYa7HO2mG1YBjTtmgCedtogKvoR6o ctVHr4aUzCM9lR8famSJ50Ykv2Yt6xiI2pLt1VdaHO1XB1N1pgndFcXYYN/Af1DAkHPr WhmQo0RosDNnTCc+EzWtvUSvGnrsTEYm6Ny+NWytgYrE+mtQ5zqimqv8HrxAws0NRFak 0U6OXBixwvUIpb9ZoGFw1yfADYJl8jy8DzYzEM9HeZugsAqRCwoJ8BhEn5HXesSr2YoK KWLQf2MmHcepDWnxpVceMlqtif24h9XH7hpyt/nxKGhxgLQ2lpq5/x3lT9W8sEu/fOjE QxIg== 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=9oaWkaTEJp0APUD7Yx9TewoeN172sRB+gz24mIehiOg=; b=oo7zaL8fEunbiSRCK4g/BWkcMj4dP6fItgrvl00uHN6PDMlpro5WDQu+4eeamNQvXy rAOagdb1oCWoiq178YzvX1sKmLv372G3Xw092nIKSe3ZUaFtrPrX0r4/a49kRa5jtR96 h+TdPz3cNkizuu6R4fObnZftvNOb13Jcz+iISjlaSGtPcZmCeGsh3EsGfC/+wfCqdTP2 bQ+Yw8ekk5Dp7G3z7dRm11KZFcpWkZD8uRmaXf6XmQVwDHrDKwxMHwAcFZYuQiAwEGMi SE5UBv9yUl1TC6mutqmIWnlkWWO47CjzLmxYq9y5Bv3cX4sEwSuPPuj5FIM3pGBb0zg2 DVyg== 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 a17si136082ejd.500.2020.12.03.13.35.45; Thu, 03 Dec 2020 13:36:24 -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 S1729445AbgLCVeY (ORCPT + 99 others); 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