From patchwork Thu Feb 27 12:02:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wambui Karuga X-Patchwork-Id: 11408579 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 30F6792A for ; Thu, 27 Feb 2020 13:00:10 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0F24F24698 for ; Thu, 27 Feb 2020 13:00:10 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="sSNUPEjU" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0F24F24698 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1668E6ECB9; Thu, 27 Feb 2020 12:59:43 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wm1-x344.google.com (mail-wm1-x344.google.com [IPv6:2a00:1450:4864:20::344]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3B5816E885 for ; Thu, 27 Feb 2020 12:02:46 +0000 (UTC) Received: by mail-wm1-x344.google.com with SMTP id m3so3114886wmi.0 for ; Thu, 27 Feb 2020 04:02:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=peQxcIwm+53AZheiLwWVbUK9WDSs/oWzD+2yvLVaFDQ=; b=sSNUPEjUQ4P/FmERt8XhONyzKkRQaD7ZGIwPeYhmN25NcUNbTsckK3pXW/4lpN0nPH FIHBTRB51szqJbtG2pxhVutWcyhWABcBWVTMjLF0TvaagvGR9omRwsaz4XE+7EgoQDWA lJC6LHBqY8hjtg2VOEuzwIsu5m5Bs7bYwyRTunNjCdvBhN4WV6AOx+DWAnWSEvCLhg8y udzF37krHLLtAD2A8QLeK6cBbvuxXOWz+cf5OteaBoh2xQDUnNf+LyRIRHNvnHUOH3Dh wIKVRhQIL891JC1j3qCyglBsxuTa+VNPtGldxMkIImoTLurQ8zBOsopSQgY12xnvLU39 KzpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=peQxcIwm+53AZheiLwWVbUK9WDSs/oWzD+2yvLVaFDQ=; b=EgVnvIVN7ggYwVV2ULrIf0Ur/fh96K5UdJAhazJjk4GqYjGy3SZHB5MeocdBJYi5qe rfzbehWYfCxNMaFFgrCh8BRFs8yCyk3xWlo9PEgm1LZSlNI1w2CgIJfX2/JzqvaeknYs NKhRY6x3ZIQS2KYWbEevvuyVELuIkZrCFV6s7Gg6f2zOcwwZCLi2/M3mWuezNYB8DFQe /CZPOg4RLiKt7WE6PT3uWiWZctzFsRj6dQ5lMv5ne2U3E3iVJdTlefMrklBMk/3xNYuv KI/pB1nbAvN7hIHUtdJcy04i01qXPDwa8KPKkavqA+wO4pfPcLrL2IjRLYRrdsypH01z JPkQ== X-Gm-Message-State: APjAAAWHncOhI5pTYr1FFbf+gwQdIGR67nR5s1zflgSfmsi5G/BP+YwM NqbC5DxecDuJlCxLrRzpxI0= X-Google-Smtp-Source: APXvYqwUpYHhUiPj+1sUDyusbZPVe/8nAXMpyaeuNf1rhtqmIlfapyheEuIWIS8xSNqoryCbmKC7fQ== X-Received: by 2002:a05:600c:21c4:: with SMTP id x4mr5045200wmj.147.1582804964957; Thu, 27 Feb 2020 04:02:44 -0800 (PST) Received: from wambui.zuku.co.ke ([197.237.61.225]) by smtp.googlemail.com with ESMTPSA id t10sm7655017wru.59.2020.02.27.04.02.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Feb 2020 04:02:44 -0800 (PST) From: Wambui Karuga To: daniel@ffwll.ch, airlied@linux.ie, tzimmermann@suse.de, maarten.lankhorst@linux.intel.com, mripard@kernel.org Subject: [PATCH 01/21] drm/debugfs: remove checks for return value of drm_debugfs functions. Date: Thu, 27 Feb 2020 15:02:12 +0300 Message-Id: <20200227120232.19413-2-wambui.karugax@gmail.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200227120232.19413-1-wambui.karugax@gmail.com> References: <20200227120232.19413-1-wambui.karugax@gmail.com> MIME-Version: 1.0 X-Mailman-Approved-At: Thu, 27 Feb 2020 12:59:10 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Since 987d65d01356 (drm: debugfs: make drm_debugfs_create_files() never fail), there is no need to check the return value of drm_debugfs_create_files(). Therefore, remove remove unnecessary checks and error handling statement blocks for its return value. These changes also enable changing drm_debugfs_create_files() to return void. Signed-off-by: Wambui Karuga --- drivers/gpu/drm/drm_debugfs.c | 49 ++++++++--------------------------- include/drm/drm_debugfs.h | 6 ++--- 2 files changed, 14 insertions(+), 41 deletions(-) diff --git a/drivers/gpu/drm/drm_debugfs.c b/drivers/gpu/drm/drm_debugfs.c index 4e673d318503..d77d2bdcfb2d 100644 --- a/drivers/gpu/drm/drm_debugfs.c +++ b/drivers/gpu/drm/drm_debugfs.c @@ -172,8 +172,8 @@ static const struct file_operations drm_debugfs_fops = { * &struct drm_info_list in the given root directory. These files will be removed * automatically on drm_debugfs_cleanup(). */ -int drm_debugfs_create_files(const struct drm_info_list *files, int count, - struct dentry *root, struct drm_minor *minor) +void drm_debugfs_create_files(const struct drm_info_list *files, int count, + struct dentry *root, struct drm_minor *minor) { struct drm_device *dev = minor->dev; struct drm_info_node *tmp; @@ -199,7 +199,6 @@ int drm_debugfs_create_files(const struct drm_info_list *files, int count, list_add(&tmp->list, &minor->debugfs_list); mutex_unlock(&minor->debugfs_lock); } - return 0; } EXPORT_SYMBOL(drm_debugfs_create_files); @@ -208,56 +207,30 @@ int drm_debugfs_init(struct drm_minor *minor, int minor_id, { struct drm_device *dev = minor->dev; char name[64]; - int ret; INIT_LIST_HEAD(&minor->debugfs_list); mutex_init(&minor->debugfs_lock); sprintf(name, "%d", minor_id); minor->debugfs_root = debugfs_create_dir(name, root); - ret = drm_debugfs_create_files(drm_debugfs_list, DRM_DEBUGFS_ENTRIES, - minor->debugfs_root, minor); - if (ret) { - debugfs_remove(minor->debugfs_root); - minor->debugfs_root = NULL; - DRM_ERROR("Failed to create core drm debugfs files\n"); - return ret; - } + drm_debugfs_create_files(drm_debugfs_list, DRM_DEBUGFS_ENTRIES, + minor->debugfs_root, minor); - if (drm_drv_uses_atomic_modeset(dev)) { - ret = drm_atomic_debugfs_init(minor); - if (ret) { - DRM_ERROR("Failed to create atomic debugfs files\n"); - return ret; - } - } + if (drm_drv_uses_atomic_modeset(dev)) + drm_atomic_debugfs_init(minor); if (drm_core_check_feature(dev, DRIVER_MODESET)) { - ret = drm_framebuffer_debugfs_init(minor); - if (ret) { - DRM_ERROR("Failed to create framebuffer debugfs file\n"); - return ret; - } + drm_framebuffer_debugfs_init(minor); - ret = drm_client_debugfs_init(minor); - if (ret) { - DRM_ERROR("Failed to create client debugfs file\n"); - return ret; - } + drm_client_debugfs_init(minor); } - if (dev->driver->debugfs_init) { - ret = dev->driver->debugfs_init(minor); - if (ret) { - DRM_ERROR("DRM: Driver failed to initialize " - "/sys/kernel/debug/dri.\n"); - return ret; - } - } + if (dev->driver->debugfs_init) + dev->driver->debugfs_init(minor); + return 0; } - int drm_debugfs_remove_files(const struct drm_info_list *files, int count, struct drm_minor *minor) { diff --git a/include/drm/drm_debugfs.h b/include/drm/drm_debugfs.h index 7501e323d383..4d028cc1fd37 100644 --- a/include/drm/drm_debugfs.h +++ b/include/drm/drm_debugfs.h @@ -80,9 +80,9 @@ struct drm_info_node { }; #if defined(CONFIG_DEBUG_FS) -int drm_debugfs_create_files(const struct drm_info_list *files, - int count, struct dentry *root, - struct drm_minor *minor); +void 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); #else From patchwork Thu Feb 27 12:02:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wambui Karuga X-Patchwork-Id: 11408555 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id ACCF314B4 for ; Thu, 27 Feb 2020 12:59:50 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8B7DA24693 for ; Thu, 27 Feb 2020 12:59:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="kcwliqw0" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8B7DA24693 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 187AA6ECAC; Thu, 27 Feb 2020 12:59:40 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) by gabe.freedesktop.org (Postfix) with ESMTPS id 584F56E885 for ; Thu, 27 Feb 2020 12:02:50 +0000 (UTC) Received: by mail-wr1-x442.google.com with SMTP id j7so2944874wrp.13 for ; Thu, 27 Feb 2020 04:02:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=FMAbn81YysGaNx3Ax4N9Hbye6l0w3UkvwB+0d6uRaC8=; b=kcwliqw0h7kmfEHfB6QGxy7vTmRIohokuOQhZsvpGsRsNyHsLL5b9Piu0IOBLciQcw lsm1NB22ZrI9j/RkzHHkVklamX1IsggcqtWnwMFudSDIZowCkyTZ9He1EO5xj1AGtwzr EG3bhfx8QuoWa4JJgaH19u/2/hyUsfV2/KdXaWVzbswY4HOjL4tbq2T9jo/MJndsxjGW 9A0exSGYqbyY/vEl5i3hs/8nM+nJjTd2h0vDplIS+qu6YhJAj87MmHeYvXfklgDCsPRn sZW7BfemZtXqCVjmoUB3Ad3t5Aei+CQpPoZl80+uvXBDURc0Q6SvksjPCC97vP+i7SNo gqow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=FMAbn81YysGaNx3Ax4N9Hbye6l0w3UkvwB+0d6uRaC8=; b=CLJ6u2uLEU0oESBn5EU2YCrJLBE32QQ4ss+W7Dfw+AgjGIZbqIlqCMy9rzEN+gWFjR 8CYLPL7nhEgwdK/E/7N+GFiH/I56gQ4vP/vvD901roaXYgNp+CjaFVYVBhKFnj9wyjvN CpJ+D3i1mfU0dz0qhZ4e08069LodVht30Nyht/J3c7/YOQYa7OO/gUK1BzqBGw9ZK/+V IcU0raCs2/u5+DV/O1Yb6gSrfSJK3hOcK14/52ppnYj70szWrREjyxe+F54x/xkyoFzz bVxjlrOtbDXKDi2TuUrmTr4hdskjy8awlo8mDxBa672sgC1YxyNn4VbGs4B5zzPbD2XZ N3zA== X-Gm-Message-State: APjAAAWNit7arKVhnNgeUnOvMMrEm0/5Uf2bSbtzt1YM+TySYMhKy5Ak BexGtli4N9FE1Cgdvyr7Lq0= X-Google-Smtp-Source: APXvYqx7FoldVgWhVom1JC/YSiCcWptuniuidY1zT9ZaeFkvv9JU1Km0AG6pK3zl6XCQGzNQisUoQA== X-Received: by 2002:adf:db84:: with SMTP id u4mr4589350wri.317.1582804969099; Thu, 27 Feb 2020 04:02:49 -0800 (PST) Received: from wambui.zuku.co.ke ([197.237.61.225]) by smtp.googlemail.com with ESMTPSA id t10sm7655017wru.59.2020.02.27.04.02.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Feb 2020 04:02:48 -0800 (PST) From: Wambui Karuga To: daniel@ffwll.ch, airlied@linux.ie, mripard@kernel.org, maarten.lankhorst@linux.intel.com, tzimmermann@suse.de Subject: [PATCH 02/21] drm: convert the drm_driver.debugfs_init() hook to return void. Date: Thu, 27 Feb 2020 15:02:13 +0300 Message-Id: <20200227120232.19413-3-wambui.karugax@gmail.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200227120232.19413-1-wambui.karugax@gmail.com> References: <20200227120232.19413-1-wambui.karugax@gmail.com> MIME-Version: 1.0 X-Mailman-Approved-At: Thu, 27 Feb 2020 12:59:10 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" As a result of commit 987d65d01356 (drm: debugfs: make drm_debugfs_create_files() never fail) and changes to various debugfs functions in drm/core and across various drivers, there is no need for the drm_driver.debugfs_init() hook to have a return value. Therefore, declare it as void. Signed-off-by: Wambui Karuga --- include/drm/drm_drv.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/drm/drm_drv.h b/include/drm/drm_drv.h index 97109df5beac..c6ae888c672b 100644 --- a/include/drm/drm_drv.h +++ b/include/drm/drm_drv.h @@ -323,7 +323,7 @@ struct drm_driver { * * Allows drivers to create driver-specific debugfs files. */ - int (*debugfs_init)(struct drm_minor *minor); + void (*debugfs_init)(struct drm_minor *minor); /** * @gem_free_object: deconstructor for drm_gem_objects From patchwork Thu Feb 27 12:02:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wambui Karuga X-Patchwork-Id: 11408541 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 72408924 for ; Thu, 27 Feb 2020 12:59:22 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 20A2824693 for ; Thu, 27 Feb 2020 12:59:22 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="mS/SQ/Ff" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 20A2824693 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3D1BA6E8CB; Thu, 27 Feb 2020 12:59:16 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7D9656EC94 for ; Thu, 27 Feb 2020 12:02:54 +0000 (UTC) Received: by mail-wr1-x443.google.com with SMTP id y17so2995070wrn.6 for ; Thu, 27 Feb 2020 04:02:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=hzppef4BJunGtSqUEs9qFTuC3AbcvnqYyUkjMbmkHM8=; b=mS/SQ/FfVlFzndl6TvaUp2euA7txpxt6OY8g5TkPEKDeO3z4TWgirzqKTvzhoBsGgo BOKqyL2p/l6dC2l4uc9ZExg+kyi5SewPGNOuUSkizF8GspyvgQ0fL+4pFkYsOvdNe8qs PQpvF5LB8gvwn8sSHkBVgYs6u4oaweqHRfBOeuAAMTDYxNKl87mfQOLZhORP0WrHfYft Yc/ZI/1VA97xOeWkJwYRNpPZyXXjiIRkdkt+351y85GZ56+5R417lXhieIKNkc1H80Pn YKaW202BTYNMTz4nxl9QicYnf+gVNu23EFTMuqM50NWwNR+UDW8HzSA3npaaiHsBXex3 sYqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=hzppef4BJunGtSqUEs9qFTuC3AbcvnqYyUkjMbmkHM8=; b=Rigri9/FffdXcy6ySTJbcQCDQp3sWC3DX2OSrSjI16LH2BRWWe78EpCBUkmIMbxmuV mZLsKBlN0srgy5r4AjZFZcjt7Yh43hQz6IS7fLjw040QSQG/sldmOCZ36PYYwN0sRV30 Jpgwg9w9Er2olsPeR4vR+YOxpNsiZd1nl/NsdHLswe1O5SUz7XPRN1gxBg+pALt6Ks73 6Rmfa5IHy4AKbJv3JSgGmXVXKGdtdeMCfHLl/dtivmp6P2FbjmXx401iuzYso/uwmooY jsl3CgW+WWOa4qt0/05HGaRyjEGCOxgAYc8zEqnldcy5hi3mTTXAwUWPNh5EJRByjRyU bKzA== X-Gm-Message-State: APjAAAW9ka+8WIN84yOcE69mLv0RrkoITaYNtqEdFYRYw+SR8KFhAzSz gqeneuboQCCydlEVBGgvin8= X-Google-Smtp-Source: APXvYqw1LKi63DfoJA/bsez9eXzpdWdTO2EiKYpktEZc2TxtMs4XIfVV8ZovRQEVIJI/SQc391HeHw== X-Received: by 2002:adf:fa05:: with SMTP id m5mr4675637wrr.352.1582804973171; Thu, 27 Feb 2020 04:02:53 -0800 (PST) Received: from wambui.zuku.co.ke ([197.237.61.225]) by smtp.googlemail.com with ESMTPSA id t10sm7655017wru.59.2020.02.27.04.02.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Feb 2020 04:02:52 -0800 (PST) From: Wambui Karuga To: daniel@ffwll.ch, airlied@linux.ie, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de Subject: [PATCH 03/21] drm: convert drm_debugfs functions to return void Date: Thu, 27 Feb 2020 15:02:14 +0300 Message-Id: <20200227120232.19413-4-wambui.karugax@gmail.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200227120232.19413-1-wambui.karugax@gmail.com> References: <20200227120232.19413-1-wambui.karugax@gmail.com> MIME-Version: 1.0 X-Mailman-Approved-At: Thu, 27 Feb 2020 12:59:10 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Since 987d65d01356 (drm: debugfs: make drm_debugfs_create_files() never fail), drm_debug_create_files() never fails and should return void. Therefore, drop return value from various drm_debugfs functions that return drm_debug_create_files() and convert the functions to return void. Signed-off-by: Wambui Karuga --- drivers/gpu/drm/drm_atomic.c | 8 ++++---- drivers/gpu/drm/drm_client.c | 8 ++++---- drivers/gpu/drm/drm_crtc_internal.h | 2 +- drivers/gpu/drm/drm_framebuffer.c | 8 ++++---- drivers/gpu/drm/drm_internal.h | 2 +- include/drm/drm_client.h | 2 +- 6 files changed, 15 insertions(+), 15 deletions(-) diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c index 9ccfbf213d72..965173fd0ac2 100644 --- a/drivers/gpu/drm/drm_atomic.c +++ b/drivers/gpu/drm/drm_atomic.c @@ -1641,10 +1641,10 @@ static const struct drm_info_list drm_atomic_debugfs_list[] = { {"state", drm_state_info, 0}, }; -int drm_atomic_debugfs_init(struct drm_minor *minor) +void drm_atomic_debugfs_init(struct drm_minor *minor) { - return drm_debugfs_create_files(drm_atomic_debugfs_list, - ARRAY_SIZE(drm_atomic_debugfs_list), - minor->debugfs_root, minor); + drm_debugfs_create_files(drm_atomic_debugfs_list, + ARRAY_SIZE(drm_atomic_debugfs_list), + minor->debugfs_root, minor); } #endif diff --git a/drivers/gpu/drm/drm_client.c b/drivers/gpu/drm/drm_client.c index b031b45aa8ef..2a147d1c3a13 100644 --- a/drivers/gpu/drm/drm_client.c +++ b/drivers/gpu/drm/drm_client.c @@ -457,10 +457,10 @@ static const struct drm_info_list drm_client_debugfs_list[] = { { "internal_clients", drm_client_debugfs_internal_clients, 0 }, }; -int drm_client_debugfs_init(struct drm_minor *minor) +void drm_client_debugfs_init(struct drm_minor *minor) { - return drm_debugfs_create_files(drm_client_debugfs_list, - ARRAY_SIZE(drm_client_debugfs_list), - minor->debugfs_root, minor); + drm_debugfs_create_files(drm_client_debugfs_list, + ARRAY_SIZE(drm_client_debugfs_list), + minor->debugfs_root, minor); } #endif diff --git a/drivers/gpu/drm/drm_crtc_internal.h b/drivers/gpu/drm/drm_crtc_internal.h index 16f2413403aa..1b620ba9244b 100644 --- a/drivers/gpu/drm/drm_crtc_internal.h +++ b/drivers/gpu/drm/drm_crtc_internal.h @@ -224,7 +224,7 @@ int drm_mode_dirtyfb_ioctl(struct drm_device *dev, /* drm_atomic.c */ #ifdef CONFIG_DEBUG_FS struct drm_minor; -int drm_atomic_debugfs_init(struct drm_minor *minor); +void drm_atomic_debugfs_init(struct drm_minor *minor); #endif int __drm_atomic_helper_disable_plane(struct drm_plane *plane, diff --git a/drivers/gpu/drm/drm_framebuffer.c b/drivers/gpu/drm/drm_framebuffer.c index 57ac94ce9b9e..0375b3d7f8d0 100644 --- a/drivers/gpu/drm/drm_framebuffer.c +++ b/drivers/gpu/drm/drm_framebuffer.c @@ -1207,10 +1207,10 @@ static const struct drm_info_list drm_framebuffer_debugfs_list[] = { { "framebuffer", drm_framebuffer_info, 0 }, }; -int drm_framebuffer_debugfs_init(struct drm_minor *minor) +void drm_framebuffer_debugfs_init(struct drm_minor *minor) { - return drm_debugfs_create_files(drm_framebuffer_debugfs_list, - ARRAY_SIZE(drm_framebuffer_debugfs_list), - minor->debugfs_root, minor); + drm_debugfs_create_files(drm_framebuffer_debugfs_list, + ARRAY_SIZE(drm_framebuffer_debugfs_list), + minor->debugfs_root, minor); } #endif diff --git a/drivers/gpu/drm/drm_internal.h b/drivers/gpu/drm/drm_internal.h index aeec2e68d772..f0c99d00b201 100644 --- a/drivers/gpu/drm/drm_internal.h +++ b/drivers/gpu/drm/drm_internal.h @@ -235,7 +235,7 @@ int drm_syncobj_query_ioctl(struct drm_device *dev, void *data, /* drm_framebuffer.c */ void drm_framebuffer_print_info(struct drm_printer *p, unsigned int indent, const struct drm_framebuffer *fb); -int drm_framebuffer_debugfs_init(struct drm_minor *minor); +void drm_framebuffer_debugfs_init(struct drm_minor *minor); /* drm_hdcp.c */ int drm_setup_hdcp_srm(struct class *drm_class); diff --git a/include/drm/drm_client.h b/include/drm/drm_client.h index 3ed5dee899fd..7402f852d3c4 100644 --- a/include/drm/drm_client.h +++ b/include/drm/drm_client.h @@ -188,6 +188,6 @@ int drm_client_modeset_dpms(struct drm_client_dev *client, int mode); drm_for_each_connector_iter(connector, iter) \ if (connector->connector_type != DRM_MODE_CONNECTOR_WRITEBACK) -int drm_client_debugfs_init(struct drm_minor *minor); +void drm_client_debugfs_init(struct drm_minor *minor); #endif From patchwork Thu Feb 27 12:02:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wambui Karuga X-Patchwork-Id: 11408543 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8976F14B4 for ; Thu, 27 Feb 2020 12:59:26 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 67CC724693 for ; Thu, 27 Feb 2020 12:59:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="vdInBT6S" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 67CC724693 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3E3EF6ECA3; Thu, 27 Feb 2020 12:59:17 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wm1-x344.google.com (mail-wm1-x344.google.com [IPv6:2a00:1450:4864:20::344]) by gabe.freedesktop.org (Postfix) with ESMTPS id CB6246E885 for ; Thu, 27 Feb 2020 12:02:58 +0000 (UTC) Received: by mail-wm1-x344.google.com with SMTP id i10so5727024wmd.1 for ; Thu, 27 Feb 2020 04:02:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=LFKRLVR3En2qAyWAFyjSG1BfnWs6i3rEBFI+3Z3Uh14=; b=vdInBT6S+Cz7AIQeFEX/HBaX1a273oG5ysqqQNm6tMxsB11TcE6gB7Qk7dSWeJk+dR +UdWmHGvW/PT2YtbbK/p6BxPnkCfSkaXP60ZOmuwNesmvONeuAn/hneMI1pfBdhL0pBW TtEWwU4gp2vmK/cWYrqWWyGPF0Bk8fmwDpyAWbZly5vhqdXPVAXFR6VGTaNFFo+5S2gh DEtiqgzQUC41JK3cQ1LVa+siCwhhbGyvkPuOCbGFoRfVLZtYoc69I/8Ch6159+ee21E3 2ZPsrUKSFCC2he7B22o8IFsQGT1CcU1NSHwhjNO7XgcfQnaWrOutEdrBvrc0/rf1GOQx +chA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=LFKRLVR3En2qAyWAFyjSG1BfnWs6i3rEBFI+3Z3Uh14=; b=bw+SzOl2OrafN7lA8pRkv6ClXr9l8NIdjGo2sC8Hn+WP8Tw32S6CyU2BVhwgvcVvk4 F+MTdahT0CFJFzTg2AapJvQvJGd83Jt6Yk40OCniVU2sNbJO1r+3uTj3lK4gyrY1nDW9 edyzpE7zrEq8+oUOoO+BO6WIxYCotc06S2zpeYyE3fxQ7w0KxhUcWikcMeVP7mykwwXI PA0Mr2qdkp3KBzK08Iq4y2CmOcWXzbCo73c0PNIKeCUvWwYV/Cpyrdp8SMqtcB3CB1MR V4H/n9tbdxX1oemIuJVzl51hABUzUSc5JUm2zZ7ZIeRWyPI+EOXaqDNkELU8OZ1ijhm1 Re0w== X-Gm-Message-State: APjAAAXklfx0+n1bGdkeKIw7ExS3fXJiWMc3wPbBWbU5rKcqdv/jqJSn RXFaSIBSp9WuMs6WCYs+lhU= X-Google-Smtp-Source: APXvYqzgXMIf7d0ygpseoochEgHCgZpMjbGcGRwlunhf+x0Lp5zstDVWt367HgvoaXcO0f8N7F5PJQ== X-Received: by 2002:a1c:a443:: with SMTP id n64mr4733588wme.141.1582804977474; Thu, 27 Feb 2020 04:02:57 -0800 (PST) Received: from wambui.zuku.co.ke ([197.237.61.225]) by smtp.googlemail.com with ESMTPSA id t10sm7655017wru.59.2020.02.27.04.02.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Feb 2020 04:02:56 -0800 (PST) From: Wambui Karuga To: daniel@ffwll.ch, airlied@linux.ie, Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann Subject: [PATCH 04/21] drm/vram-helper: make drm_vram_mm_debugfs_init() return void Date: Thu, 27 Feb 2020 15:02:15 +0300 Message-Id: <20200227120232.19413-5-wambui.karugax@gmail.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200227120232.19413-1-wambui.karugax@gmail.com> References: <20200227120232.19413-1-wambui.karugax@gmail.com> MIME-Version: 1.0 X-Mailman-Approved-At: Thu, 27 Feb 2020 12:59:10 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Since 987d65d01356 (drm: debugfs: make drm_debugfs_create_files() never fail), drm_debugfs_create_files() never fails and should return void. Therefore, remove its use as the return value of drm_vram_mm_debugfs_init(), and have the function declared as void instead. Signed-off-by: Wambui Karuga Reviewed-by: Thomas Zimmermann --- drivers/gpu/drm/drm_gem_vram_helper.c | 14 ++++---------- include/drm/drm_gem_vram_helper.h | 2 +- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/drm_gem_vram_helper.c b/drivers/gpu/drm/drm_gem_vram_helper.c index 92a11bb42365..76506bedac11 100644 --- a/drivers/gpu/drm/drm_gem_vram_helper.c +++ b/drivers/gpu/drm/drm_gem_vram_helper.c @@ -1042,20 +1042,14 @@ static const struct drm_info_list drm_vram_mm_debugfs_list[] = { * * @minor: drm minor device. * - * Returns: - * 0 on success, or - * a negative error code otherwise. */ -int drm_vram_mm_debugfs_init(struct drm_minor *minor) +void drm_vram_mm_debugfs_init(struct drm_minor *minor) { - int ret = 0; - #if defined(CONFIG_DEBUG_FS) - ret = drm_debugfs_create_files(drm_vram_mm_debugfs_list, - ARRAY_SIZE(drm_vram_mm_debugfs_list), - minor->debugfs_root, minor); + drm_debugfs_create_files(drm_vram_mm_debugfs_list, + ARRAY_SIZE(drm_vram_mm_debugfs_list), + minor->debugfs_root, minor); #endif - return ret; } EXPORT_SYMBOL(drm_vram_mm_debugfs_init); diff --git a/include/drm/drm_gem_vram_helper.h b/include/drm/drm_gem_vram_helper.h index 0f6e47213d8d..b63bcd1b996d 100644 --- a/include/drm/drm_gem_vram_helper.h +++ b/include/drm/drm_gem_vram_helper.h @@ -196,7 +196,7 @@ static inline struct drm_vram_mm *drm_vram_mm_of_bdev( return container_of(bdev, struct drm_vram_mm, bdev); } -int drm_vram_mm_debugfs_init(struct drm_minor *minor); +void drm_vram_mm_debugfs_init(struct drm_minor *minor); /* * Helpers for integration with struct drm_device From patchwork Thu Feb 27 12:02:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wambui Karuga X-Patchwork-Id: 11408565 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 66E45924 for ; Thu, 27 Feb 2020 12:59:57 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4510F24693 for ; Thu, 27 Feb 2020 12:59:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="kEOqiWPc" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4510F24693 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 34EC96ECB3; Thu, 27 Feb 2020 12:59:41 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wm1-x344.google.com (mail-wm1-x344.google.com [IPv6:2a00:1450:4864:20::344]) by gabe.freedesktop.org (Postfix) with ESMTPS id 978FF6EC94 for ; Thu, 27 Feb 2020 12:03:02 +0000 (UTC) Received: by mail-wm1-x344.google.com with SMTP id t23so3259768wmi.1 for ; Thu, 27 Feb 2020 04:03:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=4fFxtd2alUAmDwPqREqD0hmlK9QgvDgPrbdGklXtT8Q=; b=kEOqiWPcKOo2uudX4IJh02QKkSzl+Yj6CrbhJNJsBDkpi/BKDKUsJXQZlC+BeybXc9 LrzQ752Bg/EVv6ae+ab93XL/7ZBBY1pRJCrN1rY9Lewu85ppogh1mna0z7fed2zF7p7R Vkl84PFvXCQYfnFmDwdnfY5CVx/5qWGxxM+7GCvR7izZmVbu3zfpFsal+VzSz1yB/pHd +bvkPw3gJoDd/wYKyuEgIFn28eSEV+Nowg7yBrXPlud1eki3NpOSoxSijbQK8SQmKpEW Pbk947uhgltMnciutcWElWAuSn7k4Z9bgsnFBdVvaDRcG57jlg1bfGLVbaRu7Xcay7Wb Sg4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=4fFxtd2alUAmDwPqREqD0hmlK9QgvDgPrbdGklXtT8Q=; b=QlLNzjZuCEmi65cX7HF0a+oUPEyKJ/dQ04qeMx/ZjjslkCaaMMEoX81VWov52vx4YV JJntJ7n49knYBHbwTrbnp1JxR33bCT9QzkX7sV7GfcDWbaRc6Iygj7gXB2XYOORIxK3v Rn+Y4L/NpcdBJomRuvGhdVGFthYOGs6L6j29pdsSvORLGfvQ0xsekshJjHHcN8Yj3YCJ 3b+GPB3HnjZUsHTcQBpwGFdqqv1UKMPTVjyH5ld+fw3XUha7ZyOUmuSBJxiemrBPgcKP fYyUUD+S0XoLAIqqzWUSVAr15yFKqO8cu2EhnnJ4Bu4IhNq7MvBrss6+eR3LRK0gld6y mwEw== X-Gm-Message-State: APjAAAWwEWh1jgJq5uEYhlwekNxEMIQJ8TqXwutdTcH1k1PbTLFc2O/2 3Ad7X5aMNvWqhQ2AmddN7eI= X-Google-Smtp-Source: APXvYqwEY8Y+d/oV+yJH9lF9a946Az5Xl87bfcopNONxFys9u3gI6iu4vbW3C0rxP+gtf+eEVkXJJw== X-Received: by 2002:a05:600c:218d:: with SMTP id e13mr5108729wme.102.1582804981274; Thu, 27 Feb 2020 04:03:01 -0800 (PST) Received: from wambui.zuku.co.ke ([197.237.61.225]) by smtp.googlemail.com with ESMTPSA id t10sm7655017wru.59.2020.02.27.04.02.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Feb 2020 04:03:00 -0800 (PST) From: Wambui Karuga To: daniel@ffwll.ch, airlied@linux.ie, Eric Anholt Subject: [PATCH 05/21] drm/vc4: remove check of return value of drm_debugfs functions Date: Thu, 27 Feb 2020 15:02:16 +0300 Message-Id: <20200227120232.19413-6-wambui.karugax@gmail.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200227120232.19413-1-wambui.karugax@gmail.com> References: <20200227120232.19413-1-wambui.karugax@gmail.com> MIME-Version: 1.0 X-Mailman-Approved-At: Thu, 27 Feb 2020 12:59:10 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Since 987d65d01356 (drm: debugfs: make drm_debugfs_create_files() never fail), drm_debugfs_create_files() never fails and should return void. Therefore, remove unnecessary check and error handling for the return value of drm_debugfs_create_files() in vc4_debugfs_init(). This change also allows vc4_debugfs_init() to be declared as void. Signed-off-by: Wambui Karuga --- drivers/gpu/drm/vc4/vc4_debugfs.c | 11 +++-------- drivers/gpu/drm/vc4/vc4_drv.h | 2 +- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_debugfs.c b/drivers/gpu/drm/vc4/vc4_debugfs.c index b61b2d3407b5..4fbbf980a299 100644 --- a/drivers/gpu/drm/vc4/vc4_debugfs.c +++ b/drivers/gpu/drm/vc4/vc4_debugfs.c @@ -20,7 +20,7 @@ struct vc4_debugfs_info_entry { * Called at drm_dev_register() time on each of the minors registered * by the DRM device, to attach the debugfs files. */ -int +void vc4_debugfs_init(struct drm_minor *minor) { struct vc4_dev *vc4 = to_vc4_dev(minor->dev); @@ -30,14 +30,9 @@ vc4_debugfs_init(struct drm_minor *minor) minor->debugfs_root, &vc4->load_tracker_enabled); list_for_each_entry(entry, &vc4->debugfs_list, link) { - int ret = drm_debugfs_create_files(&entry->info, 1, - minor->debugfs_root, minor); - - if (ret) - return ret; + drm_debugfs_create_files(&entry->info, 1, + minor->debugfs_root, minor); } - - return 0; } static int vc4_debugfs_regset32(struct seq_file *m, void *unused) diff --git a/drivers/gpu/drm/vc4/vc4_drv.h b/drivers/gpu/drm/vc4/vc4_drv.h index f90c0d08e740..cd0f9ef41fa2 100644 --- a/drivers/gpu/drm/vc4/vc4_drv.h +++ b/drivers/gpu/drm/vc4/vc4_drv.h @@ -750,7 +750,7 @@ void vc4_crtc_get_margins(struct drm_crtc_state *state, unsigned int *top, unsigned int *bottom); /* vc4_debugfs.c */ -int vc4_debugfs_init(struct drm_minor *minor); +void vc4_debugfs_init(struct drm_minor *minor); #ifdef CONFIG_DEBUG_FS void vc4_debugfs_add_file(struct drm_device *drm, const char *filename, From patchwork Thu Feb 27 12:02:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wambui Karuga X-Patchwork-Id: 11408569 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 26FE314B4 for ; Thu, 27 Feb 2020 13:00:00 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 04CE024693 for ; Thu, 27 Feb 2020 13:00:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Wx2LFnuM" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 04CE024693 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 250F06ECB2; Thu, 27 Feb 2020 12:59:41 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3C0E86E86D for ; Thu, 27 Feb 2020 12:03:07 +0000 (UTC) Received: by mail-wr1-x442.google.com with SMTP id j16so1455390wrt.3 for ; Thu, 27 Feb 2020 04:03:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=5/va7+F8irn0jXAyeut2JlQRX+et9as0O+Q8UR0d9EU=; b=Wx2LFnuM84ELcCVBI+fQsZSjh7OAQ2zWLmhPsZmeMoEGTYqS/ZVOQAMceU7fMMuifW iRWw/x5KEMneXJz2CVvUOE8YuMRwsO6hV4vXH/2e929QQ51klNhimRlF7j4QeFsLKYBS aCkov2QzKZm2cbU99uBdgTJDwV94BoKaUJtsEpM6CqDPahTcdZT4E7TLfkg3UWCTOYkG ZUBaJhPHvG9AldY6Z0PowTmpaAW1hwBTBOcbMlZ8Tqw7iM6mc6C97tdZdPsmRAcRZYwe Y4vx9zToGdo97CLUm0jJT2BwF0cG99iZTF1Eg9golfhZfi4yMZdYkSjSQc0cJUCSsx68 JJiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=5/va7+F8irn0jXAyeut2JlQRX+et9as0O+Q8UR0d9EU=; b=JuEDc9wjblBTFXyommJb5Odg4S3/YZcl3JaTJlDELpO2OmWsohgQ9K/2mP+T3NbBum 4Q4KSDAWw5oCAhscOpDeAhgF7Wkcd+wYYAYFNez5fC7VWcDV8IDwVpjM/J2aptndAw/Z 947mVdB1lNBi/xjjftM9Pg48nWReH/mpk1OjyPTIhWbPKXpoXPZbInA7fUkiKbEwGf/9 pMBqhWPIzksFulMbm5LzvE8c2fY9zx7vpTp8y0AOledEVJOW89RB2pmFT6Pg8LBelxpp jxZcCEReExVfxvYU/F+C53vGW3dY7U0v+abNLKTp66yO5MmwqgSQ2+j3fbGkaCK24W+3 lQFQ== X-Gm-Message-State: APjAAAUF1sqv9bAlpb77LxUsF/j6/CGlzp+S1GJwRp+c0fNJJMCpZNC5 uUXgq84Pwd0tzU41BCH/XAc= X-Google-Smtp-Source: APXvYqz7QyLiZZ3viPcMv1W4f/pZTLGJ3nj6EoflfhAnaBTBu+uKHbrIVlh2oDh/yh4cCsiZZk0pdg== X-Received: by 2002:a05:6000:1147:: with SMTP id d7mr4646817wrx.142.1582804985519; Thu, 27 Feb 2020 04:03:05 -0800 (PST) Received: from wambui.zuku.co.ke ([197.237.61.225]) by smtp.googlemail.com with ESMTPSA id t10sm7655017wru.59.2020.02.27.04.03.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Feb 2020 04:03:04 -0800 (PST) From: Wambui Karuga To: daniel@ffwll.ch, airlied@linux.ie, Alexey Brodkin Subject: [PATCH 06/21] drm/arc: make arcpgu_debugfs_init return void Date: Thu, 27 Feb 2020 15:02:17 +0300 Message-Id: <20200227120232.19413-7-wambui.karugax@gmail.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200227120232.19413-1-wambui.karugax@gmail.com> References: <20200227120232.19413-1-wambui.karugax@gmail.com> MIME-Version: 1.0 X-Mailman-Approved-At: Thu, 27 Feb 2020 12:59:10 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Since commit 987d65d01356 (drm: debugfs: make drm_debugfs_create_files() never fail), drm_debugfs_create_files never fails and should return void. Therefore, remove its use as the return value of arcpgu_debugfs_init and have the latter function also return void. Signed-off-by: Wambui Karuga Acked-by: Alexey Brodkin --- drivers/gpu/drm/arc/arcpgu_drv.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/arc/arcpgu_drv.c b/drivers/gpu/drm/arc/arcpgu_drv.c index d6a6692db0ac..c05d001163e0 100644 --- a/drivers/gpu/drm/arc/arcpgu_drv.c +++ b/drivers/gpu/drm/arc/arcpgu_drv.c @@ -137,10 +137,11 @@ static struct drm_info_list arcpgu_debugfs_list[] = { { "clocks", arcpgu_show_pxlclock, 0 }, }; -static int arcpgu_debugfs_init(struct drm_minor *minor) +static void arcpgu_debugfs_init(struct drm_minor *minor) { - return drm_debugfs_create_files(arcpgu_debugfs_list, - ARRAY_SIZE(arcpgu_debugfs_list), minor->debugfs_root, minor); + drm_debugfs_create_files(arcpgu_debugfs_list, + ARRAY_SIZE(arcpgu_debugfs_list), + minor->debugfs_root, minor); } #endif From patchwork Thu Feb 27 12:02:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wambui Karuga X-Patchwork-Id: 11408559 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5D694924 for ; Thu, 27 Feb 2020 12:59:53 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3C25724693 for ; Thu, 27 Feb 2020 12:59:53 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="hv+UeTqh" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3C25724693 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E09D66ECAB; Thu, 27 Feb 2020 12:59:39 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) by gabe.freedesktop.org (Postfix) with ESMTPS id BCF656E875 for ; Thu, 27 Feb 2020 12:03:11 +0000 (UTC) Received: by mail-wr1-x442.google.com with SMTP id r7so717712wro.2 for ; Thu, 27 Feb 2020 04:03:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=vBk1mOoIZkyy9kqJiXLBO3UKN8y6Y0f/CztnD4P9tt4=; b=hv+UeTqhEqBHGOJ71CcKZK7jNNFHkqb8OREk/ICLS/IBO0ochCWX+7fYTynoHXyfrV XOkxQ06JhpmEmD4pze6CpmWcSmLyvWkmJvDaOYM0zAz3crWlm0NZvoS3pxLw1ClY8rTy Hj7vrv98j/kmDnErCzwPbHSbRMebWWANg5yV/7BHW/Ipc22cU+5pVJid6m9bG8gIRmNj A9fmYw1Rqejt/Dus6KooWECm4Re5iNeqJSy2EyI+YkEqemsP8htTpAxXenssNKJiqmD2 s+TcvN8vNYANeMzyKNvdVpxVw4Rox1bcFNC6Qqq9xqmWnZXGw3+SkJPQnC2Lz7UfMxMV ksXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=vBk1mOoIZkyy9kqJiXLBO3UKN8y6Y0f/CztnD4P9tt4=; b=TBOSNskgjo+G8Q75Eqir/z00EXiEOAIcai53t/zSBdH2b/6shk626mnD8EDeWRBDTS +MOmC5Rg9+FwEJfCHE983oVRLO+PceHt7yQS5J+Qfe65vtomIn52E13oXaYN1xpnYMjt cLQnhO45rm7/hzaJ0zzArpm9MlG+8rkk4Xl45ZQFZxVyZDGzNvZZ3IfE5UTlYiTK+zy2 NTmbNZKvFmhrgiDqJyL/MQzk7y6vzClbxaa8YHDODgmi1OYwM2i57RC6FFXXlyKUtJgW PrEMtqDR1E6LqHqJicqwy5PlIDqSg2ZteXdUyTL8+VP4k5UjRTU95fv0bt4HUyuuwOlA Af2Q== X-Gm-Message-State: APjAAAXnkZPSaKDEyUAw8zjewQ6iVm6m+GMcP6aQgKP6BrE7dF11TFfp titzCn0RkjlYVVUc9lrbgW4= X-Google-Smtp-Source: APXvYqwHljKkgGdkShlOylDLJXesMCIatBDxUYDaXf8JUNo/KPQvR2rE6Fv76uPz2LtaEEmXpQ0exA== X-Received: by 2002:a5d:4902:: with SMTP id x2mr2687634wrq.301.1582804989529; Thu, 27 Feb 2020 04:03:09 -0800 (PST) Received: from wambui.zuku.co.ke ([197.237.61.225]) by smtp.googlemail.com with ESMTPSA id t10sm7655017wru.59.2020.02.27.04.03.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Feb 2020 04:03:09 -0800 (PST) From: Wambui Karuga To: daniel@ffwll.ch, airlied@linux.ie, Liviu Dudau , Brian Starkey Subject: [PATCH 07/21] drm/arm: make hdlcd_debugfs_init() return void Date: Thu, 27 Feb 2020 15:02:18 +0300 Message-Id: <20200227120232.19413-8-wambui.karugax@gmail.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200227120232.19413-1-wambui.karugax@gmail.com> References: <20200227120232.19413-1-wambui.karugax@gmail.com> MIME-Version: 1.0 X-Mailman-Approved-At: Thu, 27 Feb 2020 12:59:10 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Since commit 987d65d01356 (drm: debugfs: make drm_debugfs_create_files() never fail), drm_debugfs_create_files() never fails, and should return void. Therefore, remove its use as a return value in hdlcd_debugfs_init and have the latter function return void. Signed-off-by: Wambui Karuga Acked-by: Liviu Dudau --- drivers/gpu/drm/arm/hdlcd_drv.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/arm/hdlcd_drv.c b/drivers/gpu/drm/arm/hdlcd_drv.c index 2e053815b54a..194419f47c5e 100644 --- a/drivers/gpu/drm/arm/hdlcd_drv.c +++ b/drivers/gpu/drm/arm/hdlcd_drv.c @@ -224,10 +224,11 @@ static struct drm_info_list hdlcd_debugfs_list[] = { { "clocks", hdlcd_show_pxlclock, 0 }, }; -static int hdlcd_debugfs_init(struct drm_minor *minor) +static void hdlcd_debugfs_init(struct drm_minor *minor) { - return drm_debugfs_create_files(hdlcd_debugfs_list, - ARRAY_SIZE(hdlcd_debugfs_list), minor->debugfs_root, minor); + drm_debugfs_create_files(hdlcd_debugfs_list, + ARRAY_SIZE(hdlcd_debugfs_list), + minor->debugfs_root, minor); } #endif From patchwork Thu Feb 27 12:02:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wambui Karuga X-Patchwork-Id: 11408547 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E890E14B4 for ; Thu, 27 Feb 2020 12:59:29 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C714424693 for ; Thu, 27 Feb 2020 12:59:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="BZv8TNID" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C714424693 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1250B6ECA6; Thu, 27 Feb 2020 12:59:18 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wm1-x343.google.com (mail-wm1-x343.google.com [IPv6:2a00:1450:4864:20::343]) by gabe.freedesktop.org (Postfix) with ESMTPS id 729CF6E885; Thu, 27 Feb 2020 12:03:15 +0000 (UTC) Received: by mail-wm1-x343.google.com with SMTP id a5so3257897wmb.0; Thu, 27 Feb 2020 04:03:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=mlvu3hS2FOo3jvYAFvg3HmupOT4tMbHUqUGMTdB0I0E=; b=BZv8TNIDUFwIG3XR5jTpC43/0HS4ISDRzsQP4QhE3dlcUIz/WeFLHmAXHaeIvwSsUq R7SxGRHjkL0zokvs3HwE2JaguZE7dCCSigW1UQSHM9lYsy4YaVzC7uJWR9YoDmutR03x rDkXLppqNkYUyr6cMX8MVshvl31rWo7RVgktxVt6SbKEj01xt2iQSuf6cY4rxAzdaSa+ yyIxaYMV17Z8s68a5LXeKaKJpYZ3EitjrqNn85Vsp2s4h3NmP3WfGn0efg86p0CBe3s3 P4zTMd9ufsIk4i2z03Exow5d+8y8vG29XoBfOoDj6fqkgMckKEEdc1+jeVPdvSyFCvak vHXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=mlvu3hS2FOo3jvYAFvg3HmupOT4tMbHUqUGMTdB0I0E=; b=HXSVLqq/b/+Fc38AqkpPPnG7+TSoQN7dgRUuC4mJER57/HfWcMtlShWLUwWBGXI+M2 HR8KiTLGp/zqCtYmg9YdQ+TXBXnZxz+49In44WfKt7ziZKj55d2B8YVDeSwq+UakfkiJ DxwXU7jyS2Vit4nH4FmczDXpioGHJA7eQHPt0fX6PXE0qiRX084Gl7OmRDry/TTiSYfy NhxagjJrVvFy466uzAME2RnLN9BrapKbKR1FWAncBAALbzQCM0hqdLcbJljUXKEqVbcZ 9ZGZk8om5AxHurfIobq8TFHcOvLYpGq5gY9Ncgmjb26QqIBXHa5pHANOBLlRcLtq0Fmb /qNg== X-Gm-Message-State: APjAAAVu5wqKyJldChIKgR9eH8htPniM/JLKRKx3tduaGHnqp/he7fwK Dlu9SWXLK6TqvMrEVr+KL0g= X-Google-Smtp-Source: APXvYqwLTKlxTSe9jq6sfhmtWPDKx6ENvxFA/rCWw8/Sac/kMbjC4rIqOFLUs/Tb4QLjqA2V3FeKrw== X-Received: by 2002:a7b:c119:: with SMTP id w25mr5079981wmi.116.1582804994162; Thu, 27 Feb 2020 04:03:14 -0800 (PST) Received: from wambui.zuku.co.ke ([197.237.61.225]) by smtp.googlemail.com with ESMTPSA id t10sm7655017wru.59.2020.02.27.04.03.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Feb 2020 04:03:13 -0800 (PST) From: Wambui Karuga To: daniel@ffwll.ch, airlied@linux.ie, Lucas Stach , Russell King , Christian Gmeiner Subject: [PATCH 08/21] drm/etnaviv: remove check for return value of drm_debugfs function Date: Thu, 27 Feb 2020 15:02:19 +0300 Message-Id: <20200227120232.19413-9-wambui.karugax@gmail.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200227120232.19413-1-wambui.karugax@gmail.com> References: <20200227120232.19413-1-wambui.karugax@gmail.com> MIME-Version: 1.0 X-Mailman-Approved-At: Thu, 27 Feb 2020 12:59:10 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, etnaviv@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Since commit 987d65d01356 (drm: debugfs: make drm_debugfs_create_files() never fail), drm_debugfs_create_file only returns 0, and there is no need to check the return value. This change therefore removes the check and error handling in etnaviv_debugfs_init() and also makes the function return void. Signed-off-by: Wambui Karuga Reviewed-by: Lucas Stach --- drivers/gpu/drm/etnaviv/etnaviv_drv.c | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/drivers/gpu/drm/etnaviv/etnaviv_drv.c b/drivers/gpu/drm/etnaviv/etnaviv_drv.c index 6b43c1c94e8f..a39735316ca5 100644 --- a/drivers/gpu/drm/etnaviv/etnaviv_drv.c +++ b/drivers/gpu/drm/etnaviv/etnaviv_drv.c @@ -231,21 +231,11 @@ static struct drm_info_list etnaviv_debugfs_list[] = { {"ring", show_each_gpu, 0, etnaviv_ring_show}, }; -static int etnaviv_debugfs_init(struct drm_minor *minor) +static void etnaviv_debugfs_init(struct drm_minor *minor) { - struct drm_device *dev = minor->dev; - int ret; - - ret = drm_debugfs_create_files(etnaviv_debugfs_list, - ARRAY_SIZE(etnaviv_debugfs_list), - minor->debugfs_root, minor); - - if (ret) { - dev_err(dev->dev, "could not install etnaviv_debugfs_list\n"); - return ret; - } - - return ret; + drm_debugfs_create_files(etnaviv_debugfs_list, + ARRAY_SIZE(etnaviv_debugfs_list), + minor->debugfs_root, minor); } #endif From patchwork Thu Feb 27 12:02:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wambui Karuga X-Patchwork-Id: 11408581 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 783BE924 for ; Thu, 27 Feb 2020 13:00:12 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 558502469C for ; Thu, 27 Feb 2020 13:00:12 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="hqt0uVTK" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 558502469C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 693B06ECC4; Thu, 27 Feb 2020 12:59:44 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wm1-x344.google.com (mail-wm1-x344.google.com [IPv6:2a00:1450:4864:20::344]) by gabe.freedesktop.org (Postfix) with ESMTPS id 982776E885; Thu, 27 Feb 2020 12:03:20 +0000 (UTC) Received: by mail-wm1-x344.google.com with SMTP id z12so3231371wmi.4; Thu, 27 Feb 2020 04:03:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=FF1NrpSPuilvGFuBlDAjCo1EkW/20qE/sk6srnRxdwk=; b=hqt0uVTKwEJgrrFViTZSdoN5IyrDGa0MnWpSVpKfzAJ/q4CYucez5Y9GL9cyO3mkIX uPhquZ+n6+onWBaMCPga9B+8QCHT5lbST/AIoFCjP/z9QjtWBRQwCNFykzvp+giIIxHx ftcx33fAul6ms0T/zjnHYprjSfmeXBZ6+Zf3xUPDcfzQYs4saNULJTigGrxmo+Zt4VWb n5F9x6L3itJsG4d9F4cotAAY35c3wH6JIb3TN1Zi5s5loMOSTEw0XMGVtQFlu+HfXvpt Hep3CCkcw9XCJxyArNAUaSfdnFIqgdAY//zqMW3nDOggIgF5Bnjhu41nBBSm7noCtzFP Xh+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=FF1NrpSPuilvGFuBlDAjCo1EkW/20qE/sk6srnRxdwk=; b=M/XOUlhgyiKfSfuQbe4/jLKLuK2y3EfipituZu4Ba976Hjn2drpLjk987r+piEkIGe 9alVZRdJZgCQp5brZAFE0Y9gVvpJ0YeZ2g8OMOlYzYZoqKo4WlPNwgas0byWoU6udP20 KZs0j87ciC9rqtSuiNAhVl21mohIK3FsZ6tdqrXEAeYfyE2q1BkKeX1jzOCGkRrJxeVZ rAmsJsUW1JZESVjwhDi4gMmFMR+hRcKHzZ/GcalFJsbTxfQchgCMCvt02WhwQWXtJ7t5 FvRG3xg8vcsXU/5b3/GF7hZE0rEiEJA2ob+Kj0N0+sJDhywVcOJxL4XVl7irTwR5YA18 /CnA== X-Gm-Message-State: APjAAAX6RbEDqKIuctVFOMIfo3E27gzVpE+bGcacR4Btaz1d2umGmSm7 2spy7dI5BY/S+hJc/k3GUN0= X-Google-Smtp-Source: APXvYqxaNmMPo4uh3u7cD404NdTjAHMYEUcbV9NVopmZg+bCAqm3J+SaBK6YQlOOsAh9UdiCZSuDXg== X-Received: by 2002:a05:600c:218d:: with SMTP id e13mr5110294wme.102.1582804998319; Thu, 27 Feb 2020 04:03:18 -0800 (PST) Received: from wambui.zuku.co.ke ([197.237.61.225]) by smtp.googlemail.com with ESMTPSA id t10sm7655017wru.59.2020.02.27.04.03.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Feb 2020 04:03:17 -0800 (PST) From: Wambui Karuga To: daniel@ffwll.ch, airlied@linux.ie, bskeggs@redhat.com Subject: [PATCH 09/21] drm/nouveau: remove checks for return value of debugfs functions Date: Thu, 27 Feb 2020 15:02:20 +0300 Message-Id: <20200227120232.19413-10-wambui.karugax@gmail.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200227120232.19413-1-wambui.karugax@gmail.com> References: <20200227120232.19413-1-wambui.karugax@gmail.com> MIME-Version: 1.0 X-Mailman-Approved-At: Thu, 27 Feb 2020 12:59:10 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, nouveau@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Since 987d65d01356 (drm: debugfs: make drm_debugfs_create_files() never fail), there is no need to ever check for the the return value of debugfs_create_file() and drm_debugfs_create_files(). Therefore, remove unnecessary checks and error handling in nouveau_drm_debugfs_init. These changes also enable nouveau_drm_debugfs_init() to be declared as void. Signed-off-by: Wambui Karuga --- drivers/gpu/drm/nouveau/nouveau_debugfs.c | 26 +++++++++-------------- drivers/gpu/drm/nouveau/nouveau_debugfs.h | 5 ++--- 2 files changed, 12 insertions(+), 19 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_debugfs.c b/drivers/gpu/drm/nouveau/nouveau_debugfs.c index 7dfbbbc1beea..63cb5e432f8a 100644 --- a/drivers/gpu/drm/nouveau/nouveau_debugfs.c +++ b/drivers/gpu/drm/nouveau/nouveau_debugfs.c @@ -217,39 +217,33 @@ static const struct nouveau_debugfs_files { {"pstate", &nouveau_pstate_fops}, }; -int +void nouveau_drm_debugfs_init(struct drm_minor *minor) { struct nouveau_drm *drm = nouveau_drm(minor->dev); struct dentry *dentry; - int i, ret; + int i; for (i = 0; i < ARRAY_SIZE(nouveau_debugfs_files); i++) { - dentry = debugfs_create_file(nouveau_debugfs_files[i].name, - S_IRUGO | S_IWUSR, - minor->debugfs_root, minor->dev, - nouveau_debugfs_files[i].fops); - if (!dentry) - return -ENOMEM; + debugfs_create_file(nouveau_debugfs_files[i].name, + S_IRUGO | S_IWUSR, + minor->debugfs_root, minor->dev, + nouveau_debugfs_files[i].fops); } - ret = drm_debugfs_create_files(nouveau_debugfs_list, - NOUVEAU_DEBUGFS_ENTRIES, - minor->debugfs_root, minor); - if (ret) - return ret; + drm_debugfs_create_files(nouveau_debugfs_list, + NOUVEAU_DEBUGFS_ENTRIES, + minor->debugfs_root, minor); /* Set the size of the vbios since we know it, and it's confusing to * userspace if it wants to seek() but the file has a length of 0 */ dentry = debugfs_lookup("vbios.rom", minor->debugfs_root); if (!dentry) - return 0; + return; d_inode(dentry)->i_size = drm->vbios.length; dput(dentry); - - return 0; } int diff --git a/drivers/gpu/drm/nouveau/nouveau_debugfs.h b/drivers/gpu/drm/nouveau/nouveau_debugfs.h index 8909c010e8ea..ccb842d9da87 100644 --- a/drivers/gpu/drm/nouveau/nouveau_debugfs.h +++ b/drivers/gpu/drm/nouveau/nouveau_debugfs.h @@ -18,14 +18,13 @@ nouveau_debugfs(struct drm_device *dev) return nouveau_drm(dev)->debugfs; } -extern int nouveau_drm_debugfs_init(struct drm_minor *); +extern void nouveau_drm_debugfs_init(struct drm_minor *); extern int nouveau_debugfs_init(struct nouveau_drm *); extern void nouveau_debugfs_fini(struct nouveau_drm *); #else -static inline int +static inline void nouveau_drm_debugfs_init(struct drm_minor *minor) { - return 0; } static inline int From patchwork Thu Feb 27 12:02:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wambui Karuga X-Patchwork-Id: 11408573 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id F1887924 for ; Thu, 27 Feb 2020 13:00:02 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id CFC3024693 for ; Thu, 27 Feb 2020 13:00:02 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="J26Ir02K" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CFC3024693 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 993EC6ECB8; Thu, 27 Feb 2020 12:59:42 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wm1-x342.google.com (mail-wm1-x342.google.com [IPv6:2a00:1450:4864:20::342]) by gabe.freedesktop.org (Postfix) with ESMTPS id 43A826EC94 for ; Thu, 27 Feb 2020 12:03:24 +0000 (UTC) Received: by mail-wm1-x342.google.com with SMTP id f15so3238495wml.3 for ; Thu, 27 Feb 2020 04:03:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=eMyHRnupYOweRXusdsPzOOaYHKBaQWgPr4VgAjx/YvA=; b=J26Ir02KepKBJUbXxXkkWJYVkP5vOgClZy+ask2wsbUGCXhEGHhsdjjBMp4pQeyL4v o+PockS+TMBNAj3bDRcefvZcTiGRv//s7LP6xY6F+VIkrxqhEpnYaMhZkScQ6ysjJ1kp Vp3lVS1t6hzYlLN9T4BABFFkiDQUghrhefzvXox7WxnQSf4ze69i0XCqKtlcRumUAyoS cxm0yHZKo9AnodukiroeL7uqp0p26ZtcPOC45KXNVKrfM5QZYTdTeqhPS3kn/oS4bWRg 4AVKdsxNrNwlrkr8WIVIGkAi4/xGyozaKVgg9yaksEXPuNddWbur6TmFwvaUNFEe7IDF 7mKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=eMyHRnupYOweRXusdsPzOOaYHKBaQWgPr4VgAjx/YvA=; b=oOOHh/i122LgCwgyilVuG8DvS4Nw1VP7NIvBFzYU4xOPQ0Khs/yt3Kyl6QRMw1LaJz pzOqjeS51c8TT7utAHzTf9LxZ8hj4+ZCUNesYtAU/zeYRcRmqTOp12HWZ+Yd7pOS//dK VlYAu6O22mZUI2c6/UFYE8ntqT+ye4OPPzbrw3Qp1Xw0d8p/SKIYp1oNgwL+qryv5owc 7piG/IcG0c1YZqVrPkb/AAu7aLlbQTFYH3nXjuPKBw8r7OEl9avFXe6FmiUw50XSpzJJ ZwRiRXBWo9C2Xa9TClYC75JwZH7e4LNyMUUWxCfMRt0kEGlUwDf/BnVLs8NQtFDOhAkP gwwQ== X-Gm-Message-State: APjAAAXkuhTmckmGatQcVJraHsOZ9kqulm5MYWIxYgykLLxYJtRCKXJh tAvLf8WpOJ1hXWJGYNAg1uc= X-Google-Smtp-Source: APXvYqznZ4u0tPG2uNCyuNN6BfskJAo0b9TRFN1GjptJ8HTDJvFgiy5ZFR47VHg554ltfojRoFkY5w== X-Received: by 2002:a1c:108:: with SMTP id 8mr4988938wmb.30.1582805002941; Thu, 27 Feb 2020 04:03:22 -0800 (PST) Received: from wambui.zuku.co.ke ([197.237.61.225]) by smtp.googlemail.com with ESMTPSA id t10sm7655017wru.59.2020.02.27.04.03.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Feb 2020 04:03:22 -0800 (PST) From: Wambui Karuga To: daniel@ffwll.ch, airlied@linux.ie, Thierry Reding , Jonathan Hunter Subject: [PATCH 10/21] drm/tegra: remove checks for debugfs functions return value Date: Thu, 27 Feb 2020 15:02:21 +0300 Message-Id: <20200227120232.19413-11-wambui.karugax@gmail.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200227120232.19413-1-wambui.karugax@gmail.com> References: <20200227120232.19413-1-wambui.karugax@gmail.com> MIME-Version: 1.0 X-Mailman-Approved-At: Thu, 27 Feb 2020 12:59:10 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-tegra@vger.kernel.org, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Since 987d65d01356 (drm: debugfs: make drm_debugfs_create_files() never fail) there is no need to check the return value of drm_debugfs_create_files(). Therefore, remove the return checks and error handling of the drm_debugfs_create_files() function from various debugfs init functions in drm/tegra and have them return 0 directly. This change also includes removing the use of drm_debugfs_create_files as a return value in tegra_debugfs_init() and have the function declared as void. Signed-off-by: Wambui Karuga Acked-by: Thierry Reding --- drivers/gpu/drm/tegra/dc.c | 11 +---------- drivers/gpu/drm/tegra/drm.c | 8 ++++---- drivers/gpu/drm/tegra/dsi.c | 11 +---------- drivers/gpu/drm/tegra/hdmi.c | 11 +---------- drivers/gpu/drm/tegra/sor.c | 11 +---------- 5 files changed, 8 insertions(+), 44 deletions(-) diff --git a/drivers/gpu/drm/tegra/dc.c b/drivers/gpu/drm/tegra/dc.c index 7c70fd31a4c2..e70d58b21964 100644 --- a/drivers/gpu/drm/tegra/dc.c +++ b/drivers/gpu/drm/tegra/dc.c @@ -1496,7 +1496,6 @@ static int tegra_dc_late_register(struct drm_crtc *crtc) struct drm_minor *minor = crtc->dev->primary; struct dentry *root; struct tegra_dc *dc = to_tegra_dc(crtc); - int err; #ifdef CONFIG_DEBUG_FS root = crtc->debugfs_entry; @@ -1512,17 +1511,9 @@ static int tegra_dc_late_register(struct drm_crtc *crtc) for (i = 0; i < count; i++) dc->debugfs_files[i].data = dc; - err = drm_debugfs_create_files(dc->debugfs_files, count, root, minor); - if (err < 0) - goto free; + drm_debugfs_create_files(dc->debugfs_files, count, root, minor); return 0; - -free: - kfree(dc->debugfs_files); - dc->debugfs_files = NULL; - - return err; } static void tegra_dc_early_unregister(struct drm_crtc *crtc) diff --git a/drivers/gpu/drm/tegra/drm.c b/drivers/gpu/drm/tegra/drm.c index bd268028fb3d..d4f51b5c7ee5 100644 --- a/drivers/gpu/drm/tegra/drm.c +++ b/drivers/gpu/drm/tegra/drm.c @@ -839,11 +839,11 @@ static struct drm_info_list tegra_debugfs_list[] = { { "iova", tegra_debugfs_iova, 0 }, }; -static int tegra_debugfs_init(struct drm_minor *minor) +static void tegra_debugfs_init(struct drm_minor *minor) { - return drm_debugfs_create_files(tegra_debugfs_list, - ARRAY_SIZE(tegra_debugfs_list), - minor->debugfs_root, minor); + drm_debugfs_create_files(tegra_debugfs_list, + ARRAY_SIZE(tegra_debugfs_list), + minor->debugfs_root, minor); } #endif diff --git a/drivers/gpu/drm/tegra/dsi.c b/drivers/gpu/drm/tegra/dsi.c index 88b9d64c77bf..30626fcf61eb 100644 --- a/drivers/gpu/drm/tegra/dsi.c +++ b/drivers/gpu/drm/tegra/dsi.c @@ -234,7 +234,6 @@ static int tegra_dsi_late_register(struct drm_connector *connector) struct drm_minor *minor = connector->dev->primary; struct dentry *root = connector->debugfs_entry; struct tegra_dsi *dsi = to_dsi(output); - int err; dsi->debugfs_files = kmemdup(debugfs_files, sizeof(debugfs_files), GFP_KERNEL); @@ -244,17 +243,9 @@ static int tegra_dsi_late_register(struct drm_connector *connector) for (i = 0; i < count; i++) dsi->debugfs_files[i].data = dsi; - err = drm_debugfs_create_files(dsi->debugfs_files, count, root, minor); - if (err < 0) - goto free; + drm_debugfs_create_files(dsi->debugfs_files, count, root, minor); return 0; - -free: - kfree(dsi->debugfs_files); - dsi->debugfs_files = NULL; - - return err; } static void tegra_dsi_early_unregister(struct drm_connector *connector) diff --git a/drivers/gpu/drm/tegra/hdmi.c b/drivers/gpu/drm/tegra/hdmi.c index 6f117628f257..d7799d13d8ad 100644 --- a/drivers/gpu/drm/tegra/hdmi.c +++ b/drivers/gpu/drm/tegra/hdmi.c @@ -1064,7 +1064,6 @@ static int tegra_hdmi_late_register(struct drm_connector *connector) struct drm_minor *minor = connector->dev->primary; struct dentry *root = connector->debugfs_entry; struct tegra_hdmi *hdmi = to_hdmi(output); - int err; hdmi->debugfs_files = kmemdup(debugfs_files, sizeof(debugfs_files), GFP_KERNEL); @@ -1074,17 +1073,9 @@ static int tegra_hdmi_late_register(struct drm_connector *connector) for (i = 0; i < count; i++) hdmi->debugfs_files[i].data = hdmi; - err = drm_debugfs_create_files(hdmi->debugfs_files, count, root, minor); - if (err < 0) - goto free; + drm_debugfs_create_files(hdmi->debugfs_files, count, root, minor); return 0; - -free: - kfree(hdmi->debugfs_files); - hdmi->debugfs_files = NULL; - - return err; } static void tegra_hdmi_early_unregister(struct drm_connector *connector) diff --git a/drivers/gpu/drm/tegra/sor.c b/drivers/gpu/drm/tegra/sor.c index 81226a4953c1..47c1d133069a 100644 --- a/drivers/gpu/drm/tegra/sor.c +++ b/drivers/gpu/drm/tegra/sor.c @@ -1687,7 +1687,6 @@ static int tegra_sor_late_register(struct drm_connector *connector) struct drm_minor *minor = connector->dev->primary; struct dentry *root = connector->debugfs_entry; struct tegra_sor *sor = to_sor(output); - int err; sor->debugfs_files = kmemdup(debugfs_files, sizeof(debugfs_files), GFP_KERNEL); @@ -1697,17 +1696,9 @@ static int tegra_sor_late_register(struct drm_connector *connector) for (i = 0; i < count; i++) sor->debugfs_files[i].data = sor; - err = drm_debugfs_create_files(sor->debugfs_files, count, root, minor); - if (err < 0) - goto free; + drm_debugfs_create_files(sor->debugfs_files, count, root, minor); return 0; - -free: - kfree(sor->debugfs_files); - sor->debugfs_files = NULL; - - return err; } static void tegra_sor_early_unregister(struct drm_connector *connector) From patchwork Thu Feb 27 12:02:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wambui Karuga X-Patchwork-Id: 11408545 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 577A6924 for ; Thu, 27 Feb 2020 12:59:28 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3553124693 for ; Thu, 27 Feb 2020 12:59:28 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="QZEyoBhf" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3553124693 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1FF346ECA2; Thu, 27 Feb 2020 12:59:17 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wr1-x444.google.com (mail-wr1-x444.google.com [IPv6:2a00:1450:4864:20::444]) by gabe.freedesktop.org (Postfix) with ESMTPS id E44826EC94 for ; Thu, 27 Feb 2020 12:03:27 +0000 (UTC) Received: by mail-wr1-x444.google.com with SMTP id l5so3019244wrx.4 for ; Thu, 27 Feb 2020 04:03:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=7k4B4xeoXs3YLBA2vMb2kP4DHWFb+LUmdU32fG0p8Mc=; b=QZEyoBhf8xr57XhiV03Vy8ZxmVUbKR9r6uCPvct92F6D/65KC81cqCQPh2hpjre2nI LbR26cUaunqkI669S3tJ1GQoWrYrvTl5rt+h8mPneCt7fJqnIxt70dgU6/NnYk7/1a2u IwYLF4KExObhKiCPoORcF1cWk/9dlVsXbj+/P1bbMp6IhCJkCt0/ysoV9jMYq40427t9 bOu/xjm99LLTxI7Kq2NtVv1fsOwsv/TGnhgVj6305WrE1Dew0LQ+cTmqbd8CxiVwjIgA zIKQuY6EcjOaGRleuNN74LCNLhz1ycrUrRTChFMsswmBnDc37tVHVc5463zRaFaPc+bo AQnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=7k4B4xeoXs3YLBA2vMb2kP4DHWFb+LUmdU32fG0p8Mc=; b=DMYc2mTFSctGMMqRAh72fjY7cKpqJqMeVGs/cG8RjtTtol1ZFoLr/cVQ1e2AT11RpT lqXL/1Kuex1byX0+sjDVHwgweiaEjt+PCiRSJCpfxOx1U0C/yjWik7vg+LIB86cTWhP1 YY6CMyKtWO5WjnRzA8Kifl34hOBBDiq1ZhA/jpWaTDy8UqQtI8mtRPr0gSSDyu5KTPBR L65QQHwKXDDDHwiX4jxO7UHuiNngapO05LDHrXhtthq7Bkt9YdmgALyD4YL7f8rva0yX iJXjl85oatKrjvnwyl/gY0oAuyCaDtz9ZLH5k9qu0kDCdBNCXGPP+s21W4XK8WcrpS8N 8dfQ== X-Gm-Message-State: APjAAAVqQviaU77h2cHyJ2UIcnSi3d5wN/Z0aS/EtofxrJoMk4/LTLWG fMP/0W+VvLdx/7pzHGbdFlsoT68fnQA= X-Google-Smtp-Source: APXvYqz4RLm66a87EsZNbGF1BxomQUXgmo4w1GxbZYBn9+p8SxoQwC1+zvR1dD3aqNATe3AZSeducQ== X-Received: by 2002:adf:ce8b:: with SMTP id r11mr77920wrn.347.1582805006629; Thu, 27 Feb 2020 04:03:26 -0800 (PST) Received: from wambui.zuku.co.ke ([197.237.61.225]) by smtp.googlemail.com with ESMTPSA id t10sm7655017wru.59.2020.02.27.04.03.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Feb 2020 04:03:26 -0800 (PST) From: Wambui Karuga To: daniel@ffwll.ch, airlied@linux.ie, Eric Anholt Subject: [PATCH 11/21] drm/v3d: make v3d_debugfs_init return void Date: Thu, 27 Feb 2020 15:02:22 +0300 Message-Id: <20200227120232.19413-12-wambui.karugax@gmail.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200227120232.19413-1-wambui.karugax@gmail.com> References: <20200227120232.19413-1-wambui.karugax@gmail.com> MIME-Version: 1.0 X-Mailman-Approved-At: Thu, 27 Feb 2020 12:59:10 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Since commit 987d65d01356 (drm: debugfs: make drm_debugfs_create_files() never fail), drm_debugfs_create_files() never fails and should return void. Therefore, remove its use as the return value of v3d_debugfs_init and have the function return void instead. Signed-off-by: Wambui Karuga --- drivers/gpu/drm/v3d/v3d_debugfs.c | 8 ++++---- drivers/gpu/drm/v3d/v3d_drv.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/v3d/v3d_debugfs.c b/drivers/gpu/drm/v3d/v3d_debugfs.c index 9e953ce64ef7..2b0ea5f8febd 100644 --- a/drivers/gpu/drm/v3d/v3d_debugfs.c +++ b/drivers/gpu/drm/v3d/v3d_debugfs.c @@ -258,10 +258,10 @@ static const struct drm_info_list v3d_debugfs_list[] = { {"bo_stats", v3d_debugfs_bo_stats, 0}, }; -int +void v3d_debugfs_init(struct drm_minor *minor) { - return drm_debugfs_create_files(v3d_debugfs_list, - ARRAY_SIZE(v3d_debugfs_list), - minor->debugfs_root, minor); + drm_debugfs_create_files(v3d_debugfs_list, + ARRAY_SIZE(v3d_debugfs_list), + minor->debugfs_root, minor); } diff --git a/drivers/gpu/drm/v3d/v3d_drv.h b/drivers/gpu/drm/v3d/v3d_drv.h index 9a35c555ec52..4dd4772f5f27 100644 --- a/drivers/gpu/drm/v3d/v3d_drv.h +++ b/drivers/gpu/drm/v3d/v3d_drv.h @@ -301,7 +301,7 @@ struct drm_gem_object *v3d_prime_import_sg_table(struct drm_device *dev, struct sg_table *sgt); /* v3d_debugfs.c */ -int v3d_debugfs_init(struct drm_minor *minor); +void v3d_debugfs_init(struct drm_minor *minor); /* v3d_fence.c */ extern const struct dma_fence_ops v3d_fence_ops; From patchwork Thu Feb 27 12:02:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wambui Karuga X-Patchwork-Id: 11408577 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C4F0A924 for ; Thu, 27 Feb 2020 13:00:06 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A281A246A5 for ; Thu, 27 Feb 2020 13:00:06 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Kfug0CJR" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A281A246A5 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E00736ECC8; Thu, 27 Feb 2020 12:59:44 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) by gabe.freedesktop.org (Postfix) with ESMTPS id 978496EC96; Thu, 27 Feb 2020 12:03:32 +0000 (UTC) Received: by mail-wr1-x443.google.com with SMTP id m16so2958358wrx.11; Thu, 27 Feb 2020 04:03:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=0cvkhpWMFxiLIeolS0V7/Qo+W3ZK761sN/9Z7LM3iPc=; b=Kfug0CJRpde9XowA2nK2NNaW5lx1rUpjSYu8G4JseK84jXXjX6+qOHMxwTsPAlpXXd 1Z4SYEhLlLyqt+Nn6ZaWsF8Kb+ZX5KnEUIbWJzQF9FAQdruIwhXjli6XAnBUcdvu3hK9 9EMW5/fZUMYYsUrh8VHokFrfHPL0QDk+t9MNpfp4yBwu2nRwjIT5vdrcXIHhLi898GF3 u91OBgKR5jGTktue2OzE7RKHow6L0Y4iv6waxFzz1iDCkWLchsuRsVqHzC9hPmg0u3ay nHyKdEPcSSCB7CbUgIQHIfQo1SJH5RLwr2SKi7FuTqNwGa5ao7H+MstVcCiJk/GtKmVw 4Bkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=0cvkhpWMFxiLIeolS0V7/Qo+W3ZK761sN/9Z7LM3iPc=; b=AIo4ZyZRvx8lXChsWLfwzke5p0FGzCUUVUJ6pK5gIkevwGKq6pVrKNafL6RF+74a1F LHqCMrAd6lqDb8mPNaQvcsrH6K8ezFacVkltugTA1XOtEwpl/Ttx5RbIsbhrftgf2mZq 1ANXyWuXsC7mshpK+Byr9Drdv+Y9ojrutym1n5HK1lPYev1J9sKpFEoK++Lct8wiQLuS RlUty2elyCuFa6JPbwcsvm8qcd5R7WDHLiTaphGkHj1cq+uU6IjINJdiXskMOfT/vx9U SntHctYgY0HUNRL3F/6HHZ7aQWsbbopi/qJNpd6XnnphnQyCRGCx/wMhji17559BE6se wf8Q== X-Gm-Message-State: APjAAAXU8ivNbA1sc97ZGn71KG+RisAAzbUhAA6fsT8+qDheKx6vWOUr r59UP9/NUy4i9gHYWhHkQMU= X-Google-Smtp-Source: APXvYqzcuxChGggWOSGvgfmoFNlVgp9QCuNqVaQ/y8Pchnv7mZ3b6MlfEcjxIgveqSKd5RdWwh0h1Q== X-Received: by 2002:a05:6000:12d1:: with SMTP id l17mr4335111wrx.327.1582805011298; Thu, 27 Feb 2020 04:03:31 -0800 (PST) Received: from wambui.zuku.co.ke ([197.237.61.225]) by smtp.googlemail.com with ESMTPSA id t10sm7655017wru.59.2020.02.27.04.03.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Feb 2020 04:03:30 -0800 (PST) From: Wambui Karuga To: daniel@ffwll.ch, airlied@linux.ie, Rob Clark , Sean Paul Subject: [PATCH 12/21] drm/msm: remove checks for return value of drm_debugfs functions. Date: Thu, 27 Feb 2020 15:02:23 +0300 Message-Id: <20200227120232.19413-13-wambui.karugax@gmail.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200227120232.19413-1-wambui.karugax@gmail.com> References: <20200227120232.19413-1-wambui.karugax@gmail.com> MIME-Version: 1.0 X-Mailman-Approved-At: Thu, 27 Feb 2020 12:59:10 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: gregkh@linuxfoundation.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-msm@vger.kernel.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Since commit 987d65d01356 (drm: debugfs: make drm_debugfs_create_files() never fail), drm_debugfs_create_files() does not fail, and should return void. This change therefore removes the checks of its return value in drm/msm and subsequent error handling. These changes also enable the changing of various debugfs_init() functions to return void. Signed-off-by: Wambui Karuga Reported-by: kbuild test robot --- drivers/gpu/drm/msm/adreno/a5xx_debugfs.c | 18 +++++------------- drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c | 14 +++----------- drivers/gpu/drm/msm/msm_debugfs.c | 21 ++++++--------------- drivers/gpu/drm/msm/msm_debugfs.h | 2 +- drivers/gpu/drm/msm/msm_gpu.h | 2 +- 5 files changed, 16 insertions(+), 41 deletions(-) diff --git a/drivers/gpu/drm/msm/adreno/a5xx_debugfs.c b/drivers/gpu/drm/msm/adreno/a5xx_debugfs.c index 075ecce4b5e0..8cae2ca4af6b 100644 --- a/drivers/gpu/drm/msm/adreno/a5xx_debugfs.c +++ b/drivers/gpu/drm/msm/adreno/a5xx_debugfs.c @@ -148,27 +148,19 @@ reset_set(void *data, u64 val) DEFINE_SIMPLE_ATTRIBUTE(reset_fops, NULL, reset_set, "%llx\n"); -int a5xx_debugfs_init(struct msm_gpu *gpu, struct drm_minor *minor) +void a5xx_debugfs_init(struct msm_gpu *gpu, struct drm_minor *minor) { struct drm_device *dev; - int ret; if (!minor) - return 0; + return; dev = minor->dev; - ret = drm_debugfs_create_files(a5xx_debugfs_list, - ARRAY_SIZE(a5xx_debugfs_list), - minor->debugfs_root, minor); - - if (ret) { - DRM_DEV_ERROR(dev->dev, "could not install a5xx_debugfs_list\n"); - return ret; - } + drm_debugfs_create_files(a5xx_debugfs_list, + ARRAY_SIZE(a5xx_debugfs_list), + minor->debugfs_root, minor); debugfs_create_file("reset", S_IWUGO, minor->debugfs_root, dev, &reset_fops); - - return 0; } diff --git a/drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c b/drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c index 6650f478b226..41b461128bbc 100644 --- a/drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c +++ b/drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c @@ -259,17 +259,9 @@ static struct drm_info_list mdp5_debugfs_list[] = { static int mdp5_kms_debugfs_init(struct msm_kms *kms, struct drm_minor *minor) { - struct drm_device *dev = minor->dev; - int ret; - - ret = drm_debugfs_create_files(mdp5_debugfs_list, - ARRAY_SIZE(mdp5_debugfs_list), - minor->debugfs_root, minor); - - if (ret) { - DRM_DEV_ERROR(dev->dev, "could not install mdp5_debugfs_list\n"); - return ret; - } + drm_debugfs_create_files(mdp5_debugfs_list, + ARRAY_SIZE(mdp5_debugfs_list), + minor->debugfs_root, minor); return 0; } diff --git a/drivers/gpu/drm/msm/msm_debugfs.c b/drivers/gpu/drm/msm/msm_debugfs.c index 1c74381a4fc9..3c958f311bbc 100644 --- a/drivers/gpu/drm/msm/msm_debugfs.c +++ b/drivers/gpu/drm/msm/msm_debugfs.c @@ -214,31 +214,22 @@ int msm_debugfs_late_init(struct drm_device *dev) return ret; } -int msm_debugfs_init(struct drm_minor *minor) +void msm_debugfs_init(struct drm_minor *minor) { struct drm_device *dev = minor->dev; struct msm_drm_private *priv = dev->dev_private; - int ret; + int ret = 0; - ret = drm_debugfs_create_files(msm_debugfs_list, - ARRAY_SIZE(msm_debugfs_list), - minor->debugfs_root, minor); - - if (ret) { - DRM_DEV_ERROR(dev->dev, "could not install msm_debugfs_list\n"); - return ret; - } + drm_debugfs_create_files(msm_debugfs_list, + ARRAY_SIZE(msm_debugfs_list), + minor->debugfs_root, minor); debugfs_create_file("gpu", S_IRUSR, minor->debugfs_root, dev, &msm_gpu_fops); if (priv->kms && priv->kms->funcs->debugfs_init) { - ret = priv->kms->funcs->debugfs_init(priv->kms, minor); - if (ret) - return ret; + priv->kms->funcs->debugfs_init(priv->kms, minor); } - - return ret; } #endif diff --git a/drivers/gpu/drm/msm/msm_debugfs.h b/drivers/gpu/drm/msm/msm_debugfs.h index 2b91f8c178ad..ef58f66abbb3 100644 --- a/drivers/gpu/drm/msm/msm_debugfs.h +++ b/drivers/gpu/drm/msm/msm_debugfs.h @@ -8,7 +8,7 @@ #define __MSM_DEBUGFS_H__ #ifdef CONFIG_DEBUG_FS -int msm_debugfs_init(struct drm_minor *minor); +void msm_debugfs_init(struct drm_minor *minor); #endif #endif /* __MSM_DEBUGFS_H__ */ diff --git a/drivers/gpu/drm/msm/msm_gpu.h b/drivers/gpu/drm/msm/msm_gpu.h index be5bc2e8425c..6ccae4ba905c 100644 --- a/drivers/gpu/drm/msm/msm_gpu.h +++ b/drivers/gpu/drm/msm/msm_gpu.h @@ -57,7 +57,7 @@ struct msm_gpu_funcs { void (*show)(struct msm_gpu *gpu, struct msm_gpu_state *state, struct drm_printer *p); /* for generation specific debugfs: */ - int (*debugfs_init)(struct msm_gpu *gpu, struct drm_minor *minor); + void (*debugfs_init)(struct msm_gpu *gpu, struct drm_minor *minor); #endif unsigned long (*gpu_busy)(struct msm_gpu *gpu); struct msm_gpu_state *(*gpu_state_get)(struct msm_gpu *gpu); From patchwork Thu Feb 27 12:02:24 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wambui Karuga X-Patchwork-Id: 11408563 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0916614B4 for ; Thu, 27 Feb 2020 12:59:56 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DBBB224693 for ; Thu, 27 Feb 2020 12:59:55 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="szuXZwZC" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DBBB224693 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 212DA6ECAD; Thu, 27 Feb 2020 12:59:40 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wm1-x343.google.com (mail-wm1-x343.google.com [IPv6:2a00:1450:4864:20::343]) by gabe.freedesktop.org (Postfix) with ESMTPS id C2E9C6EC94 for ; Thu, 27 Feb 2020 12:03:35 +0000 (UTC) Received: by mail-wm1-x343.google.com with SMTP id a5so3259281wmb.0 for ; Thu, 27 Feb 2020 04:03:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Tv1b66VHXsMeh5NR7gAtTfq8XGx1hp57Pkw74uVLNqA=; b=szuXZwZCgGMpeKcpOVV11orhHMphZe60+AHcLd7eNz9P3yjVvMzvLiUJiUgshDCHpa b69cTkrGMy8WCkJBiF0Zb9E5ZbRLGeC/e0c085g2DAEZemzOtkaGzL72ivfodm71Ot3k G2Ts52SAJcX/MLV/0elGr0wDkE5RHTcenvSkcig8StUDKPsOKArtl3c7eAXdr3+/RFpC 930eX7Ki1OEUEeHkWbpmL6wwZTjwdWtqe2vY+CbqhTslvLFKvqM59hGERsdQGJ03PUYN WKll6Yd5JNB5V5JyRJIRjI7TD4fW3UVVws72L+00NiTy40YVPi8y9iYoA0/Khxhp9qaY jd+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Tv1b66VHXsMeh5NR7gAtTfq8XGx1hp57Pkw74uVLNqA=; b=tXkFUJ53ccNLDm6s8T/8GmsgsF2hu6FWouVcYOtWyCTSw+kpryND7ajoFmvhk7XP/L wYyHC4pSB2uWg2SLuwmKMEY5vr6AmQ8MPTOgjRhINgri5MZ8iUGSzAWg3WJ1Ry1rNdsA LmVV2EiJJ+bBNBSvVrBKnMe/Iij5QnEncBUbu5YF+VUytvz/o7Vb6TKIqVhYdTNWr/Us 7AwJF/gvVJHmytMz6sMloxTQnGSOdDQYMxe8uOQKnv7t1tT7TMQOiV7osjsx59hvN2Rt xLQOWwSbGHk3KgIg2TUSzm6IAX1te5eLN72h/ZOqgC7P+MnN4MfAEhj10u6iRuESPz5C AbEQ== X-Gm-Message-State: APjAAAW4MhoxPsXO4Id1E19FijLvBynBn368P06Qak2lLwM36MY4wjWJ UX9txfYIIf4Z+5sKgyQoZZTyfQc+dtXDUg== X-Google-Smtp-Source: APXvYqyZ45URLS4OCvwl7pFZT+ggkw0Dgp9j3XUU0EO03gCbFAzyTvmLPyx+BMGDfIJeegvYHNIrsg== X-Received: by 2002:a1c:6a17:: with SMTP id f23mr1784802wmc.33.1582805014531; Thu, 27 Feb 2020 04:03:34 -0800 (PST) Received: from wambui.zuku.co.ke ([197.237.61.225]) by smtp.googlemail.com with ESMTPSA id t10sm7655017wru.59.2020.02.27.04.03.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Feb 2020 04:03:34 -0800 (PST) From: Wambui Karuga To: daniel@ffwll.ch, airlied@linux.ie, Tomi Valkeinen Subject: [PATCH 13/21] drm/omapdrm: remove checks for return value of drm_debugfs functions. Date: Thu, 27 Feb 2020 15:02:24 +0300 Message-Id: <20200227120232.19413-14-wambui.karugax@gmail.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200227120232.19413-1-wambui.karugax@gmail.com> References: <20200227120232.19413-1-wambui.karugax@gmail.com> MIME-Version: 1.0 X-Mailman-Approved-At: Thu, 27 Feb 2020 12:59:10 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Since 987d65d01356 (drm: debugfs: make drm_debugfs_create_files() never fail), there is no need to ever check the return value for drm_debugfs_create_files(). Therefore remove the checks for the return value and subsequent error handling in omap_debugfs_init(). These changes also enables the changing of omap_debugfs_init() to return void. Signed-off-by: Wambui Karuga --- drivers/gpu/drm/omapdrm/omap_debugfs.c | 29 +++++++------------------- drivers/gpu/drm/omapdrm/omap_drv.h | 2 +- 2 files changed, 8 insertions(+), 23 deletions(-) diff --git a/drivers/gpu/drm/omapdrm/omap_debugfs.c b/drivers/gpu/drm/omapdrm/omap_debugfs.c index 34dfb33145b4..b57fbe8a0ac2 100644 --- a/drivers/gpu/drm/omapdrm/omap_debugfs.c +++ b/drivers/gpu/drm/omapdrm/omap_debugfs.c @@ -80,31 +80,16 @@ static struct drm_info_list omap_dmm_debugfs_list[] = { {"tiler_map", tiler_map_show, 0}, }; -int omap_debugfs_init(struct drm_minor *minor) +void omap_debugfs_init(struct drm_minor *minor) { - struct drm_device *dev = minor->dev; - int ret; - - ret = drm_debugfs_create_files(omap_debugfs_list, - ARRAY_SIZE(omap_debugfs_list), - minor->debugfs_root, minor); - - if (ret) { - dev_err(dev->dev, "could not install omap_debugfs_list\n"); - return ret; - } + drm_debugfs_create_files(omap_debugfs_list, + ARRAY_SIZE(omap_debugfs_list), + minor->debugfs_root, minor); if (dmm_is_available()) - ret = drm_debugfs_create_files(omap_dmm_debugfs_list, - ARRAY_SIZE(omap_dmm_debugfs_list), - minor->debugfs_root, minor); - - if (ret) { - dev_err(dev->dev, "could not install omap_dmm_debugfs_list\n"); - return ret; - } - - return ret; + drm_debugfs_create_files(omap_dmm_debugfs_list, + ARRAY_SIZE(omap_dmm_debugfs_list), + minor->debugfs_root, minor); } #endif diff --git a/drivers/gpu/drm/omapdrm/omap_drv.h b/drivers/gpu/drm/omapdrm/omap_drv.h index 7c4b66efcaa7..8a1fac680138 100644 --- a/drivers/gpu/drm/omapdrm/omap_drv.h +++ b/drivers/gpu/drm/omapdrm/omap_drv.h @@ -82,6 +82,6 @@ struct omap_drm_private { }; -int omap_debugfs_init(struct drm_minor *minor); +void omap_debugfs_init(struct drm_minor *minor); #endif /* __OMAPDRM_DRV_H__ */ From patchwork Thu Feb 27 12:02:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wambui Karuga X-Patchwork-Id: 11408585 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E0E72924 for ; Thu, 27 Feb 2020 13:00:16 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BF37824693 for ; Thu, 27 Feb 2020 13:00:16 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="qtiph7rT" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BF37824693 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 868AB6ECBC; Thu, 27 Feb 2020 12:59:43 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wr1-x444.google.com (mail-wr1-x444.google.com [IPv6:2a00:1450:4864:20::444]) by gabe.freedesktop.org (Postfix) with ESMTPS id 12E896EC94 for ; Thu, 27 Feb 2020 12:03:39 +0000 (UTC) Received: by mail-wr1-x444.google.com with SMTP id x7so514820wrr.0 for ; Thu, 27 Feb 2020 04:03:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=A6giR7jkVNS7f8olWtdVB9r9gFLVEFocgKkHFBXumSM=; b=qtiph7rTPwSvoI8X9dyOJvpnelDSW6j0fJ9qb82EkXIWN0iu4X5c4qBKwi4OJSat7t e25bYmOIjcLHWX11AkNRI9Hjvp2F1P0fSaitDVtKr4ICufmsHgHiVM4ikqJUroaKfRac ud40Z77NAFACV4PgRFMLvTEGYmxzdZzKeV7hbmgLUHbiIJYANJga4ZYWvQVFscPgw47+ jjY3l/RZn6ep08kgkFPXD8vmSobd+hQvhNyyktqD7WbREkmlc5NlDh6NfpXAxbbdfvtE fT3XHQUdj42+YyccNOU/pFBRnX+4LB7gHr42btocC8WWHvWgWM/475ImAZdBMjN+LlSb YYtQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=A6giR7jkVNS7f8olWtdVB9r9gFLVEFocgKkHFBXumSM=; b=DnmC2+Fn/opVcCQai3P+wHMMf9Xg7HTCSNc+V9VFR2oIRdXSETVBMdU9gL92B3PJoy 7mtCMGA4CZ8kMrAdrLcBiKbnGMh0608yqragNpUBslIfSSoH+BTuMhThWmOobStEFINk CYr+uKdSKPI4IFMYzbwScS8GhvSB8HrqFUQvx5vFKGfohw0ZfyOfvhnporM7UXN4lBNI icObjQkvOmptqY4GlySeC5VYEMCNjoeViV0r+VNmt0U3MkVAz7I81R/9PIQtUP5Y+o+a XNBoteZBqqzSfnt8WkE8kR8A+X48CTtXuwruQl+DvwurEGTe4F6gJSRDYafZjqOF6bzA Ynhg== X-Gm-Message-State: APjAAAVzKZcc1IeT3aTr2nWlDikIeJDf7R13BZ8VPQi4je52i836QFMQ Ky729RgrbRwnc0Cj2pFO4fg= X-Google-Smtp-Source: APXvYqz2UYFvgu0Eu1AiFlAQOUZiIvr7aNsYGZxBKzzaL/wlRLO7BinAulm+0C+yFoZDQ0ISPP6ABA== X-Received: by 2002:a5d:5148:: with SMTP id u8mr4826270wrt.132.1582805017785; Thu, 27 Feb 2020 04:03:37 -0800 (PST) Received: from wambui.zuku.co.ke ([197.237.61.225]) by smtp.googlemail.com with ESMTPSA id t10sm7655017wru.59.2020.02.27.04.03.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Feb 2020 04:03:37 -0800 (PST) From: Wambui Karuga To: daniel@ffwll.ch, airlied@linux.ie, Eric Anholt Subject: [PATCH 14/21] drm/pl111: make pl111_debugfs_init return void Date: Thu, 27 Feb 2020 15:02:25 +0300 Message-Id: <20200227120232.19413-15-wambui.karugax@gmail.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200227120232.19413-1-wambui.karugax@gmail.com> References: <20200227120232.19413-1-wambui.karugax@gmail.com> MIME-Version: 1.0 X-Mailman-Approved-At: Thu, 27 Feb 2020 12:59:10 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Since 987d65d01356 (drm: debugfs: make drm_debugfs_create_files() never fail) drm_debugfs_create_files() should return void. Therefore, remove its use as the return value in pl111_debugfs_init, and have the function declared as void instead. Signed-off-by: Wambui Karuga --- drivers/gpu/drm/pl111/pl111_debugfs.c | 8 ++++---- drivers/gpu/drm/pl111/pl111_drm.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/pl111/pl111_debugfs.c b/drivers/gpu/drm/pl111/pl111_debugfs.c index 3c8e82016854..26ca8cdf3e60 100644 --- a/drivers/gpu/drm/pl111/pl111_debugfs.c +++ b/drivers/gpu/drm/pl111/pl111_debugfs.c @@ -51,10 +51,10 @@ static const struct drm_info_list pl111_debugfs_list[] = { {"regs", pl111_debugfs_regs, 0}, }; -int +void pl111_debugfs_init(struct drm_minor *minor) { - return drm_debugfs_create_files(pl111_debugfs_list, - ARRAY_SIZE(pl111_debugfs_list), - minor->debugfs_root, minor); + drm_debugfs_create_files(pl111_debugfs_list, + ARRAY_SIZE(pl111_debugfs_list), + minor->debugfs_root, minor); } diff --git a/drivers/gpu/drm/pl111/pl111_drm.h b/drivers/gpu/drm/pl111/pl111_drm.h index 77d2da9a8a7c..ba399bcb792f 100644 --- a/drivers/gpu/drm/pl111/pl111_drm.h +++ b/drivers/gpu/drm/pl111/pl111_drm.h @@ -84,6 +84,6 @@ struct pl111_drm_dev_private { int pl111_display_init(struct drm_device *dev); irqreturn_t pl111_irq(int irq, void *data); -int pl111_debugfs_init(struct drm_minor *minor); +void pl111_debugfs_init(struct drm_minor *minor); #endif /* _PL111_DRM_H_ */ From patchwork Thu Feb 27 12:02:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wambui Karuga X-Patchwork-Id: 11408567 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id BD45314B4 for ; Thu, 27 Feb 2020 12:59:58 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9B2C724693 for ; Thu, 27 Feb 2020 12:59:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="naP9EBM/" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9B2C724693 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 71FAE6ECC5; Thu, 27 Feb 2020 12:59:44 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) by gabe.freedesktop.org (Postfix) with ESMTPS id 276CA6E885 for ; Thu, 27 Feb 2020 12:03:43 +0000 (UTC) Received: by mail-wr1-x442.google.com with SMTP id p18so2979643wre.9 for ; Thu, 27 Feb 2020 04:03:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=5f1Pooy00AQQBl1T3bhqw3NWEQnIeGJmfgCAqZdVpes=; b=naP9EBM/phmgv8EK80mVVAXMPTmFsf+TLSEG7qtQYZWcalKFHt5+155A6UfNIESuwf O1UQ2mJOmjpYh4lYqElypgsppnAcNeZLU1H7DLGJdgU8icfMzyhp5OZzDl/MWtzRJz+1 8RxOzW/t29eYp4MRWj9HLix10iOitAL628WozW7MPU0D/heuB0KSKU/m0PbRBFWElIP7 DiZugdRMyLor3mn/A0lnt2cO3SNkynaWEWzVFMtIaOTsFz5tiELIRjzfMSlEbIyeVOJh XKv763cwgBKLeKSc89z1FVEbfeGMg0tlbmD0yUQoL3KJ7j35rP0AgreyGskQih/mB32x 0IHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=5f1Pooy00AQQBl1T3bhqw3NWEQnIeGJmfgCAqZdVpes=; b=OyMZ3Xh/LYkOQxjvkkpvL3RtI46DgGvTOZOen/N78Ism6QARSBAz++VnQjv2rBf8AF HvfmC46n/1pI+B94nb2OZrOg6nfHmTDNP5oCLctFuASgluH5A5djpa3z+0W98/MuPfNW ASCDMNuwgSXxAig72kBxM4ongzWUy9uavqAapagKscvqZZNLegHW5msIdPk8ZuBQa5CW tD5bmr/r+LLlBIDwgtFVVL1ANq52f23m1ehIbJ014ERy07voHvWgxuU2Ji2JiNA/SE2V LiWzWxreuSRVctfIWruitlnNAEoz+TNchqVOs+wv9YF+cVRL+GLLKMA7xmYGEVqr52Mz I2UQ== X-Gm-Message-State: APjAAAVvyK0siEOqFyvC5KVN1rE2YIH+T7qAPqKbQqyhNdhbtpIuq45d kLpsQ7bPWxWylAsa3nvLs0Y= X-Google-Smtp-Source: APXvYqwIsnHm8D2ianGvCwtS9l5+AocsIfAh3V7HgM2+E9Kro7erwT8QcQCDIs50vqz9YHWTwkVZpQ== X-Received: by 2002:adf:fc12:: with SMTP id i18mr4562449wrr.354.1582805021673; Thu, 27 Feb 2020 04:03:41 -0800 (PST) Received: from wambui.zuku.co.ke ([197.237.61.225]) by smtp.googlemail.com with ESMTPSA id t10sm7655017wru.59.2020.02.27.04.03.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Feb 2020 04:03:41 -0800 (PST) From: Wambui Karuga To: daniel@ffwll.ch, airlied@linux.ie, Benjamin Gaignard , Vincent Abriou Subject: [PATCH 15/21] drm/sti: remove use drm_debugfs functions as return value Date: Thu, 27 Feb 2020 15:02:26 +0300 Message-Id: <20200227120232.19413-16-wambui.karugax@gmail.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200227120232.19413-1-wambui.karugax@gmail.com> References: <20200227120232.19413-1-wambui.karugax@gmail.com> MIME-Version: 1.0 X-Mailman-Approved-At: Thu, 27 Feb 2020 12:59:10 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Since commit 987d65d01356 (drm: debugfs: make drm_debugfs_create_files() never fail), drm_debugfs_create_files() never fails, and should return void. This change therefore removes it uses as a return value in various functions across drm/sti. With these changes, the affected functions have been changed to use a void return value. Signed-off-by: Wambui Karuga --- drivers/gpu/drm/sti/sti_cursor.c | 14 ++++++++------ drivers/gpu/drm/sti/sti_drv.c | 16 ++++------------ drivers/gpu/drm/sti/sti_dvo.c | 13 +++++-------- drivers/gpu/drm/sti/sti_gdp.c | 7 ++++--- drivers/gpu/drm/sti/sti_hda.c | 13 +++++-------- drivers/gpu/drm/sti/sti_hdmi.c | 13 +++++-------- drivers/gpu/drm/sti/sti_hqvdp.c | 12 +++++++----- drivers/gpu/drm/sti/sti_mixer.c | 7 ++++--- drivers/gpu/drm/sti/sti_tvout.c | 13 +++++-------- drivers/gpu/drm/sti/sti_vid.c | 8 ++++---- drivers/gpu/drm/sti/sti_vid.h | 2 +- 11 files changed, 52 insertions(+), 66 deletions(-) diff --git a/drivers/gpu/drm/sti/sti_cursor.c b/drivers/gpu/drm/sti/sti_cursor.c index ea64c1dcaf63..a98057431023 100644 --- a/drivers/gpu/drm/sti/sti_cursor.c +++ b/drivers/gpu/drm/sti/sti_cursor.c @@ -131,17 +131,17 @@ static struct drm_info_list cursor_debugfs_files[] = { { "cursor", cursor_dbg_show, 0, NULL }, }; -static int cursor_debugfs_init(struct sti_cursor *cursor, - struct drm_minor *minor) +static void cursor_debugfs_init(struct sti_cursor *cursor, + struct drm_minor *minor) { unsigned int i; for (i = 0; i < ARRAY_SIZE(cursor_debugfs_files); i++) cursor_debugfs_files[i].data = cursor; - return drm_debugfs_create_files(cursor_debugfs_files, - ARRAY_SIZE(cursor_debugfs_files), - minor->debugfs_root, minor); + drm_debugfs_create_files(cursor_debugfs_files, + ARRAY_SIZE(cursor_debugfs_files), + minor->debugfs_root, minor); } static void sti_cursor_argb8888_to_clut8(struct sti_cursor *cursor, u32 *src) @@ -342,7 +342,9 @@ static int sti_cursor_late_register(struct drm_plane *drm_plane) struct sti_plane *plane = to_sti_plane(drm_plane); struct sti_cursor *cursor = to_sti_cursor(plane); - return cursor_debugfs_init(cursor, drm_plane->dev->primary); + cursor_debugfs_init(cursor, drm_plane->dev->primary); + + return 0; } static const struct drm_plane_funcs sti_cursor_plane_helpers_funcs = { diff --git a/drivers/gpu/drm/sti/sti_drv.c b/drivers/gpu/drm/sti/sti_drv.c index 50870d8cbb76..3f9db3e3f397 100644 --- a/drivers/gpu/drm/sti/sti_drv.c +++ b/drivers/gpu/drm/sti/sti_drv.c @@ -92,24 +92,16 @@ static struct drm_info_list sti_drm_dbg_list[] = { {"fps_get", sti_drm_fps_dbg_show, 0}, }; -static int sti_drm_dbg_init(struct drm_minor *minor) +static void sti_drm_dbg_init(struct drm_minor *minor) { - int ret; - - ret = drm_debugfs_create_files(sti_drm_dbg_list, - ARRAY_SIZE(sti_drm_dbg_list), - minor->debugfs_root, minor); - if (ret) - goto err; + drm_debugfs_create_files(sti_drm_dbg_list, + ARRAY_SIZE(sti_drm_dbg_list), + minor->debugfs_root, minor); debugfs_create_file("fps_show", S_IRUGO | S_IWUSR, minor->debugfs_root, minor->dev, &sti_drm_fps_fops); DRM_INFO("%s: debugfs installed\n", DRIVER_NAME); - return 0; -err: - DRM_ERROR("%s: cannot install debugfs\n", DRIVER_NAME); - return ret; } static const struct drm_mode_config_funcs sti_mode_config_funcs = { diff --git a/drivers/gpu/drm/sti/sti_dvo.c b/drivers/gpu/drm/sti/sti_dvo.c index a0709647f678..0032e1830bc5 100644 --- a/drivers/gpu/drm/sti/sti_dvo.c +++ b/drivers/gpu/drm/sti/sti_dvo.c @@ -197,16 +197,16 @@ static struct drm_info_list dvo_debugfs_files[] = { { "dvo", dvo_dbg_show, 0, NULL }, }; -static int dvo_debugfs_init(struct sti_dvo *dvo, struct drm_minor *minor) +static void dvo_debugfs_init(struct sti_dvo *dvo, struct drm_minor *minor) { unsigned int i; for (i = 0; i < ARRAY_SIZE(dvo_debugfs_files); i++) dvo_debugfs_files[i].data = dvo; - return drm_debugfs_create_files(dvo_debugfs_files, - ARRAY_SIZE(dvo_debugfs_files), - minor->debugfs_root, minor); + drm_debugfs_create_files(dvo_debugfs_files, + ARRAY_SIZE(dvo_debugfs_files), + minor->debugfs_root, minor); } static void sti_dvo_disable(struct drm_bridge *bridge) @@ -406,10 +406,7 @@ static int sti_dvo_late_register(struct drm_connector *connector) = to_sti_dvo_connector(connector); struct sti_dvo *dvo = dvo_connector->dvo; - if (dvo_debugfs_init(dvo, dvo->drm_dev->primary)) { - DRM_ERROR("DVO debugfs setup failed\n"); - return -EINVAL; - } + dvo_debugfs_init(dvo, dvo->drm_dev->primary); return 0; } diff --git a/drivers/gpu/drm/sti/sti_gdp.c b/drivers/gpu/drm/sti/sti_gdp.c index 11595c748844..2d5a2b5b78b8 100644 --- a/drivers/gpu/drm/sti/sti_gdp.c +++ b/drivers/gpu/drm/sti/sti_gdp.c @@ -343,9 +343,10 @@ static int gdp_debugfs_init(struct sti_gdp *gdp, struct drm_minor *minor) for (i = 0; i < nb_files; i++) gdp_debugfs_files[i].data = gdp; - return drm_debugfs_create_files(gdp_debugfs_files, - nb_files, - minor->debugfs_root, minor); + drm_debugfs_create_files(gdp_debugfs_files, + nb_files, + minor->debugfs_root, minor); + return 0; } static int sti_gdp_fourcc2format(int fourcc) diff --git a/drivers/gpu/drm/sti/sti_hda.c b/drivers/gpu/drm/sti/sti_hda.c index f3f28d79b0e4..a1ec891eaf3a 100644 --- a/drivers/gpu/drm/sti/sti_hda.c +++ b/drivers/gpu/drm/sti/sti_hda.c @@ -367,16 +367,16 @@ static struct drm_info_list hda_debugfs_files[] = { { "hda", hda_dbg_show, 0, NULL }, }; -static int hda_debugfs_init(struct sti_hda *hda, struct drm_minor *minor) +static void hda_debugfs_init(struct sti_hda *hda, struct drm_minor *minor) { unsigned int i; for (i = 0; i < ARRAY_SIZE(hda_debugfs_files); i++) hda_debugfs_files[i].data = hda; - return drm_debugfs_create_files(hda_debugfs_files, - ARRAY_SIZE(hda_debugfs_files), - minor->debugfs_root, minor); + drm_debugfs_create_files(hda_debugfs_files, + ARRAY_SIZE(hda_debugfs_files), + minor->debugfs_root, minor); } /** @@ -643,10 +643,7 @@ static int sti_hda_late_register(struct drm_connector *connector) = to_sti_hda_connector(connector); struct sti_hda *hda = hda_connector->hda; - if (hda_debugfs_init(hda, hda->drm_dev->primary)) { - DRM_ERROR("HDA debugfs setup failed\n"); - return -EINVAL; - } + hda_debugfs_init(hda, hda->drm_dev->primary); return 0; } diff --git a/drivers/gpu/drm/sti/sti_hdmi.c b/drivers/gpu/drm/sti/sti_hdmi.c index 18eaf786ffa4..5b15c4974e6b 100644 --- a/drivers/gpu/drm/sti/sti_hdmi.c +++ b/drivers/gpu/drm/sti/sti_hdmi.c @@ -727,16 +727,16 @@ static struct drm_info_list hdmi_debugfs_files[] = { { "hdmi", hdmi_dbg_show, 0, NULL }, }; -static int hdmi_debugfs_init(struct sti_hdmi *hdmi, struct drm_minor *minor) +static void hdmi_debugfs_init(struct sti_hdmi *hdmi, struct drm_minor *minor) { unsigned int i; for (i = 0; i < ARRAY_SIZE(hdmi_debugfs_files); i++) hdmi_debugfs_files[i].data = hdmi; - return drm_debugfs_create_files(hdmi_debugfs_files, - ARRAY_SIZE(hdmi_debugfs_files), - minor->debugfs_root, minor); + drm_debugfs_create_files(hdmi_debugfs_files, + ARRAY_SIZE(hdmi_debugfs_files), + minor->debugfs_root, minor); } static void sti_hdmi_disable(struct drm_bridge *bridge) @@ -1113,10 +1113,7 @@ static int sti_hdmi_late_register(struct drm_connector *connector) = to_sti_hdmi_connector(connector); struct sti_hdmi *hdmi = hdmi_connector->hdmi; - if (hdmi_debugfs_init(hdmi, hdmi->drm_dev->primary)) { - DRM_ERROR("HDMI debugfs setup failed\n"); - return -EINVAL; - } + hdmi_debugfs_init(hdmi, hdmi->drm_dev->primary); return 0; } diff --git a/drivers/gpu/drm/sti/sti_hqvdp.c b/drivers/gpu/drm/sti/sti_hqvdp.c index 1015abe0ce08..5a4e12194a77 100644 --- a/drivers/gpu/drm/sti/sti_hqvdp.c +++ b/drivers/gpu/drm/sti/sti_hqvdp.c @@ -639,16 +639,16 @@ static struct drm_info_list hqvdp_debugfs_files[] = { { "hqvdp", hqvdp_dbg_show, 0, NULL }, }; -static int hqvdp_debugfs_init(struct sti_hqvdp *hqvdp, struct drm_minor *minor) +static void hqvdp_debugfs_init(struct sti_hqvdp *hqvdp, struct drm_minor *minor) { unsigned int i; for (i = 0; i < ARRAY_SIZE(hqvdp_debugfs_files); i++) hqvdp_debugfs_files[i].data = hqvdp; - return drm_debugfs_create_files(hqvdp_debugfs_files, - ARRAY_SIZE(hqvdp_debugfs_files), - minor->debugfs_root, minor); + drm_debugfs_create_files(hqvdp_debugfs_files, + ARRAY_SIZE(hqvdp_debugfs_files), + minor->debugfs_root, minor); } /** @@ -1274,7 +1274,9 @@ static int sti_hqvdp_late_register(struct drm_plane *drm_plane) struct sti_plane *plane = to_sti_plane(drm_plane); struct sti_hqvdp *hqvdp = to_sti_hqvdp(plane); - return hqvdp_debugfs_init(hqvdp, drm_plane->dev->primary); + hqvdp_debugfs_init(hqvdp, drm_plane->dev->primary); + + return 0; } static const struct drm_plane_funcs sti_hqvdp_plane_helpers_funcs = { diff --git a/drivers/gpu/drm/sti/sti_mixer.c b/drivers/gpu/drm/sti/sti_mixer.c index c3a3e1e5fc8a..0ee084049555 100644 --- a/drivers/gpu/drm/sti/sti_mixer.c +++ b/drivers/gpu/drm/sti/sti_mixer.c @@ -200,9 +200,10 @@ int sti_mixer_debugfs_init(struct sti_mixer *mixer, struct drm_minor *minor) for (i = 0; i < nb_files; i++) mixer_debugfs_files[i].data = mixer; - return drm_debugfs_create_files(mixer_debugfs_files, - nb_files, - minor->debugfs_root, minor); + drm_debugfs_create_files(mixer_debugfs_files, + nb_files, + minor->debugfs_root, minor); + return 0; } void sti_mixer_set_background_status(struct sti_mixer *mixer, bool enable) diff --git a/drivers/gpu/drm/sti/sti_tvout.c b/drivers/gpu/drm/sti/sti_tvout.c index c36a8da373cb..df3817f0fd30 100644 --- a/drivers/gpu/drm/sti/sti_tvout.c +++ b/drivers/gpu/drm/sti/sti_tvout.c @@ -570,16 +570,16 @@ static struct drm_info_list tvout_debugfs_files[] = { { "tvout", tvout_dbg_show, 0, NULL }, }; -static int tvout_debugfs_init(struct sti_tvout *tvout, struct drm_minor *minor) +static void tvout_debugfs_init(struct sti_tvout *tvout, struct drm_minor *minor) { unsigned int i; for (i = 0; i < ARRAY_SIZE(tvout_debugfs_files); i++) tvout_debugfs_files[i].data = tvout; - return drm_debugfs_create_files(tvout_debugfs_files, - ARRAY_SIZE(tvout_debugfs_files), - minor->debugfs_root, minor); + drm_debugfs_create_files(tvout_debugfs_files, + ARRAY_SIZE(tvout_debugfs_files), + minor->debugfs_root, minor); } static void sti_tvout_encoder_dpms(struct drm_encoder *encoder, int mode) @@ -603,14 +603,11 @@ static void sti_tvout_encoder_destroy(struct drm_encoder *encoder) static int sti_tvout_late_register(struct drm_encoder *encoder) { struct sti_tvout *tvout = to_sti_tvout(encoder); - int ret; if (tvout->debugfs_registered) return 0; - ret = tvout_debugfs_init(tvout, encoder->dev->primary); - if (ret) - return ret; + tvout_debugfs_init(tvout, encoder->dev->primary); tvout->debugfs_registered = true; return 0; diff --git a/drivers/gpu/drm/sti/sti_vid.c b/drivers/gpu/drm/sti/sti_vid.c index 2d4230410464..2d818397918d 100644 --- a/drivers/gpu/drm/sti/sti_vid.c +++ b/drivers/gpu/drm/sti/sti_vid.c @@ -124,16 +124,16 @@ static struct drm_info_list vid_debugfs_files[] = { { "vid", vid_dbg_show, 0, NULL }, }; -int vid_debugfs_init(struct sti_vid *vid, struct drm_minor *minor) +void vid_debugfs_init(struct sti_vid *vid, struct drm_minor *minor) { unsigned int i; for (i = 0; i < ARRAY_SIZE(vid_debugfs_files); i++) vid_debugfs_files[i].data = vid; - return drm_debugfs_create_files(vid_debugfs_files, - ARRAY_SIZE(vid_debugfs_files), - minor->debugfs_root, minor); + drm_debugfs_create_files(vid_debugfs_files, + ARRAY_SIZE(vid_debugfs_files), + minor->debugfs_root, minor); } void sti_vid_commit(struct sti_vid *vid, diff --git a/drivers/gpu/drm/sti/sti_vid.h b/drivers/gpu/drm/sti/sti_vid.h index 9dbd78461de1..991849ba50b5 100644 --- a/drivers/gpu/drm/sti/sti_vid.h +++ b/drivers/gpu/drm/sti/sti_vid.h @@ -26,6 +26,6 @@ void sti_vid_disable(struct sti_vid *vid); struct sti_vid *sti_vid_create(struct device *dev, struct drm_device *drm_dev, int id, void __iomem *baseaddr); -int vid_debugfs_init(struct sti_vid *vid, struct drm_minor *minor); +void vid_debugfs_init(struct sti_vid *vid, struct drm_minor *minor); #endif From patchwork Thu Feb 27 12:02:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wambui Karuga X-Patchwork-Id: 11408583 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id ED73992A for ; Thu, 27 Feb 2020 13:00:13 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id CB904246A0 for ; Thu, 27 Feb 2020 13:00:13 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="AR7qKUbT" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CB904246A0 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D29006ECAF; Thu, 27 Feb 2020 12:59:40 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wr1-x441.google.com (mail-wr1-x441.google.com [IPv6:2a00:1450:4864:20::441]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2F54E6EC95; Thu, 27 Feb 2020 12:03:47 +0000 (UTC) Received: by mail-wr1-x441.google.com with SMTP id l5so3020739wrx.4; Thu, 27 Feb 2020 04:03:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=JDFiHtXUYpw9/7YjF6hgsTU6zXp0udoM7RVARL/tRI4=; b=AR7qKUbTnFZFJhUbiw2wILy8YBU7aRm24uEVrizIZeXUZNnuow1AiJSWkZHsm+ROIT TCuXxcqqWo/c4+PP1chfR05ZAFk0Y37cjOB+LzVCs/7Yv+GqQkguY0Qd4tmjDKPe2gmk 04FjLuFbkYSWXn2+Lw+RsmCYLI0MOPl9L65a6ANyK8JA06Xjdwx/x5d7Oh9P5FS5d6W4 99WcOdHriz+O90flwURtV17N23h0QHARXF3s1oltpvS4r7MzNcVZR2r0o1UMMaJQ1j/t B/BCuUaqv8/tVWdN+iOp7z+A7DftT0ZMcTEY9Eq0JYCTRHJB7WFMiI9QOQjZ5wtQnpxL syQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=JDFiHtXUYpw9/7YjF6hgsTU6zXp0udoM7RVARL/tRI4=; b=sYNmJScj1ZMfWVZyRxnyclA4ODIvliK5AG+jR/F0WpCSrQWNTdJQ+kKHwqUQHHwIKx iOkysgnAyPmeGikuwzzp+cpjmauEZ13/tZ/Iu81APT5s/SeKC+7bwXYiKZPD3jVkSrgv CX5zNtVIfa7lpKIkXZ1Y3mo1cyb0ie9oZQA5Zm81zPQR+4L1XLvQJAt/psqX0q56sWlk plMPel420noIxbbfDDQ4FghExWgrurP8ZGHVtAOn5iHcB9daAFQikd/O3lfSMulrDv6z lUfmgijfyhr0+RGqy6jiDl/kCqA0THaguq+Qvat9+8ngBJKOy+mt/y/MXPGsOTd9N5D6 G01w== X-Gm-Message-State: APjAAAX5b1ut5yHHQuVMd5u3DES/csfhitK1pdUoO9+kl/vmBrYRynCD U9S3OVTt8zgKzDrC3J8tjYk= X-Google-Smtp-Source: APXvYqycfeHEVSwOmkH9aHMERPJ5uUBCwE6v7YS6/+KssWDzjjGaXBNUPLF6j1vpk0YqR5PazYwqlg== X-Received: by 2002:adf:a746:: with SMTP id e6mr4572634wrd.329.1582805025787; Thu, 27 Feb 2020 04:03:45 -0800 (PST) Received: from wambui.zuku.co.ke ([197.237.61.225]) by smtp.googlemail.com with ESMTPSA id t10sm7655017wru.59.2020.02.27.04.03.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Feb 2020 04:03:45 -0800 (PST) From: Wambui Karuga To: daniel@ffwll.ch, airlied@linux.ie, Jani Nikula , Joonas Lahtinen , Rodrigo Vivi Subject: [PATCH 16/21] drm/i915: make *_debugfs_register() functions return void. Date: Thu, 27 Feb 2020 15:02:27 +0300 Message-Id: <20200227120232.19413-17-wambui.karugax@gmail.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200227120232.19413-1-wambui.karugax@gmail.com> References: <20200227120232.19413-1-wambui.karugax@gmail.com> MIME-Version: 1.0 X-Mailman-Approved-At: Thu, 27 Feb 2020 12:59:10 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: gregkh@linuxfoundation.org, intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Since 987d65d01356 (drm: debugfs: make drm_debugfs_create_files() never fail), drm_debugfs_create_files() never fails and should return void. Therefore, remove its use as the return value of i915_debugfs_register() and intel_display_debugfs_register() and have both functions return void. Signed-off-by: Wambui Karuga --- drivers/gpu/drm/i915/display/intel_display_debugfs.c | 8 ++++---- drivers/gpu/drm/i915/display/intel_display_debugfs.h | 4 ++-- drivers/gpu/drm/i915/i915_debugfs.c | 8 ++++---- drivers/gpu/drm/i915/i915_debugfs.h | 4 ++-- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_display_debugfs.c b/drivers/gpu/drm/i915/display/intel_display_debugfs.c index 46954cc7b6c0..3b877c34c420 100644 --- a/drivers/gpu/drm/i915/display/intel_display_debugfs.c +++ b/drivers/gpu/drm/i915/display/intel_display_debugfs.c @@ -1922,7 +1922,7 @@ static const struct { {"i915_edp_psr_debug", &i915_edp_psr_debug_fops}, }; -int intel_display_debugfs_register(struct drm_i915_private *i915) +void intel_display_debugfs_register(struct drm_i915_private *i915) { struct drm_minor *minor = i915->drm.primary; int i; @@ -1935,9 +1935,9 @@ int intel_display_debugfs_register(struct drm_i915_private *i915) intel_display_debugfs_files[i].fops); } - return drm_debugfs_create_files(intel_display_debugfs_list, - ARRAY_SIZE(intel_display_debugfs_list), - minor->debugfs_root, minor); + drm_debugfs_create_files(intel_display_debugfs_list, + ARRAY_SIZE(intel_display_debugfs_list), + minor->debugfs_root, minor); } static int i915_panel_show(struct seq_file *m, void *data) diff --git a/drivers/gpu/drm/i915/display/intel_display_debugfs.h b/drivers/gpu/drm/i915/display/intel_display_debugfs.h index a3bea1ce04c2..a5cf7a6d3d34 100644 --- a/drivers/gpu/drm/i915/display/intel_display_debugfs.h +++ b/drivers/gpu/drm/i915/display/intel_display_debugfs.h @@ -10,10 +10,10 @@ struct drm_connector; struct drm_i915_private; #ifdef CONFIG_DEBUG_FS -int intel_display_debugfs_register(struct drm_i915_private *i915); +void intel_display_debugfs_register(struct drm_i915_private *i915); int intel_connector_debugfs_add(struct drm_connector *connector); #else -static inline int intel_display_debugfs_register(struct drm_i915_private *i915) { return 0; } +static inline int intel_display_debugfs_register(struct drm_i915_private *i915) {} static inline int intel_connector_debugfs_add(struct drm_connector *connector) { return 0; } #endif diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c index 8f2525e4ce0f..de313199c714 100644 --- a/drivers/gpu/drm/i915/i915_debugfs.c +++ b/drivers/gpu/drm/i915/i915_debugfs.c @@ -2392,7 +2392,7 @@ static const struct i915_debugfs_files { {"i915_guc_log_relay", &i915_guc_log_relay_fops}, }; -int i915_debugfs_register(struct drm_i915_private *dev_priv) +void i915_debugfs_register(struct drm_i915_private *dev_priv) { struct drm_minor *minor = dev_priv->drm.primary; int i; @@ -2409,7 +2409,7 @@ int i915_debugfs_register(struct drm_i915_private *dev_priv) i915_debugfs_files[i].fops); } - return drm_debugfs_create_files(i915_debugfs_list, - I915_DEBUGFS_ENTRIES, - minor->debugfs_root, minor); + drm_debugfs_create_files(i915_debugfs_list, + I915_DEBUGFS_ENTRIES, + minor->debugfs_root, minor); } diff --git a/drivers/gpu/drm/i915/i915_debugfs.h b/drivers/gpu/drm/i915/i915_debugfs.h index 6da39c76ab5e..1de2736f1248 100644 --- a/drivers/gpu/drm/i915/i915_debugfs.h +++ b/drivers/gpu/drm/i915/i915_debugfs.h @@ -12,10 +12,10 @@ struct drm_i915_private; struct seq_file; #ifdef CONFIG_DEBUG_FS -int i915_debugfs_register(struct drm_i915_private *dev_priv); +void i915_debugfs_register(struct drm_i915_private *dev_priv); void i915_debugfs_describe_obj(struct seq_file *m, struct drm_i915_gem_object *obj); #else -static inline int i915_debugfs_register(struct drm_i915_private *dev_priv) { return 0; } +static inline void i915_debugfs_register(struct drm_i915_private *dev_priv) {} static inline void i915_debugfs_describe_obj(struct seq_file *m, struct drm_i915_gem_object *obj) {} #endif From patchwork Thu Feb 27 12:02:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wambui Karuga X-Patchwork-Id: 11408571 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4F2EE14B4 for ; Thu, 27 Feb 2020 13:00:01 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2C1E424693 for ; Thu, 27 Feb 2020 13:00:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="DjF8bSXa" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2C1E424693 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3BAAE6ECB0; Thu, 27 Feb 2020 12:59:41 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wm1-x343.google.com (mail-wm1-x343.google.com [IPv6:2a00:1450:4864:20::343]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4EE4A6EC96 for ; Thu, 27 Feb 2020 12:03:50 +0000 (UTC) Received: by mail-wm1-x343.google.com with SMTP id a141so3109447wme.2 for ; Thu, 27 Feb 2020 04:03:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=P/F7RIx+9SUwwtWwjcWvQf8uTf1pG7IKUNhe5nQ/dsk=; b=DjF8bSXaPpeF2aqQW2zM7PDB8yZEaM3Omcoznwdy+f9o7qu5S8yJHsMua/+2do8sDC H1My8KuIBQwkcwdY+fUS11dDsMdZlxhvYWjHO/yOgJxQXq37jItgmOjFQVy9v4ZToabc EMMUjf8FeAb8o8sdlyJTyPmYm+quXJ+AJtoajWX9gIebljiftnUIjG+MNHld1zGGkbBj W828gAnoDWOCqwF8OH4ts3bPhGIsShQmLxCMbbzYdIpYVWteH2zVYF6i5CJ+Z8vsDl5E eB7GUUUP9l4btMnTrTCrh3LJzE8SLunOCi/0K0EdbiyTmELdt1I9pSRdMRo+3D7vavM+ 9qnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=P/F7RIx+9SUwwtWwjcWvQf8uTf1pG7IKUNhe5nQ/dsk=; b=m3pilpwnIFm5X9FBTpAxXrTeXkDYtXww6EB8/nkEOB6mIOdXkKRJv75j91rJ9fSgCb HRyb7lUQu4tL2eiWV0lyj7NzLQRW78mZYP8kmI+tMK+TXCWq/xIoDjMsgUpms8iOMi5r l3kqtFndGO6eI204p26WeYP/dQcI7tnXYmXZvZ3cIZJvEVzoOR/wNBa/m+fByb3AUg0V G11H+X/F7mtyLbLUmIN8qqDgSsOvz4n/xPS81aITD7AmmJAk7GMrC4uZARKIhpw2sK69 F1PPi53UrsICwi5HBw2QWRJol2Pc0R/Q8EliCeML6uJpPZSQ01rznhIzWWYTVsufe6nN ENRQ== X-Gm-Message-State: APjAAAVkLyYDJOaNfYwrOQU0CVUbTli2wWuccR5/PnPCztsVXHpuvaoh pgZLeINGOgi0wsTJV1I1smA= X-Google-Smtp-Source: APXvYqw2m6lnhgwdcVIy5+XBGvgEz0kXIyQsiTFpaxOh0RoL419orS6n6MJ5JhIrZMuOETmKv+1A/Q== X-Received: by 2002:a1c:25c6:: with SMTP id l189mr5018868wml.104.1582805029054; Thu, 27 Feb 2020 04:03:49 -0800 (PST) Received: from wambui.zuku.co.ke ([197.237.61.225]) by smtp.googlemail.com with ESMTPSA id t10sm7655017wru.59.2020.02.27.04.03.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Feb 2020 04:03:48 -0800 (PST) From: Wambui Karuga To: daniel@ffwll.ch, airlied@linux.ie, Jyri Sarha , Tomi Valkeinen Subject: [PATCH 17/21] drm/tilcdc: remove check for return value of debugfs functions. Date: Thu, 27 Feb 2020 15:02:28 +0300 Message-Id: <20200227120232.19413-18-wambui.karugax@gmail.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200227120232.19413-1-wambui.karugax@gmail.com> References: <20200227120232.19413-1-wambui.karugax@gmail.com> MIME-Version: 1.0 X-Mailman-Approved-At: Thu, 27 Feb 2020 12:59:10 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Since 987d65d01356 (drm: debugfs: make drm_debugfs_create_files() never fail), drm_debugfs_create_files() never fails. Therefore, remove the check and error handling of the return value of drm_debugfs_create_files() as it is not needed in tilcdc_debugfs_init(). Also remove local variables that are not used after the changes, and declare tilcdc_debugfs_init() as void. Signed-off-by: Wambui Karuga --- drivers/gpu/drm/tilcdc/tilcdc_drv.c | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/drivers/gpu/drm/tilcdc/tilcdc_drv.c b/drivers/gpu/drm/tilcdc/tilcdc_drv.c index 0791a0200cc3..78c1877d13a8 100644 --- a/drivers/gpu/drm/tilcdc/tilcdc_drv.c +++ b/drivers/gpu/drm/tilcdc/tilcdc_drv.c @@ -478,26 +478,17 @@ static struct drm_info_list tilcdc_debugfs_list[] = { { "mm", tilcdc_mm_show, 0 }, }; -static int tilcdc_debugfs_init(struct drm_minor *minor) +static void tilcdc_debugfs_init(struct drm_minor *minor) { - struct drm_device *dev = minor->dev; struct tilcdc_module *mod; - int ret; - ret = drm_debugfs_create_files(tilcdc_debugfs_list, - ARRAY_SIZE(tilcdc_debugfs_list), - minor->debugfs_root, minor); + drm_debugfs_create_files(tilcdc_debugfs_list, + ARRAY_SIZE(tilcdc_debugfs_list), + minor->debugfs_root, minor); list_for_each_entry(mod, &module_list, list) if (mod->funcs->debugfs_init) mod->funcs->debugfs_init(mod, minor); - - if (ret) { - dev_err(dev->dev, "could not install tilcdc_debugfs_list\n"); - return ret; - } - - return ret; } #endif From patchwork Thu Feb 27 12:02:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wambui Karuga X-Patchwork-Id: 11408537 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E002B924 for ; Thu, 27 Feb 2020 12:59:14 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BD6C524693 for ; Thu, 27 Feb 2020 12:59:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="DJ12is7n" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BD6C524693 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 421F66E8B5; Thu, 27 Feb 2020 12:59:11 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) by gabe.freedesktop.org (Postfix) with ESMTPS id 11E056E86D for ; Thu, 27 Feb 2020 12:03:54 +0000 (UTC) Received: by mail-wr1-x443.google.com with SMTP id j16so1458595wrt.3 for ; Thu, 27 Feb 2020 04:03:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=iLpawHdR33Cmeb66Wb9RCeN8N4vHyeCAeNVuUL7fY+w=; b=DJ12is7nziFZhaEhNTzxh/MUtVrKyT+uhRK9FCcvg2bnIVoJcKfzbrMCdEn9aHNBcq u2KS5dKnWgsxrVfOGWGY5ZvIpbCudLv4oRJwxrEki/4tWiQ+uZg+nThhboU4H6xdAvLd CwNJdO5U146vIGQDxcA3tD10qU9jh9ZzLNyLwL/9AulITTuhlJcd3yENVQ3vJ+gVxvLj gytvwF0Ts00fnjsyI+eM+GiKJA/WNsZgrjZjwJEoKYSDf35eic7PZ7NMmkO3k/wwdaKI FtlbBtVlFApEilsDT66MFNNnDwF1w1xGp97xgSnjqii+3gOXuZpEvC+O2GokIbIlWOTg NR0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=iLpawHdR33Cmeb66Wb9RCeN8N4vHyeCAeNVuUL7fY+w=; b=J8ZaWvkDQo8c1OZy81fegtkTDW9gRUDpNH07Y6Mbww5RWHjy8jDPbVkfhv+O5XymM3 zXyn2GpPUXSotgtGXbnQZU75oNj8T7q3kN0DyXOlj6KjM3cL8EJc9u0C5CxnYKS6rGCU nv1c3Xd4I7SR/vcgeu9zPMWPcsrz+Z8WBlQnRLhpt2AztLhNF6FONt9keICIkrb7nE+C tDcUeCEBfzpH8xEVUN+JHWOrS4k/xos0Cj8ciNmnp2n3miX5OL4QyGrEu6mzZG3AGiSk 3y30FcWItAq8X/30k5AyWJqRVuNylPzIQb4oFZCAggKUjj13G44hHAn1v5g3l/+frp4B pC6A== X-Gm-Message-State: APjAAAUhykpZomDYpBRQAkGs1OuRNze4SOYRC+N1PhReEUHLEjG1PmT6 CSBrooFnc3Y2k+sETCxxyo0= X-Google-Smtp-Source: APXvYqzZP5GszXytVURkcYCrRKKgmojQxMcrPMh4iNIt7d3+P7L7mWVIFbuGKTnL73Xktkg6h6hCuQ== X-Received: by 2002:adf:f3d1:: with SMTP id g17mr4402170wrp.378.1582805032699; Thu, 27 Feb 2020 04:03:52 -0800 (PST) Received: from wambui.zuku.co.ke ([197.237.61.225]) by smtp.googlemail.com with ESMTPSA id t10sm7655017wru.59.2020.02.27.04.03.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Feb 2020 04:03:52 -0800 (PST) From: Wambui Karuga To: daniel@ffwll.ch, airlied@linux.ie, Gerd Hoffmann Subject: [PATCH 18/21] drm/virtio: make virtio_gpu_debugfs() return void. Date: Thu, 27 Feb 2020 15:02:29 +0300 Message-Id: <20200227120232.19413-19-wambui.karugax@gmail.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200227120232.19413-1-wambui.karugax@gmail.com> References: <20200227120232.19413-1-wambui.karugax@gmail.com> MIME-Version: 1.0 X-Mailman-Approved-At: Thu, 27 Feb 2020 12:59:10 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Since 987d65d01356 (drm: debugfs: make drm_debugfs_create_files() never fail), drm_debugfs_create_files() never fails and should return void. Therefore, remove its use as the return value of virtio_gpu_debugfs() and have the latter function return void. Signed-off-by: Wambui Karuga --- drivers/gpu/drm/virtio/virtgpu_debugfs.c | 3 +-- drivers/gpu/drm/virtio/virtgpu_drv.h | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/virtio/virtgpu_debugfs.c b/drivers/gpu/drm/virtio/virtgpu_debugfs.c index e27120d512b0..3221520f61f0 100644 --- a/drivers/gpu/drm/virtio/virtgpu_debugfs.c +++ b/drivers/gpu/drm/virtio/virtgpu_debugfs.c @@ -72,11 +72,10 @@ static struct drm_info_list virtio_gpu_debugfs_list[] = { #define VIRTIO_GPU_DEBUGFS_ENTRIES ARRAY_SIZE(virtio_gpu_debugfs_list) -int +void virtio_gpu_debugfs_init(struct drm_minor *minor) { drm_debugfs_create_files(virtio_gpu_debugfs_list, VIRTIO_GPU_DEBUGFS_ENTRIES, minor->debugfs_root, minor); - return 0; } diff --git a/drivers/gpu/drm/virtio/virtgpu_drv.h b/drivers/gpu/drm/virtio/virtgpu_drv.h index 95a7443baaba..3b843bb72cd1 100644 --- a/drivers/gpu/drm/virtio/virtgpu_drv.h +++ b/drivers/gpu/drm/virtio/virtgpu_drv.h @@ -371,6 +371,6 @@ struct drm_gem_object *virtgpu_gem_prime_import_sg_table( struct sg_table *sgt); /* virgl debugfs */ -int virtio_gpu_debugfs_init(struct drm_minor *minor); +void virtio_gpu_debugfs_init(struct drm_minor *minor); #endif From patchwork Thu Feb 27 12:02:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wambui Karuga X-Patchwork-Id: 11408553 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 48337924 for ; Thu, 27 Feb 2020 12:59:49 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 25E1924698 for ; Thu, 27 Feb 2020 12:59:49 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="TMJX/X0S" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 25E1924698 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A7E196ECA7; Thu, 27 Feb 2020 12:59:39 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wm1-x342.google.com (mail-wm1-x342.google.com [IPv6:2a00:1450:4864:20::342]) by gabe.freedesktop.org (Postfix) with ESMTPS id 85FCA6E86D for ; Thu, 27 Feb 2020 12:03:57 +0000 (UTC) Received: by mail-wm1-x342.google.com with SMTP id f15so3240936wml.3 for ; Thu, 27 Feb 2020 04:03:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=qtHezE3UGL1RPYJOwBTjyDIi0Fh4N6k97/ik2JLlTsM=; b=TMJX/X0S8sBJVi0Yp1uUUHmgnXpAO/i1XPye+sdM84ZXBcJFwfGuRbf0QmdaNi5v6+ WWs3HrfR+0tNL6/ctrvxd/vP556Ce6RZvgrl1hkmaKA1c9dxIsZ2Y7lOS24IeQwXHXv9 e31xzGLy7AaM9+eoo5mFcNSF33Z6WfCXZX7uZCSCQ9EvNL4U6YWUQiGNectCr3YpFa+X gmpWJRW6j0+OrhUChyYwCCP0MV7mCK4tjF3qBjxVwDjROE2oRJeo5W0zZRh4aWZtoFMd 59+b4OgpXT6Dg63JnxaVfhNV3y4w9ChKczgBJd3tMh+yk/ZIvdmtLkYTM7pmxxn7N+kZ qSJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=qtHezE3UGL1RPYJOwBTjyDIi0Fh4N6k97/ik2JLlTsM=; b=HOUSJ3HnBcZG+3vFya6veoeGUjRfmT+1/ZshUeB6Xcc4Zql2MtqZLcl9QSl2h9ViXC HT4OOcyFgUA8elVQHCDfSuq3eIdwJGTzMaspz/NPnK/Ac36+HRwPih9l+o15/kKCG3/Y WF4qFYQf4CO0d8Fr0AiZUVnkTxHGXa5dpqqkqfJuAv3ArcfUxE0Pm2MYdWv0WQwBRZFs G9E82sOGYlW7CLGJwKyqquQn2Xen3yKD9lSO1HsWDm40CRadtFb6QUsr8Id8jIkPwK7q eJtP+Xt4bxAOm6Bznady80V9pgUrUugWeAjk5BnT3Z5AThN7kGpdwP9yMbiqWCl4NVFx hMew== X-Gm-Message-State: APjAAAXv7xi7UdwNmK4JbV/XZXtBQ/SPl9yYC7DSpjEbBKV7tW/ym/QD +RvtS/24LpsnN7LNXU8hTro= X-Google-Smtp-Source: APXvYqws1uPMjBRoMVkeVqz7GBquunp9ZSqYKqUnCjXmOFLkbEp4mvdi77iUzZXlZKIR+Os1fu9FAQ== X-Received: by 2002:a05:600c:2255:: with SMTP id a21mr2127251wmm.79.1582805036202; Thu, 27 Feb 2020 04:03:56 -0800 (PST) Received: from wambui.zuku.co.ke ([197.237.61.225]) by smtp.googlemail.com with ESMTPSA id t10sm7655017wru.59.2020.02.27.04.03.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Feb 2020 04:03:55 -0800 (PST) From: Wambui Karuga To: daniel@ffwll.ch, airlied@linux.ie, Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann Subject: [PATCH 19/21] drm/mipi_dbi: make midi_dbi_debugfs_init() return void. Date: Thu, 27 Feb 2020 15:02:30 +0300 Message-Id: <20200227120232.19413-20-wambui.karugax@gmail.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200227120232.19413-1-wambui.karugax@gmail.com> References: <20200227120232.19413-1-wambui.karugax@gmail.com> MIME-Version: 1.0 X-Mailman-Approved-At: Thu, 27 Feb 2020 12:59:10 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" As midi_dbi_debugfs_init() never fails and does not return anything other than zero, declare its return value as void. Signed-off-by: Wambui Karuga --- drivers/gpu/drm/drm_mipi_dbi.c | 6 +----- include/drm/drm_mipi_dbi.h | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/drm_mipi_dbi.c b/drivers/gpu/drm/drm_mipi_dbi.c index 558baf989f5a..113a767442d3 100644 --- a/drivers/gpu/drm/drm_mipi_dbi.c +++ b/drivers/gpu/drm/drm_mipi_dbi.c @@ -1308,10 +1308,8 @@ static const struct file_operations mipi_dbi_debugfs_command_fops = { * controller or getting the read command values. * Drivers can use this as their &drm_driver->debugfs_init callback. * - * Returns: - * Zero on success, negative error code on failure. */ -int mipi_dbi_debugfs_init(struct drm_minor *minor) +void mipi_dbi_debugfs_init(struct drm_minor *minor) { struct mipi_dbi_dev *dbidev = drm_to_mipi_dbi_dev(minor->dev); umode_t mode = S_IFREG | S_IWUSR; @@ -1320,8 +1318,6 @@ int mipi_dbi_debugfs_init(struct drm_minor *minor) mode |= S_IRUGO; debugfs_create_file("command", mode, minor->debugfs_root, dbidev, &mipi_dbi_debugfs_command_fops); - - return 0; } EXPORT_SYMBOL(mipi_dbi_debugfs_init); diff --git a/include/drm/drm_mipi_dbi.h b/include/drm/drm_mipi_dbi.h index 33f325f5af2b..30ebdfd8a51f 100644 --- a/include/drm/drm_mipi_dbi.h +++ b/include/drm/drm_mipi_dbi.h @@ -192,7 +192,7 @@ int mipi_dbi_buf_copy(void *dst, struct drm_framebuffer *fb, }) #ifdef CONFIG_DEBUG_FS -int mipi_dbi_debugfs_init(struct drm_minor *minor); +void mipi_dbi_debugfs_init(struct drm_minor *minor); #else #define mipi_dbi_debugfs_init NULL #endif From patchwork Thu Feb 27 12:02:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wambui Karuga X-Patchwork-Id: 11408575 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6ED5A924 for ; Thu, 27 Feb 2020 13:00:05 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4C28224693 for ; Thu, 27 Feb 2020 13:00:05 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="YAZcESBc" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4C28224693 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id DC3AD6ECAA; Thu, 27 Feb 2020 12:59:39 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wm1-x343.google.com (mail-wm1-x343.google.com [IPv6:2a00:1450:4864:20::343]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6CB656EC94 for ; Thu, 27 Feb 2020 12:04:00 +0000 (UTC) Received: by mail-wm1-x343.google.com with SMTP id t14so3089996wmi.5 for ; Thu, 27 Feb 2020 04:04:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=2+KWhSsNubWek+s087bQ51ysemcEcbIre0xKjY3xCvk=; b=YAZcESBcaRtP75t+snUpVawMs7r/LA1nbZUdnL2VIerOC1w737obl8VFdfneZhFyr0 R4B26u9NH0H9Xl8cgeFuWHsQlTyFI1XPz9CBFWHW1h6zkq1ZOIIwuBpyX5YTGBlkmXv0 iMERA3ryPFf4mKdbu90j3uNmXLLqDmYEwgrhrji+tjkM5HHWyo71/MVGmj/MP6FCQLw5 5gi9l9+wFeJTr0/E1FJ/TcVXvisgtqdM01QSnsga9l42kvJv97qWcqCSBx4dFTi01DN0 zHuG8+XwUPf8OwTC5wHUikg43DDWSHZxQETRa6+imlIlCcZmKjxMTNoMn4/M7lO7MsbE zsNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=2+KWhSsNubWek+s087bQ51ysemcEcbIre0xKjY3xCvk=; b=nVG0HzQuo+HQnLiPSerw/QM7nZw5G8yBER/QRq3qZ+RUE1AkkviplJoiNaqPqrUd8v Oj3xMcNd5yFfyDVysmPtvd53C+iGVQYg46XJYjVvzJvJIfcqGY9miEBhnKt83AJZP/ZH zncD7fEuUsPCiI2ossQkdLhZ5WxeGeGiRhw1z+UWNwRZIHbEYCIKV9FcN9dHZrW+yrR/ Xx5vR5lW5OUKc9Eomcy9oFAXUSt15MOwlcGJvTnOTk9WFRa+wZ++ROEfdXG0OgtTKChk fW9WSTlBFcb4RZGoqlIRcwz1FK8lZ5mBCgXxMNDp0z8EM4yFJ01YTQ7wjOy8WVh99Z/9 fx8A== X-Gm-Message-State: APjAAAW5vfe5kOWkskFQGfyOjmRKlBgq10ELWy/KqFAmW+NJoaOqdQB4 wP0ZnI/ekXL37BfpZQS8Mrgx9HeVx8x0TA== X-Google-Smtp-Source: APXvYqxx19oGBiLrWAtloY4wWfqjFYr5alL5OMX+ojOw8tLj4vCW431S4STSJoEbFI9Pecu86moChA== X-Received: by 2002:a1c:108:: with SMTP id 8mr4992146wmb.30.1582805039094; Thu, 27 Feb 2020 04:03:59 -0800 (PST) Received: from wambui.zuku.co.ke ([197.237.61.225]) by smtp.googlemail.com with ESMTPSA id t10sm7655017wru.59.2020.02.27.04.03.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Feb 2020 04:03:58 -0800 (PST) From: Wambui Karuga To: daniel@ffwll.ch, airlied@linux.ie, Gerd Hoffmann Subject: [PATCH 20/21] drm/qxl: have debugfs functions return void. Date: Thu, 27 Feb 2020 15:02:31 +0300 Message-Id: <20200227120232.19413-21-wambui.karugax@gmail.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200227120232.19413-1-wambui.karugax@gmail.com> References: <20200227120232.19413-1-wambui.karugax@gmail.com> MIME-Version: 1.0 X-Mailman-Approved-At: Thu, 27 Feb 2020 12:59:10 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Due to the conversion of the .debugfs_init() hook to return void (drm: convert the .debugfs_init() hook to return void), there is no need for the return value of qxl_debugfs_init(). Therefore, refactor the function to return void. This change also includes the conversion of various functions that can be converted to return void as a result of the changes to qxl_debugfs_init(). Signed-off-by: Wambui Karuga --- drivers/gpu/drm/qxl/qxl_debugfs.c | 21 +++++++-------------- drivers/gpu/drm/qxl/qxl_drv.h | 13 +++++-------- drivers/gpu/drm/qxl/qxl_ttm.c | 6 ++---- 3 files changed, 14 insertions(+), 26 deletions(-) diff --git a/drivers/gpu/drm/qxl/qxl_debugfs.c b/drivers/gpu/drm/qxl/qxl_debugfs.c index a4f4175bbdbe..88123047fdd4 100644 --- a/drivers/gpu/drm/qxl/qxl_debugfs.c +++ b/drivers/gpu/drm/qxl/qxl_debugfs.c @@ -79,36 +79,30 @@ static struct drm_info_list qxl_debugfs_list[] = { #define QXL_DEBUGFS_ENTRIES ARRAY_SIZE(qxl_debugfs_list) #endif -int +void qxl_debugfs_init(struct drm_minor *minor) { #if defined(CONFIG_DEBUG_FS) - int r; struct qxl_device *dev = (struct qxl_device *) minor->dev->dev_private; drm_debugfs_create_files(qxl_debugfs_list, QXL_DEBUGFS_ENTRIES, minor->debugfs_root, minor); - r = qxl_ttm_debugfs_init(dev); - if (r) { - DRM_ERROR("Failed to init TTM debugfs\n"); - return r; - } + qxl_ttm_debugfs_init(dev); #endif - return 0; } -int qxl_debugfs_add_files(struct qxl_device *qdev, - struct drm_info_list *files, - unsigned int nfiles) +void qxl_debugfs_add_files(struct qxl_device *qdev, + struct drm_info_list *files, + unsigned int nfiles) { unsigned int i; for (i = 0; i < qdev->debugfs_count; i++) { if (qdev->debugfs[i].files == files) { /* Already registered */ - return 0; + return; } } @@ -116,7 +110,7 @@ int qxl_debugfs_add_files(struct qxl_device *qdev, if (i > QXL_DEBUGFS_MAX_COMPONENTS) { DRM_ERROR("Reached maximum number of debugfs components.\n"); DRM_ERROR("Report so we increase QXL_DEBUGFS_MAX_COMPONENTS.\n"); - return -EINVAL; + return; } qdev->debugfs[qdev->debugfs_count].files = files; qdev->debugfs[qdev->debugfs_count].num_files = nfiles; @@ -126,5 +120,4 @@ int qxl_debugfs_add_files(struct qxl_device *qdev, qdev->ddev.primary->debugfs_root, qdev->ddev.primary); #endif - return 0; } diff --git a/drivers/gpu/drm/qxl/qxl_drv.h b/drivers/gpu/drm/qxl/qxl_drv.h index 27e45a2d6b52..435126facc9b 100644 --- a/drivers/gpu/drm/qxl/qxl_drv.h +++ b/drivers/gpu/drm/qxl/qxl_drv.h @@ -190,9 +190,6 @@ struct qxl_debugfs { unsigned int num_files; }; -int qxl_debugfs_add_files(struct qxl_device *rdev, - struct drm_info_list *files, - unsigned int nfiles); int qxl_debugfs_fence_init(struct qxl_device *rdev); struct qxl_device; @@ -442,8 +439,8 @@ int qxl_garbage_collect(struct qxl_device *qdev); /* debugfs */ -int qxl_debugfs_init(struct drm_minor *minor); -int qxl_ttm_debugfs_init(struct qxl_device *qdev); +void qxl_debugfs_init(struct drm_minor *minor); +void qxl_ttm_debugfs_init(struct qxl_device *qdev); /* qxl_prime.c */ int qxl_gem_prime_pin(struct drm_gem_object *obj); @@ -461,9 +458,9 @@ int qxl_gem_prime_mmap(struct drm_gem_object *obj, int qxl_irq_init(struct qxl_device *qdev); irqreturn_t qxl_irq_handler(int irq, void *arg); -int qxl_debugfs_add_files(struct qxl_device *qdev, - struct drm_info_list *files, - unsigned int nfiles); +void qxl_debugfs_add_files(struct qxl_device *qdev, + struct drm_info_list *files, + unsigned int nfiles); int qxl_surface_id_alloc(struct qxl_device *qdev, struct qxl_bo *surf); diff --git a/drivers/gpu/drm/qxl/qxl_ttm.c b/drivers/gpu/drm/qxl/qxl_ttm.c index 62a5e424971b..93a2eb14844b 100644 --- a/drivers/gpu/drm/qxl/qxl_ttm.c +++ b/drivers/gpu/drm/qxl/qxl_ttm.c @@ -322,7 +322,7 @@ static int qxl_mm_dump_table(struct seq_file *m, void *data) } #endif -int qxl_ttm_debugfs_init(struct qxl_device *qdev) +void qxl_ttm_debugfs_init(struct qxl_device *qdev) { #if defined(CONFIG_DEBUG_FS) static struct drm_info_list qxl_mem_types_list[QXL_DEBUGFS_MEM_TYPES]; @@ -343,8 +343,6 @@ int qxl_ttm_debugfs_init(struct qxl_device *qdev) qxl_mem_types_list[i].data = qdev->mman.bdev.man[TTM_PL_PRIV].priv; } - return qxl_debugfs_add_files(qdev, qxl_mem_types_list, i); -#else - return 0; + qxl_debugfs_add_files(qdev, qxl_mem_types_list, i); #endif } From patchwork Thu Feb 27 12:02:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wambui Karuga X-Patchwork-Id: 11408557 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0DA7014B4 for ; Thu, 27 Feb 2020 12:59:52 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E052D24693 for ; Thu, 27 Feb 2020 12:59:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="eYp7pK09" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E052D24693 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6F0516ECAE; Thu, 27 Feb 2020 12:59:41 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) by gabe.freedesktop.org (Postfix) with ESMTPS id 421786EC96 for ; Thu, 27 Feb 2020 12:04:04 +0000 (UTC) Received: by mail-wr1-x442.google.com with SMTP id z15so3040364wrl.1 for ; Thu, 27 Feb 2020 04:04:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=5RmVYnpM+0YRA6Cv2NCMoJPgFkzlEM1UmxN/+rA46XY=; b=eYp7pK095FWJZ22AF506/TxhHaBaOUrk6NBpcrFHMd7Q1CeGnht2M2Isss9iDeLBI8 KL4fsGDE/euAxYh219pEjWMbkE1Xs7EKw5PSlShRq+Hf9AknfRpZQnInkBNGXTvhnX0J mLEnA01NnD/XNycEpdVZUJ08nsV4RU5aau8gTJmldLpHI5WtXFKFhf/SODX3oTnDnTN/ UaEi/uF1vqwYto5JhGKr3gAajyyCrRqEIZZmeaclxt2e9imBYcWPbVlWopXp/2so0qWV UUPdH843sXBS99qT6Hi0/+ohXETPvMXjPWoOAENdeQWrVVWDXQmAyMPS306mgfOmtl5d 277Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=5RmVYnpM+0YRA6Cv2NCMoJPgFkzlEM1UmxN/+rA46XY=; b=NqhW/xcgdW62n+mlNWx/CdakOFX9gDzZ2GrUCeosEZbdgBbXiiUTY9owec4NPDuQCk WTK//hvhSlv5e9JCO4lN9NPvsvZYxEoWnlEipQ4Unz5zLN8PEQ5ex//DAfgJr1h/q23C k1ymMPHALXl9h4RiL9n5MTvTuRTGD5b52nX0tK4DmysVhs0DRHGwKja1ZC+FzlxKC82O S61vVboAQg6DtYLyeOym5GAoXcSHU27JhP2kOfZBEuR0EFlGyyRuY0yh4MB3oUVeHWIb rf0nTXeDT9YqvbzqOXXshOjq32DAiIJXP8buNoemtFgsHMELIJgCv2p9nWhutzAyMDVj joag== X-Gm-Message-State: APjAAAX5GZ9Z2v/D9pR6yea5PFs20Ipg4tzuglVufMV+m371sYg62v0F 7MmWy1Plp/ThZ3WGERm3ZE4= X-Google-Smtp-Source: APXvYqz4WeZdLGhzPJnokepnWxHo1W+4oAupLckaGCVy2TSEI09yxz0Zdl8ZBaoACC7g6gyM+DcRQQ== X-Received: by 2002:a5d:424e:: with SMTP id s14mr4834741wrr.226.1582805042932; Thu, 27 Feb 2020 04:04:02 -0800 (PST) Received: from wambui.zuku.co.ke ([197.237.61.225]) by smtp.googlemail.com with ESMTPSA id t10sm7655017wru.59.2020.02.27.04.03.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Feb 2020 04:04:02 -0800 (PST) From: Wambui Karuga To: daniel@ffwll.ch, airlied@linux.ie, Liviu Dudau , Brian Starkey Subject: [PATCH 21/21] drm/arm: have malidp_debufs_init() return void Date: Thu, 27 Feb 2020 15:02:32 +0300 Message-Id: <20200227120232.19413-22-wambui.karugax@gmail.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200227120232.19413-1-wambui.karugax@gmail.com> References: <20200227120232.19413-1-wambui.karugax@gmail.com> MIME-Version: 1.0 X-Mailman-Approved-At: Thu, 27 Feb 2020 12:59:10 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" As there's no need for the return value in malidp_debugfs_init() after the conversion of the drm_driver.debugfs_init() hook, (drm: convert the .debugs_init() hook to return void), convert the malidp_debugfs_init() function to return void. Signed-off-by: Wambui Karuga Acked-by: Liviu Dudau --- drivers/gpu/drm/arm/malidp_drv.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/arm/malidp_drv.c b/drivers/gpu/drm/arm/malidp_drv.c index 37d92a06318e..def8c9ffafca 100644 --- a/drivers/gpu/drm/arm/malidp_drv.c +++ b/drivers/gpu/drm/arm/malidp_drv.c @@ -548,7 +548,7 @@ static const struct file_operations malidp_debugfs_fops = { .release = single_release, }; -static int malidp_debugfs_init(struct drm_minor *minor) +static void malidp_debugfs_init(struct drm_minor *minor) { struct malidp_drm *malidp = minor->dev->dev_private; @@ -557,7 +557,6 @@ static int malidp_debugfs_init(struct drm_minor *minor) spin_lock_init(&malidp->errors_lock); debugfs_create_file("debug", S_IRUGO | S_IWUSR, minor->debugfs_root, minor->dev, &malidp_debugfs_fops); - return 0; } #endif //CONFIG_DEBUG_FS