From patchwork Fri Jun 14 09:51:09 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 10994835 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 94DE114E5 for ; Fri, 14 Jun 2019 09:51:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 852B61FFCD for ; Fri, 14 Jun 2019 09:51:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 79452282E8; Fri, 14 Jun 2019 09:51:24 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 0397F1FFEB for ; Fri, 14 Jun 2019 09:51:23 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B9AE9896C4; Fri, 14 Jun 2019 09:51:21 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by gabe.freedesktop.org (Postfix) with ESMTPS id 694FE896C4 for ; Fri, 14 Jun 2019 09:51:20 +0000 (UTC) Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C2DA621721; Fri, 14 Jun 2019 09:51:19 +0000 (UTC) From: Greg Kroah-Hartman To: David Airlie , Daniel Vetter Subject: [PATCH 1/2] drm: debugfs: make drm_debugfs_remove_files() a void function Date: Fri, 14 Jun 2019 11:51:09 +0200 Message-Id: <20190614095110.3716-1-gregkh@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1560505880; bh=iOpdFvSH3lQnymOzypBokmI9+g0uhnAJnYe9Fi4ro2I=; h=From:To:Cc:Subject:Date:From; b=Qz6OWEbwkcwaAtDrHO0CYPAjYe8odHg7WsKojXC+SMmH80SRV5lCnBZ6+tzazxX+x /Fzt8Ldt/QoDHQ5qq5kKxXfTvXBpbKdGpTJ7BzADZ4J6Spscq9k8lN4K8iHbOdWFkQ fZlQDxN4Hr1X0hYD4Kxh07r/bEAvKK8a4tsIW1qE= X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Maxime Ripard , Greg Kroah-Hartman , Sean Paul , dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP The function can not fail, and no one checks the current return value, so just mark it as a void function so no one gets confused. Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Sean Paul Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/drm_debugfs.c | 5 ++--- include/drm/drm_debugfs.h | 9 ++++----- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/drm_debugfs.c b/drivers/gpu/drm/drm_debugfs.c index 6f2802e9bfb5..515569002c86 100644 --- a/drivers/gpu/drm/drm_debugfs.c +++ b/drivers/gpu/drm/drm_debugfs.c @@ -270,8 +270,8 @@ int drm_debugfs_init(struct drm_minor *minor, int minor_id, } -int drm_debugfs_remove_files(const struct drm_info_list *files, int count, - struct drm_minor *minor) +void drm_debugfs_remove_files(const struct drm_info_list *files, int count, + struct drm_minor *minor) { struct list_head *pos, *q; struct drm_info_node *tmp; @@ -289,7 +289,6 @@ int drm_debugfs_remove_files(const struct drm_info_list *files, int count, } } mutex_unlock(&minor->debugfs_lock); - return 0; } EXPORT_SYMBOL(drm_debugfs_remove_files); diff --git a/include/drm/drm_debugfs.h b/include/drm/drm_debugfs.h index ac0f75df1ac9..422d0d201c0a 100644 --- a/include/drm/drm_debugfs.h +++ b/include/drm/drm_debugfs.h @@ -81,8 +81,8 @@ struct drm_info_node { int drm_debugfs_create_files(const struct drm_info_list *files, int count, struct dentry *root, struct drm_minor *minor); -int drm_debugfs_remove_files(const struct drm_info_list *files, - int count, struct drm_minor *minor); +void drm_debugfs_remove_files(const struct drm_info_list *files, + int count, struct drm_minor *minor); #else static inline int drm_debugfs_create_files(const struct drm_info_list *files, int count, struct dentry *root, @@ -91,10 +91,9 @@ static inline int drm_debugfs_create_files(const struct drm_info_list *files, return 0; } -static inline int drm_debugfs_remove_files(const struct drm_info_list *files, - int count, struct drm_minor *minor) +static inline void drm_debugfs_remove_files(const struct drm_info_list *files, + int count, struct drm_minor *minor) { - return 0; } #endif