From patchwork Mon Oct 11 19:06:04 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Das, Nirmoy" X-Patchwork-Id: 12550943 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A3CE6C433EF for ; Mon, 11 Oct 2021 19:06: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 59A1F60E8B for ; Mon, 11 Oct 2021 19:06:28 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 59A1F60E8B Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=amd.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 531866E945; Mon, 11 Oct 2021 19:06:27 +0000 (UTC) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2086.outbound.protection.outlook.com [40.107.223.86]) by gabe.freedesktop.org (Postfix) with ESMTPS id 51E176E945; Mon, 11 Oct 2021 19:06:26 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=diG6yvOpQnAVVRw4yI9qhqwhgFko6jDYW5VOxHSc+uoHow7bI/7ZYQJDXXU4VM31pfxQCZNZKeby5rt6fqMKX7vPikch/GbmClTLFRWhHbRgMUjph5g8AGsU6rtmy+V63VP1Zkquf/kUAa+CBAh7bOp4xGYWbr8e5jgbaOWTeAHN96etvzMkHwb26HV8CVeJ9HWimYTIfaQvn855GB4rGwYlbwwc1NHBDbkkNtZN3AQlqVjXbigZQ3n5aehwtxzwIHupVrW17uMVYFnUQNqj4fGK1th4JfXK7nTOhZOuQvDdRzGlS+NO2dMXlI+vK7mo+3Y467TbloUCLe2x4C1cNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=DJn9PqxMg/y/vSZoIWS7vSi6gYsAT6gVYondgUrv9NY=; b=iDoNiejwlxn15lCVd8kBn/jOAKfipxWj1qHuDSk+Z+P3sf0l2OexyaRgXEg5YcfI7qhW7N74Ud+RybUOI/eYz8M2pannpHQ/DnshJiFQkScMynVZpCDxDmvfbYripQKfF7TY/WRTaZZTtT8hxsvkH68+pSNAG7TJ3rhn/xjPre3baEhlfS0tJPBi+AD/A00vt+4V11YERpfZmB+oJk+moTdY2xV5NMkafpoSZ7oBe4sebqU1YFsEI6M64BL3KVMzykc3xG8jRxlGwqf8TXTXBnjYgLUhLSc3w3B1Vj8jGcu7usjRX2xlOxubCCdDXhHzPhQLOoWQ+dPGwea8exL2xw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.freedesktop.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=DJn9PqxMg/y/vSZoIWS7vSi6gYsAT6gVYondgUrv9NY=; b=FAVnAg7ISgauys1XGII+8GYHO0fY9QNXxHr9zcc4+BfbwVGOOWgm5RXMMkm8fLqz6vi7LN4VsvIrhUUtRDClNYnXmq6zIVOxHHfp+kC3Fx1MJ3uEe5qk/5pmH6P0kRnG7VuRgm/Il/v0LDxhrfstcnpL+A06yiiP54rmRfayJ6Y= Received: from DM6PR08CA0050.namprd08.prod.outlook.com (2603:10b6:5:1e0::24) by BL0PR12MB4866.namprd12.prod.outlook.com (2603:10b6:208:1cf::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.24; Mon, 11 Oct 2021 19:06:24 +0000 Received: from DM6NAM11FT058.eop-nam11.prod.protection.outlook.com (2603:10b6:5:1e0:cafe::90) by DM6PR08CA0050.outlook.office365.com (2603:10b6:5:1e0::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.18 via Frontend Transport; Mon, 11 Oct 2021 19:06:24 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; lists.freedesktop.org; dkim=none (message not signed) header.d=none;lists.freedesktop.org; dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; Received: from SATLEXMB04.amd.com (165.204.84.17) by DM6NAM11FT058.mail.protection.outlook.com (10.13.172.216) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.4587.18 via Frontend Transport; Mon, 11 Oct 2021 19:06:23 +0000 Received: from brihaspati.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.8; Mon, 11 Oct 2021 14:06:20 -0500 From: Nirmoy Das To: CC: , Nirmoy Das , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter Subject: [PATCH 1/4] dri: do not check for NULL debugfs dentry Date: Mon, 11 Oct 2021 21:06:04 +0200 Message-ID: <20211011190607.104618-1-nirmoy.das@amd.com> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5a000ee3-2f91-437b-aa73-08d98cea37f6 X-MS-TrafficTypeDiagnostic: BL0PR12MB4866: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6790; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: tRZ+Bg8WyTwKIvMVV8lfi+uxgM17neR/trjjDEcVLaU+9uNjF233mXUUcYczHO8OZLgVh2tGfvgEtNoao3POMeIDjp00hSojBKDMZEin+m5+Swwkq6N3M4kyIMmZ51nrLwNYS0Fae8aoFvHI8/B7Kv3D0RBGHafISnsYjGdub8greirrnMZmAgzrz8sy9IDxXAW7ATc3CfE3C1SsrFg40IP8ePSalOu28lnyROWlh3HgBB5/0qMlmAPGpVupWyRxA1Qlp42b1iegwhrxuem0M0vgHKCpPsi7UOMp0WqSWQOz9LCcJ5BaUCjySd2vgAD3nW4eeDdzd+A1H9uGw45j7Wb18Lf9OgF/ytOERNogTVnLejjQkyxpMNh5u5kCPWL/VQiJiV7QIejdd3g3EfV9Mc53jDCJfDJl3wy0Adbetlhv+9J20Ja3C7zqgsYcNzI5EWa4sL6pxaVgBzBjuvhx7hJx6z4yuiPsiZRfKXlboH+Cyugxy444FUwX0HlVxX7aoKdineTiyz6FC88CW4krK0s2WvkkIR1p0R3U1630XKp9h6APtFgd6LAxb9brpxrrrzH9jVrPmXsr30RhFL/HoDh3wEWtt7NDvPoLIca+vfGgbnXznzw47lasgGKZz7abCuMclbsxWnRDNlcFFToHcNoaaXrfnLf3rfitGUfBHl8jAwyTVOx5DrFcZgITqjQYjJpdSu+6D3uERvSFdANxHMLjukFe1k+EJgIemhsjeVA= X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(4636009)(46966006)(36840700001)(26005)(186003)(36756003)(7696005)(316002)(16526019)(54906003)(1076003)(47076005)(8676002)(8936002)(5660300002)(70206006)(4326008)(6666004)(2616005)(86362001)(356005)(83380400001)(6916009)(426003)(2906002)(336012)(82310400003)(36860700001)(81166007)(44832011)(70586007)(508600001)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Oct 2021 19:06:23.7994 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5a000ee3-2f91-437b-aa73-08d98cea37f6 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT058.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL0PR12MB4866 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: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Debugfs APIs returns encoded error on failure instead of NULL and for drm primary/minor debugfs directories, we save the returned value in the dentry pointer and pass it on to drm drivers to further create debugfs files/directories. Error conditions are handled by debugfs APIs, so no need to check for NULL, as saved dentry pointers will either contain a valid pointer or an error code. CC: Maarten Lankhorst CC: Maxime Ripard CC: Thomas Zimmermann CC: David Airlie CC: Daniel Vetter Signed-off-by: Nirmoy Das --- drivers/gpu/drm/drm_debugfs.c | 9 --------- 1 file changed, 9 deletions(-) -- 2.32.0 diff --git a/drivers/gpu/drm/drm_debugfs.c b/drivers/gpu/drm/drm_debugfs.c index b0a826489488..0073854a4383 100644 --- a/drivers/gpu/drm/drm_debugfs.c +++ b/drivers/gpu/drm/drm_debugfs.c @@ -272,9 +272,6 @@ static void drm_debugfs_remove_all_files(struct drm_minor *minor) void drm_debugfs_cleanup(struct drm_minor *minor) { - if (!minor->debugfs_root) - return; - drm_debugfs_remove_all_files(minor); debugfs_remove_recursive(minor->debugfs_root); @@ -419,9 +416,6 @@ void drm_debugfs_connector_add(struct drm_connector *connector) struct drm_minor *minor = connector->dev->primary; struct dentry *root; - if (!minor->debugfs_root) - return; - root = debugfs_create_dir(connector->name, minor->debugfs_root); connector->debugfs_entry = root; @@ -440,9 +434,6 @@ void drm_debugfs_connector_add(struct drm_connector *connector) void drm_debugfs_connector_remove(struct drm_connector *connector) { - if (!connector->debugfs_entry) - return; - debugfs_remove_recursive(connector->debugfs_entry); connector->debugfs_entry = NULL; From patchwork Mon Oct 11 19:06:05 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Das, Nirmoy" X-Patchwork-Id: 12550945 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8623FC433F5 for ; Mon, 11 Oct 2021 19:06:38 +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 4733160E8B for ; Mon, 11 Oct 2021 19:06:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 4733160E8B Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=amd.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A345C6E948; Mon, 11 Oct 2021 19:06:31 +0000 (UTC) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2079.outbound.protection.outlook.com [40.107.220.79]) by gabe.freedesktop.org (Postfix) with ESMTPS id 421806E940; Mon, 11 Oct 2021 19:06:30 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hiRLVwD3JBloJhoyF3JR4oQmNudLs7f1RJdQxidaJb2lFPqWcf7xlW+dLRPW3uTaX6fN/wdEIKVznmoXY3kZb8zSOgPtPwko66HRYO4GBwwq66sbffIPJMtFCwTJtqQiUllmJlj9dwkP2redg34eTn0OveRSDErPaBk3C/eBBVi7yh1PrQZI5Dr1fnCvvfpwNtWtOtcTmXJh57GyHBZ3Iou4SQTAaYmfSGLnzLbTXZn9e1wQ6kBvfqFCg1zvk4CSjAotFw0bDbX5RnQHRbxSu+FsHuU/VwCRhTY6HneNZKjYCdOPPQ/HA4mdug0fjZ9ic940b/ds+evQVkCsYaef/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=dCkj7hWvUyuIIv0001J+TfyXLy7DNBuZn2BfCAF+FR8=; b=AB+jOZfynkYhJwlZt41Bu49p+10o25xbt0LnJwgLdV2ZYAonuFNIkVPsXisyW+ZHdnvfO3gGJQx00Bj2jHkmEmIJxOQbU9PstTJ387E+EG+bb/OYxkoQN426Y2Gpi7/XGICUnRHEQZAJlRUF8CymrE7TJigaJ8Tz2QX3yOQut8s1wC4/BF1fBL/h6ilTPO8p4V3pDrLYs5I8FIj9FYh32ZloEqJDTFC9Vif7jbNuc9gxt/S0y+0A7o4J+qwcnGv9lRzDBPUpNSxjIDTBGcIpD5706XT7XPRwMY4+l58xvIeyZE9g41wRCALL6eBh2Z2AShtNphxgmV5LXZy0sHzwIw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.freedesktop.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=dCkj7hWvUyuIIv0001J+TfyXLy7DNBuZn2BfCAF+FR8=; b=srGgUF6BrwVp4fSxDtTQE3xr3rcOXShPE+fMZGhu7J12PN6fE3VOf20DaJKbnyn94sfF5gLGWdEPXpHDRsM9Uosi2cOTyYlpF+IbTWz4k8umtSyb2KJc6faUS2eGxvF0+4qDJ5IuNjYbSTE5Bc3LMGVB6CDhXBYonu/eJoBkSAg= Received: from DM6PR03CA0037.namprd03.prod.outlook.com (2603:10b6:5:100::14) by DM6PR12MB3691.namprd12.prod.outlook.com (2603:10b6:5:1c5::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.19; Mon, 11 Oct 2021 19:06:26 +0000 Received: from DM6NAM11FT020.eop-nam11.prod.protection.outlook.com (2603:10b6:5:100:cafe::49) by DM6PR03CA0037.outlook.office365.com (2603:10b6:5:100::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.18 via Frontend Transport; Mon, 11 Oct 2021 19:06:26 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; lists.freedesktop.org; dkim=none (message not signed) header.d=none;lists.freedesktop.org; dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; Received: from SATLEXMB04.amd.com (165.204.84.17) by DM6NAM11FT020.mail.protection.outlook.com (10.13.172.224) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.4587.18 via Frontend Transport; Mon, 11 Oct 2021 19:06:26 +0000 Received: from brihaspati.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.8; Mon, 11 Oct 2021 14:06:23 -0500 From: Nirmoy Das To: CC: , Nirmoy Das , Christian Koenig , Huang Rui , David Airlie , Daniel Vetter Subject: [PATCH 2/4] drm/ttm: do not set NULL to debugfs dentry Date: Mon, 11 Oct 2021 21:06:05 +0200 Message-ID: <20211011190607.104618-2-nirmoy.das@amd.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20211011190607.104618-1-nirmoy.das@amd.com> References: <20211011190607.104618-1-nirmoy.das@amd.com> MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 883aa27c-d46e-4275-7a2c-08d98cea3987 X-MS-TrafficTypeDiagnostic: DM6PR12MB3691: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:3513; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: F4Gx0/QIJrJifGVVbsa1pLXOqXPhXxT80cR+CIHbuOhCPjh5mtAUSyOaidH4JigamsApmLo+f5T6sEFUC5qGnNISKiS8DOCw1izRyMDLLcFam9f8Ggo9MPTT3UfwQNuXqTrTyRvmrCxnpf/C17OjDzxBEZmXw6PRm6IyJZTdvEDtddBisLoKkc47OQRtlo87j3rkG2tlS7Ya6beXaLaMoFJSVlLUM2vYgd2A6cN7ycrTCx8AVm93XtRdkJ64NiNOsMQEBX4J6E+GlTx/3gpZmCax5ZiYYrhlaloHRaOEfsCNW7PVi7vPBG/Vlmx85P6h02QG+RkqZcDvNJaPxWnJsVWQedzbf5La39iNA1JXRXuVLNYuMxTbGrzfLOrPD8fl9tneGp4IQaezhha+IYGSUpT9acQO5fYiBY09mRdtV1yWWS0SAMEAwM7na5gNuWoVuORvW+bc0VNRW+bbzMoRiXG4SqPZn7mIwyEFmuv586VtMJe24iInCAz5PhdCkd4lrA5oTnKQNlYyt/XH/HN0ghW9NeSSnug7f3bbnBLNrVLfYvS2I97jj9g6/2cY02YV2Lpq0ifxpCZqSlXV3ORtl0t5iWDAoq05bPnAIvMy7FWEyIGwmVn3uQZmcSvdDObYk4wUaebjPe5Jq5rpRp8kaahTtiyjQdw0zWbM2qS+WMSeF8eAM6UepW4kbLkDQIvtRXIbTUrOfC6CLCWsUw6Ky11YZ26echrUAWEU+Lpir2o= X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(4636009)(36840700001)(46966006)(47076005)(2906002)(26005)(82310400003)(16526019)(6916009)(316002)(5660300002)(44832011)(186003)(356005)(8676002)(54906003)(426003)(36756003)(86362001)(36860700001)(81166007)(83380400001)(4326008)(8936002)(1076003)(70586007)(7696005)(336012)(2616005)(508600001)(70206006)(6666004)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Oct 2021 19:06:26.4212 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 883aa27c-d46e-4275-7a2c-08d98cea3987 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT020.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB3691 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: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" For debugfs directory, it is recommended to save the result and pass over to next debugfs API for creating debugfs files/directories. Error conditions are handled by debugfs APIs. CC: Christian Koenig CC: Huang Rui CC: David Airlie CC: Daniel Vetter Signed-off-by: Nirmoy Das --- drivers/gpu/drm/ttm/ttm_device.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) -- 2.32.0 diff --git a/drivers/gpu/drm/ttm/ttm_device.c b/drivers/gpu/drm/ttm/ttm_device.c index be24bb6cefd0..225ae6b0b4c2 100644 --- a/drivers/gpu/drm/ttm/ttm_device.c +++ b/drivers/gpu/drm/ttm/ttm_device.c @@ -77,9 +77,6 @@ static int ttm_global_init(void) si_meminfo(&si); ttm_debugfs_root = debugfs_create_dir("ttm", NULL); - if (IS_ERR(ttm_debugfs_root)) { - ttm_debugfs_root = NULL; - } /* Limit the number of pages in the pool to about 50% of the total * system memory. @@ -108,8 +105,7 @@ static int ttm_global_init(void) debugfs_create_atomic_t("buffer_objects", 0444, ttm_debugfs_root, &glob->bo_count); out: - if (ret && ttm_debugfs_root) - debugfs_remove(ttm_debugfs_root); + debugfs_remove(ttm_debugfs_root); if (ret) --ttm_glob_use_count; mutex_unlock(&ttm_global_mutex); From patchwork Mon Oct 11 19:06:06 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Das, Nirmoy" X-Patchwork-Id: 12550947 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CA5C4C433FE for ; Mon, 11 Oct 2021 19:06:42 +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 9746460E8B for ; Mon, 11 Oct 2021 19:06:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 9746460E8B Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=amd.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0AD366E940; Mon, 11 Oct 2021 19:06:36 +0000 (UTC) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2057.outbound.protection.outlook.com [40.107.237.57]) by gabe.freedesktop.org (Postfix) with ESMTPS id 627D06E940; Mon, 11 Oct 2021 19:06:33 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Af7UAu0JFceptbrWaon3HLASCs2FxrSKwJFCOq9rjHs9o3DT1xVAK0oPUackRWw9dXHuHe7+kP9p5LZP5tT/siBEluLi+xMhxtm4xiUmyAlWghFkFPyp9vC75bp6+Kv+SBNLiLyke+SOC4kPeBAjI1H0XFS+9I9xnvB3TaIEc2FKt6q42IDdEmkhykfcYsP4JwAgnLoO6bKPowP7KmrGvkURErRVlFHW7aBATPaSZUWGCIJr2EZMdObTgEpxIU6rIurETN+ZE8D4qbB6n0CT5N/IsErtP867KAUcwbbHn3UfdDwzsSk/LgYSjmZsuCofbggxMWZFUEu5Pp4MO0cQvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=94Hsy9uxVpjI7NE9tvsVTZAOa7AiXgnaKaKUuYzDA94=; b=BIrxuYFY3mH1SYmaMrKnpwEC26TfDDxmZb96DBOnLLensWnrmACV/gQC/DRQNr4taaxZVcQlNgiJegdkfE1oZy1J3HeAc1fbUosL4A4Y50lQhQnwXilg6BaY2fAx2wnUnY+ghAA11Tql4BxB6/LbNLkLojKTBRQ5BAvPwUciNnXZqX4RCk3hzgEfVBGWHhqxkwwYYsSqtBYgRygJw/mze98Rd9LDiA/pfBmZ1AzMcGshDkBTPGg8ZV0uFjbU3PjgPKZPSdRPfWxC3O1ygpIfDEQoGjRY5Jryu7P8OomO3ilW/o7B8Boqp4sTpMV1Bi23dCXHfd7OP83LHS8p3tBqGw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.freedesktop.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=94Hsy9uxVpjI7NE9tvsVTZAOa7AiXgnaKaKUuYzDA94=; b=lNQgdvqpUifB84D/qQuriqs6k7ob31upr3x2rezt8KNVaNm8WAVJLsvP1i+RFaz7vnNSDC68j4enYn9Su/xy8Y7QRoyNziJjTw5V1oepq+ifzJStF/CkuwsMBT6ipv2EUoo4GD0ekKnUJ7yZVFkChPc8ESvX+pSuc5cwe1h3TSQ= Received: from DM3PR12CA0113.namprd12.prod.outlook.com (2603:10b6:0:55::33) by MN2PR12MB4110.namprd12.prod.outlook.com (2603:10b6:208:1dd::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.20; Mon, 11 Oct 2021 19:06:31 +0000 Received: from DM6NAM11FT050.eop-nam11.prod.protection.outlook.com (2603:10b6:0:55:cafe::52) by DM3PR12CA0113.outlook.office365.com (2603:10b6:0:55::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.18 via Frontend Transport; Mon, 11 Oct 2021 19:06:30 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; lists.freedesktop.org; dkim=none (message not signed) header.d=none;lists.freedesktop.org; dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; Received: from SATLEXMB04.amd.com (165.204.84.17) by DM6NAM11FT050.mail.protection.outlook.com (10.13.173.111) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.4587.18 via Frontend Transport; Mon, 11 Oct 2021 19:06:30 +0000 Received: from brihaspati.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.8; Mon, 11 Oct 2021 14:06:26 -0500 From: Nirmoy Das To: CC: , Nirmoy Das , "Jani Nikula" , Joonas Lahtinen , Rodrigo Vivi , David Airlie , Daniel Vetter Subject: [PATCH 3/4] drm/i915/gt: do not check for NULL debugfs dentry Date: Mon, 11 Oct 2021 21:06:06 +0200 Message-ID: <20211011190607.104618-3-nirmoy.das@amd.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20211011190607.104618-1-nirmoy.das@amd.com> References: <20211011190607.104618-1-nirmoy.das@amd.com> MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 9abd9914-9af0-47c8-703c-08d98cea3be0 X-MS-TrafficTypeDiagnostic: MN2PR12MB4110: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:862; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: /BNFKHJXzQ8S8TfcGwPeJG0s2TCbDSxCpS0ev5piE7YMTXGf35bZtRok8DY6S+YweJ90JDYrBDCX7B+0X1yhAmzoFJR5fVfBzaz5iaZPLP5Ai5qKy1LeL7B2Ff89GGSkuzO/5iai5e+r9oKfekfvgY6V/Kje+q6zSE6+6j6CnlnBZma4jh1brE6WMkQHiZW8du2IjCvwN56UheWOcVTyJI6AEjlXa5K3aPi1BmRJS3sHySVA2veprpRZEdpqKvRc0vBPm4+7+1CnEBvFKH4AGxvpXs1JO+W4Zm8Q4Lf719zMuxxklg1RnKinzTl6olbaXgFSkwGOioz8pwh7rHv2+kT+O+tQRz0F4yE1XyHVEUHGH53UmzvHNPvJEkjSmZyCrQRc/a4kKszw1R7+QAb6NOT01mPRBDgU1HRmJ7S/tW1qK/o4xSXjQ8Io8VEU0KldBXOfiLUZ9kBT5HGQI6pCq8Fa3MHlyRNY/+DTnZQsnjPc/ZuP49flaZuqgFWQcF2Zq+Vhryurba+eYoSHQjv4tMzZNv4eUN2PpUQEQMZoFYNBCYzDgWG08mtnzEDjTapWtGnitxgXc7GVnLpnb4vvRHooQjW0p7FhjmtsghpwvQiVSrpFFBW0XlIDNbpSF9CmO4bwlmG4XDnwV5E4cJtK6DYVKIRDPb6QSEOzESXrssPv0ehwPKc7plq3vrFsdkTE2P1OLdI2E8x30l32oaFF3jSM/TaMN5W3EMEpKy6AwCc= X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(4636009)(36840700001)(46966006)(336012)(70206006)(36756003)(4326008)(83380400001)(1076003)(426003)(47076005)(6666004)(54906003)(2616005)(26005)(8676002)(186003)(508600001)(16526019)(356005)(44832011)(70586007)(81166007)(86362001)(6916009)(7696005)(5660300002)(82310400003)(8936002)(316002)(36860700001)(2906002)(4744005)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Oct 2021 19:06:30.3586 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9abd9914-9af0-47c8-703c-08d98cea3be0 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT050.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB4110 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: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Do not check for NULL value as drm.primary->debugfs_root will either contain a valid pointer or an encoded error instead of NULL. CC: Jani Nikula CC: Joonas Lahtinen CC: Rodrigo Vivi CC: David Airlie CC: Daniel Vetter Signed-off-by: Nirmoy Das --- drivers/gpu/drm/i915/gt/debugfs_gt.c | 3 --- 1 file changed, 3 deletions(-) -- 2.32.0 diff --git a/drivers/gpu/drm/i915/gt/debugfs_gt.c b/drivers/gpu/drm/i915/gt/debugfs_gt.c index 591eb60785db..95ca1b3ad320 100644 --- a/drivers/gpu/drm/i915/gt/debugfs_gt.c +++ b/drivers/gpu/drm/i915/gt/debugfs_gt.c @@ -16,9 +16,6 @@ void debugfs_gt_register(struct intel_gt *gt) { struct dentry *root; - if (!gt->i915->drm.primary->debugfs_root) - return; - root = debugfs_create_dir("gt", gt->i915->drm.primary->debugfs_root); if (IS_ERR(root)) return; From patchwork Mon Oct 11 19:06:07 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Das, Nirmoy" X-Patchwork-Id: 12550949 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 45508C433FE for ; Mon, 11 Oct 2021 19:06:46 +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 069B160FD7 for ; Mon, 11 Oct 2021 19:06:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 069B160FD7 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=amd.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D98326E94A; Mon, 11 Oct 2021 19:06:38 +0000 (UTC) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2048.outbound.protection.outlook.com [40.107.244.48]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9EA426E94B; Mon, 11 Oct 2021 19:06:37 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=em/OUhISLEejfw47cW2Y4pRmA2uxbJUmygrhqk9vDa0au/E8pgO1K3RhCYYH3PwOzILVcIHLatQVfX2mlmEEoNp2MaJvQ+d7gqCnx2lvmTgsV7TGPoHbLpHJDX15NvuqZxxE+LlM7onFgzWsEv59fNnf83zl3vclxYS0rvIg6NuWYqBmfm/7KSV9nYoYdowLTDOK+j1XADi6FRJD2M4UR5J7hTSYy8QMo19QK9vSmxWVsuA5yEvEUm4rSUybIsqZGjAUDtJzUAp2xRGWpaUAoYbhD3AYefaK1jSeZJ859QE5WhRMbGbJPD2FmkS7zyl0zmMneIzQ/UENrpIi3xUFTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=z4HdPZCjumm9oelccI9dnuSZ4Ye025zhV4VIlx2eUyE=; b=Fi8jRrZDafeWTFhX7Yx9swFEgedKFGq8FWM6ax6ClnAuchSaEK1kfgdpbCHaC9ZiOJpsFLNIgtiIMc+SRfak8kwlv7X5Uf5/NuD443W7Lip02nBHNKAJMJkMyfCTGUNFxhKDSd9dTKdwQC/HyNDk9vb3dzX58FHLg7NZsi6cgeBliYJwUKfWZY9FRbZYHjaM8l/eLNQZN75xTG+bJV6rA32sLwS25Lod1iBBkUXmGOTs0xSeo5wZbh0Qz+wrlIaAhpGR+g5DMJ0O13NfqXSYfmAfF2LLAeeubES+rbPdwt4ah3ktGzSKFwzuQk1bPzm5gnUUYql9P56Gc065nuwJfA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.freedesktop.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=z4HdPZCjumm9oelccI9dnuSZ4Ye025zhV4VIlx2eUyE=; b=Mmbuw/iWCCc9iwJD9a+sOXq8OMzZpCWk+cnczhdgFKa7QHZtqQ4WQUI33LLAGH0AFhC1TE1mdgdDwzs2YZcqXs5K5aMFBYoPW7YG/JvzuCbmWq34LBaELs98y2bpxbV809aGGXd3wy6rQy/tISL5u3YrB1WTEoU5f/C3+53dR/Y= Received: from DM5PR15CA0062.namprd15.prod.outlook.com (2603:10b6:3:ae::24) by BN6PR12MB1476.namprd12.prod.outlook.com (2603:10b6:405:11::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.22; Mon, 11 Oct 2021 19:06:34 +0000 Received: from DM6NAM11FT039.eop-nam11.prod.protection.outlook.com (2603:10b6:3:ae:cafe::dd) by DM5PR15CA0062.outlook.office365.com (2603:10b6:3:ae::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.18 via Frontend Transport; Mon, 11 Oct 2021 19:06:34 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; lists.freedesktop.org; dkim=none (message not signed) header.d=none;lists.freedesktop.org; dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; Received: from SATLEXMB04.amd.com (165.204.84.17) by DM6NAM11FT039.mail.protection.outlook.com (10.13.172.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.4587.18 via Frontend Transport; Mon, 11 Oct 2021 19:06:33 +0000 Received: from brihaspati.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.8; Mon, 11 Oct 2021 14:06:29 -0500 From: Nirmoy Das To: CC: , Nirmoy Das , "Lukas Wunner" , David Airlie , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann Subject: [PATCH 4/4] vgaswitcheroo: do not check for NULL debugfs dentry Date: Mon, 11 Oct 2021 21:06:07 +0200 Message-ID: <20211011190607.104618-4-nirmoy.das@amd.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20211011190607.104618-1-nirmoy.das@amd.com> References: <20211011190607.104618-1-nirmoy.das@amd.com> MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5fa6e686-b3ae-4672-76ac-08d98cea3e0a X-MS-TrafficTypeDiagnostic: BN6PR12MB1476: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1850; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: cDiE2j57aUlmMCiwGHEFEcPbR9dUPKGa3M94DsV/qVkDf86GPzFQbM4xpIV3a/QiA9RnJSBl7dd84t2LbLaXpYq8cT0i0b3TWH+VTJyQo+W9ov+LQ/8qOMSb6mQEAv+fLtqEYgiygT0L09sLfEAAkv5uXk5XOSZ3yWc/mC/vE+TdmXn/6vMLY5EcdOJCFck4/w0vTGSpyluit9NA0Pqi1VhrK6lRMJXKjG6IGH/F/ixR20NZax10Tz65QKLwkrrPziUSIw/E/2O/40GhdIc3X0WYhLANknpZGFcskDke2LiFmX0NcjPpBw8Q34922ArFvc7iSe1EmtZzRPvIdn8roI+wSzmR2ziAwT5B+efKEnIqo/Bau6h4hnJ3iyeyiKR64KLiBQTMUuB/e/6AzZ6ypTfM4KyRc8mzpNASU/nXv8Kmm4xOL/RhMqnaVYC6+S0HVQEJxdaOxDJCKYNRE/LbvHrQfJtYJ5LFrfXj/CH+Fsoa0SWV/vb7MXYNzliOySlyEzJpCP6tMyA+5vRS1qKuEAmfBxW1IS59oJxbZL5cIi9WoKvr6NC3Bmzlegmt4r+nS0A/6HInYw6zeE6arfkSIc9yjt3On9fb0fKmsfYVFcluwe0DSn0Gqbkn/eARtxIPvI6BKukPbwHn51o+/hP1H7676h2yi5S/omk3Sn8eEuMetFjNdiF2lYWrQK0iCrpCAL4ydqcGUdmjzwA2bUGA3Z0PMkXIe87czT/odTXYxgs= X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(4636009)(46966006)(36840700001)(44832011)(316002)(508600001)(4326008)(336012)(81166007)(6666004)(186003)(70206006)(356005)(7696005)(1076003)(36860700001)(2906002)(70586007)(8936002)(26005)(47076005)(83380400001)(82310400003)(6916009)(5660300002)(36756003)(2616005)(8676002)(16526019)(86362001)(426003)(54906003)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Oct 2021 19:06:33.9935 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5fa6e686-b3ae-4672-76ac-08d98cea3e0a X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT039.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR12MB1476 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: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Debugfs APIs returns encoded error on failure so use debugfs_lookup() instead of checking for NULL. CC: Lukas Wunner CC: David Airlie CC: Daniel Vetter CC: Maarten Lankhorst CC: Maxime Ripard CC: Thomas Zimmermann Signed-off-by: Nirmoy Das --- drivers/gpu/vga/vga_switcheroo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.32.0 diff --git a/drivers/gpu/vga/vga_switcheroo.c b/drivers/gpu/vga/vga_switcheroo.c index 365e6ddbe90f..a331525f0b32 100644 --- a/drivers/gpu/vga/vga_switcheroo.c +++ b/drivers/gpu/vga/vga_switcheroo.c @@ -914,7 +914,7 @@ static void vga_switcheroo_debugfs_fini(struct vgasr_priv *priv) static void vga_switcheroo_debugfs_init(struct vgasr_priv *priv) { /* already initialised */ - if (priv->debugfs_root) + if (debugfs_lookup("vgaswitcheroo", NULL)) return; priv->debugfs_root = debugfs_create_dir("vgaswitcheroo", NULL);