From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2AF8EC3F2C6 for ; Tue, 10 Mar 2020 13:32:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id F2FD824649 for ; Tue, 10 Mar 2020 13:32:06 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="mqSjKHGj" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729661AbgCJNcG (ORCPT ); Tue, 10 Mar 2020 09:32:06 -0400 Received: from mail-wm1-f67.google.com ([209.85.128.67]:39184 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729017AbgCJNcD (ORCPT ); Tue, 10 Mar 2020 09:32:03 -0400 Received: by mail-wm1-f67.google.com with SMTP id f7so1352083wml.4 for ; Tue, 10 Mar 2020 06:32:01 -0700 (PDT) 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=0PDXUNP0CNWIcOfZIatzfIp7MveLX2/j+5KT4VopvNc=; b=mqSjKHGj010PNQfFZwfvEAmV8ADnB1wWjI4PptouwtPF1tHRYa+/DX4AQxW14hNUIy yws6pL6lXIbp/OY5sKPGIpD+hiliV3ZIpgEaM2hRRoksOdzVTJhmUpUTPMkcXPQE70AM oaluGsvPDi9Ae258jTLONdHvwLzIaaLTz4ASzlhD0zMfanLXbc0aJktA/Z97UdNtnoTv BlxmaVfkLnP1Lg5RkSevCvFVdlINZNRcroScsQuOjIUz7eD8Q6v/e5jagkdBjmUsHTvL qP6T0H63x/A0Fxb38hSCohESNWEF3RklHtLnBF4BGVDPkpgdNNVBdGrnoVGoBT+JURVA KJWw== 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=0PDXUNP0CNWIcOfZIatzfIp7MveLX2/j+5KT4VopvNc=; b=T8EZpfuL7BYNK/rdy8fwMzhYJw3oI01OXJ1woJfekprsLXChVi+TwmYtNejx371e4L oJt6MjXFf1q1IxA3HWclQ2CTFymys9OLnL7mFmK6KZwpHj1T9ydXN6jYLiWvltF6xfJ9 iIWDCsPT221cNFHFKVBWUuDRgk4xZrd28BMn7O6rl2CjQ0+Tnzmbfwbh9Ourk1WJ7DZQ UQkM6nvo6hTRa9KbCt4XDf/EOwp9d3TJNTWDIyeg5J4kKB7J28Iy1EqFpuVaG9GYblHx KbkJHoi65pIBK6v/FESQyGkWBLZ7QZjaX5AR77vaR6X6XbWRcftmHT3JzM8jLmOcEeSp lNpw== X-Gm-Message-State: ANhLgQ3WQ8/duOu7+KXJ6YdWaFu7gQoNvH8QizgdPRyP2UonzN/8qBu3 AN2V+YwsUyBHFCq6G/xTG6Q= X-Google-Smtp-Source: ADFU+vv+T6EX42I7QsCPKFPJNMq6GUXg9pANHhKWydd9YqyV4Y93WsRrc5JL+R7T0hRAGNFYQNCtDA== X-Received: by 2002:a05:600c:c8:: with SMTP id u8mr2236586wmm.178.1583847120433; Tue, 10 Mar 2020 06:32:00 -0700 (PDT) Received: from localhost.localdomain ([197.248.222.210]) by smtp.googlemail.com with ESMTPSA id o7sm14047141wrx.60.2020.03.10.06.31.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Mar 2020 06:31:59 -0700 (PDT) From: Wambui Karuga To: airlied@linux.ie, daniel@ffwll.ch, Tomi Valkeinen Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, gregkh@linuxfoundation.org Subject: [PATCH v2 13/17] drm/omap: remove checks for return value of drm_debugfs functions Date: Tue, 10 Mar 2020 16:31:17 +0300 Message-Id: <20200310133121.27913-14-wambui.karugax@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200310133121.27913-1-wambui.karugax@gmail.com> References: <20200310133121.27913-1-wambui.karugax@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 0 directly. v2: convert omap_debugfs_init() to return 0 instead of void to avoid introduction of build issues and enable individual driver compilation. References: https://lists.freedesktop.org/archives/dri-devel/2020-February/257183.html Signed-off-by: Wambui Karuga --- drivers/gpu/drm/omapdrm/omap_debugfs.c | 27 +++++++------------------- 1 file changed, 7 insertions(+), 20 deletions(-) diff --git a/drivers/gpu/drm/omapdrm/omap_debugfs.c b/drivers/gpu/drm/omapdrm/omap_debugfs.c index 34dfb33145b4..ed63dcced79a 100644 --- a/drivers/gpu/drm/omapdrm/omap_debugfs.c +++ b/drivers/gpu/drm/omapdrm/omap_debugfs.c @@ -82,29 +82,16 @@ static struct drm_info_list omap_dmm_debugfs_list[] = { int 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); + 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; + return 0; } #endif -- 2.25.1 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.5 required=3.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EA841C10F27 for ; Tue, 10 Mar 2020 23:37: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 A981421927 for ; Tue, 10 Mar 2020 23:37: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="mqSjKHGj" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A981421927 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 5AD1D6E918; Tue, 10 Mar 2020 23:36:20 +0000 (UTC) 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 ADC146E2E2 for ; Tue, 10 Mar 2020 13:32:01 +0000 (UTC) Received: by mail-wm1-x344.google.com with SMTP id g62so1364368wme.1 for ; Tue, 10 Mar 2020 06:32:01 -0700 (PDT) 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=0PDXUNP0CNWIcOfZIatzfIp7MveLX2/j+5KT4VopvNc=; b=mqSjKHGj010PNQfFZwfvEAmV8ADnB1wWjI4PptouwtPF1tHRYa+/DX4AQxW14hNUIy yws6pL6lXIbp/OY5sKPGIpD+hiliV3ZIpgEaM2hRRoksOdzVTJhmUpUTPMkcXPQE70AM oaluGsvPDi9Ae258jTLONdHvwLzIaaLTz4ASzlhD0zMfanLXbc0aJktA/Z97UdNtnoTv BlxmaVfkLnP1Lg5RkSevCvFVdlINZNRcroScsQuOjIUz7eD8Q6v/e5jagkdBjmUsHTvL qP6T0H63x/A0Fxb38hSCohESNWEF3RklHtLnBF4BGVDPkpgdNNVBdGrnoVGoBT+JURVA KJWw== 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=0PDXUNP0CNWIcOfZIatzfIp7MveLX2/j+5KT4VopvNc=; b=oT3iQyBppcNyAV+wD26tfLpKF7oRILVcBmGOME/uTH2M3R2nMY5gX9AMbt/tH9YnKi L371WBcDu0PieXDth1eNo4cl1LFBZiKfqJW7qZt2Q/fVa8UhxumBqAJPkL0dIMrglqJx TEt4hg1jgjQ/qRmqs0E/R3H3HMTJ7s+gY4GUAsJvh7dR1KmnpPof7NM6fUmlH09vADnQ dVz8r8QTXwW1iKAx/159Lk7Mo0qF2BgeyT9v0Z5+ksEXPZukyj8oc0It4MUWEENVXOzY 99XGhFyg0bchKiqDCKXf8u3j9dSPj7ko4rHFsfO/HQCCE1FrzkfqXlRi8fLqAInQIagp yjeg== X-Gm-Message-State: ANhLgQ2nET6qfTdvcn86cTuWthZVmblpchC2/Qci+R0vdjqW9g64iQqO OMSNE6n4SeFNN009px6n8kM= X-Google-Smtp-Source: ADFU+vv+T6EX42I7QsCPKFPJNMq6GUXg9pANHhKWydd9YqyV4Y93WsRrc5JL+R7T0hRAGNFYQNCtDA== X-Received: by 2002:a05:600c:c8:: with SMTP id u8mr2236586wmm.178.1583847120433; Tue, 10 Mar 2020 06:32:00 -0700 (PDT) Received: from localhost.localdomain ([197.248.222.210]) by smtp.googlemail.com with ESMTPSA id o7sm14047141wrx.60.2020.03.10.06.31.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Mar 2020 06:31:59 -0700 (PDT) From: Wambui Karuga To: airlied@linux.ie, daniel@ffwll.ch, Tomi Valkeinen Subject: [PATCH v2 13/17] drm/omap: remove checks for return value of drm_debugfs functions Date: Tue, 10 Mar 2020 16:31:17 +0300 Message-Id: <20200310133121.27913-14-wambui.karugax@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200310133121.27913-1-wambui.karugax@gmail.com> References: <20200310133121.27913-1-wambui.karugax@gmail.com> MIME-Version: 1.0 X-Mailman-Approved-At: Tue, 10 Mar 2020 23:36:13 +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 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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 0 directly. v2: convert omap_debugfs_init() to return 0 instead of void to avoid introduction of build issues and enable individual driver compilation. References: https://lists.freedesktop.org/archives/dri-devel/2020-February/257183.html Signed-off-by: Wambui Karuga --- drivers/gpu/drm/omapdrm/omap_debugfs.c | 27 +++++++------------------- 1 file changed, 7 insertions(+), 20 deletions(-) diff --git a/drivers/gpu/drm/omapdrm/omap_debugfs.c b/drivers/gpu/drm/omapdrm/omap_debugfs.c index 34dfb33145b4..ed63dcced79a 100644 --- a/drivers/gpu/drm/omapdrm/omap_debugfs.c +++ b/drivers/gpu/drm/omapdrm/omap_debugfs.c @@ -82,29 +82,16 @@ static struct drm_info_list omap_dmm_debugfs_list[] = { int 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); + 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; + return 0; } #endif -- 2.25.1 _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel