Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp3265976pxx; Mon, 2 Nov 2020 04:40:26 -0800 (PST) X-Google-Smtp-Source: ABdhPJwrX5cefl0X4tm4X6pIh4M4faBk/hNJ0Uj1aMbmX6ZudPYk8F4+cFTk1yTkHBCZIPI9D3lx X-Received: by 2002:a17:906:640d:: with SMTP id d13mr14648837ejm.223.1604320826573; Mon, 02 Nov 2020 04:40:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604320826; cv=none; d=google.com; s=arc-20160816; b=g0LWtopHTA01oZgZTdhyLH3CW4TDRgzN5pW3lLkANpg6B0WXWT02HmcwUx1gwClHni Ucch8a04ij9ZVapyakfw1QcDVhBZFYPpdRlDIaN3cNrrUIQxtZsH0pwEVkfYeb62jMDL LGNrc2HG0D10zQmSPvNGhbBJ/9zzPpc02e+sxolZQ0SAiPlnZjKqcK+OPtlJniWaCAOJ SmaUq7VP2LVCUP2EV9Dm+L3mVElvzaVLtqZIo9B9YOlPJlShIMcw+H1N8s1YSrQZVayq /0348b6s8IBwNPROWnehIU2/BzWzs3M8BN/15B7FuO6mNoz0+SzRl7FwCXU0OHA+oCDd KvVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:to:from; bh=hDJ25nWIThoF7qXNUj4bF0XyB7NfSluzgdYPGXqGrL4=; b=mwSrsAA1Mc5foHhhaSaCnrU0H9Z/LBE3EQjB4iWNSqyqEzBDArw3GgXp/Zec4KG1wA IKbqfKH+w630EYLoAMWZ2/sJfvzu/+6qxlcAkYLACBjaf1L/NPS/6l/BiJ5y2oi0nKNq aYHdRU6/ulcr2+9/yyUBgF3WEAAu2ska8q6lBj7QjSrtGnMHFYg81bVgYmd40VZWPyQY RBYEVPZgWJKJD5IdXgSXJZX7PHk3vtClibqDsX8MZ0TEJ+UF6MiNO6xeiP5doRx4dX1B qEcSUoX/2FnoO9zpd49QuzMvhkPWFtI5ye5r99OeUa0dlIBJGvqUfY5q4Ewi6dJaYQyD YU9g== 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 m21si9974037ejx.182.2020.11.02.04.40.02; Mon, 02 Nov 2020 04:40:26 -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 S1728746AbgKBMhf (ORCPT + 99 others); Mon, 2 Nov 2020 07:37:35 -0500 Received: from szxga05-in.huawei.com ([45.249.212.191]:7032 "EHLO szxga05-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728561AbgKBMhf (ORCPT ); Mon, 2 Nov 2020 07:37:35 -0500 Received: from DGGEMS406-HUB.china.huawei.com (unknown [172.30.72.58]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4CPsrB6q2VzhZ0C; Mon, 2 Nov 2020 20:37:30 +0800 (CST) Received: from localhost.localdomain (10.69.192.56) by DGGEMS406-HUB.china.huawei.com (10.3.19.206) with Microsoft SMTP Server id 14.3.487.0; Mon, 2 Nov 2020 20:37:29 +0800 From: Tian Tao To: , , , , , , Subject: [PATCH] drm/irq: Modify the return value type of drm_irq_uninstall Date: Mon, 2 Nov 2020 20:38:05 +0800 Message-ID: <1604320685-14995-1-git-send-email-tiantao6@hisilicon.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.69.192.56] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org There is no driver to use the return value of drm_irq_uninstal, so modify the return value type of drm_irq_uninstal to void. Signed-off-by: Tian Tao --- drivers/gpu/drm/drm_irq.c | 13 ++++++------- include/drm/drm_irq.h | 2 +- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c index 7537a3d..45e6471 100644 --- a/drivers/gpu/drm/drm_irq.c +++ b/drivers/gpu/drm/drm_irq.c @@ -166,14 +166,14 @@ EXPORT_SYMBOL(drm_irq_install); * Returns: * Zero on success or a negative error code on failure. */ -int drm_irq_uninstall(struct drm_device *dev) +void drm_irq_uninstall(struct drm_device *dev) { unsigned long irqflags; bool irq_enabled; int i; if (!dev->irq_enabled || !dev) - return 0; + return; irq_enabled = dev->irq_enabled; dev->irq_enabled = false; @@ -200,8 +200,8 @@ int drm_irq_uninstall(struct drm_device *dev) spin_unlock_irqrestore(&dev->vbl_lock, irqflags); } - if (!irq_enabled) - return -EINVAL; + if (!drm_WARN_ON(dev, !irq_enabled)) + return; DRM_DEBUG("irq=%d\n", dev->irq); @@ -213,7 +213,6 @@ int drm_irq_uninstall(struct drm_device *dev) free_irq(dev->irq, dev); - return 0; } EXPORT_SYMBOL(drm_irq_uninstall); @@ -250,10 +249,10 @@ int drm_legacy_irq_control(struct drm_device *dev, void *data, return ret; case DRM_UNINST_HANDLER: mutex_lock(&dev->struct_mutex); - ret = drm_irq_uninstall(dev); + drm_irq_uninstall(dev); mutex_unlock(&dev->struct_mutex); - return ret; + return 0; default: return -EINVAL; } diff --git a/include/drm/drm_irq.h b/include/drm/drm_irq.h index d77f6e6..d9f6ec0 100644 --- a/include/drm/drm_irq.h +++ b/include/drm/drm_irq.h @@ -27,6 +27,6 @@ struct drm_device; int drm_irq_install(struct drm_device *dev, int irq); -int drm_irq_uninstall(struct drm_device *dev); +void drm_irq_uninstall(struct drm_device *dev); #endif -- 2.7.4