From 522177a45cc0dcbee246e70648598aeda27bc396 Mon Sep 17 00:00:00 2001 From: Sandeep Gangadharaiah Date: Wed, 8 Dec 2021 22:55:14 -0500 Subject: [PATCH] disp: msm: dp: avoid return value check for certain debugfs functions Adapt 5.15 kernel upstream change to return void for debugfs_create_bool. Change-Id: I0cdb4c65ff6e476c7592b2a61e43c40cd757ab7a Signed-off-by: Sandeep Gangadharaiah --- msm/dp/dp_debug.c | 86 ++++++----------------------------------------- 1 file changed, 11 insertions(+), 75 deletions(-) diff --git a/msm/dp/dp_debug.c b/msm/dp/dp_debug.c index 8675b71c22..ed621f6156 100644 --- a/msm/dp/dp_debug.c +++ b/msm/dp/dp_debug.c @@ -1,5 +1,6 @@ // SPDX-License-Identifier: GPL-2.0-only /* + * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved. * Copyright (c) 2017-2021, The Linux Foundation. All rights reserved. */ @@ -2054,25 +2055,10 @@ static int dp_debug_init_hdcp(struct dp_debug_private *debug, struct dentry *dir) { int rc = 0; - struct dentry *file; - file = debugfs_create_bool("hdcp_wait_sink_sync", 0644, dir, - &debug->dp_debug.hdcp_wait_sink_sync); - if (IS_ERR_OR_NULL(file)) { - rc = PTR_ERR(file); - DP_ERR("[%s] debugfs hdcp_wait_sink_sync failed, rc=%d\n", - DEBUG_NAME, rc); - return rc; - } + debugfs_create_bool("hdcp_wait_sink_sync", 0644, dir, &debug->dp_debug.hdcp_wait_sink_sync); - file = debugfs_create_bool("force_encryption", 0644, dir, - &debug->dp_debug.force_encryption); - if (IS_ERR_OR_NULL(file)) { - rc = PTR_ERR(file); - DP_ERR("[%s] debugfs force_encryption failed, rc=%d\n", - DEBUG_NAME, rc); - return rc; - } + debugfs_create_bool("force_encryption", 0644, dir, &debug->dp_debug.force_encryption); return rc; } @@ -2203,23 +2189,9 @@ static int dp_debug_init_sim(struct dp_debug_private *debug, struct dentry *dir) return rc; } - file = debugfs_create_bool("skip_uevent", 0644, dir, - &debug->dp_debug.skip_uevent); - if (IS_ERR_OR_NULL(file)) { - rc = PTR_ERR(file); - DP_ERR("[%s] debugfs skip_uevent failed, rc=%d\n", - DEBUG_NAME, rc); - return rc; - } + debugfs_create_bool("skip_uevent", 0644, dir, &debug->dp_debug.skip_uevent); - file = debugfs_create_bool("force_multi_func", 0644, dir, - &debug->hpd->force_multi_func); - if (IS_ERR_OR_NULL(file)) { - rc = PTR_ERR(file); - DP_ERR("[%s] debugfs force_multi_func failed, rc=%d\n", - DEBUG_NAME, rc); - return rc; - } + debugfs_create_bool("force_multi_func", 0644, dir, &debug->hpd->force_multi_func); return rc; } @@ -2228,25 +2200,10 @@ static int dp_debug_init_dsc_fec(struct dp_debug_private *debug, struct dentry *dir) { int rc = 0; - struct dentry *file; - file = debugfs_create_bool("dsc_feature_enable", 0644, dir, - &debug->parser->dsc_feature_enable); - if (IS_ERR_OR_NULL(file)) { - rc = PTR_ERR(file); - DP_ERR("[%s] debugfs dsc_feature failed, rc=%d\n", - DEBUG_NAME, rc); - return rc; - } + debugfs_create_bool("dsc_feature_enable", 0644, dir, &debug->parser->dsc_feature_enable); - file = debugfs_create_bool("fec_feature_enable", 0644, dir, - &debug->parser->fec_feature_enable); - if (IS_ERR_OR_NULL(file)) { - rc = PTR_ERR(file); - DP_ERR("[%s] debugfs fec_feature_enable failed, rc=%d\n", - DEBUG_NAME, rc); - return rc; - } + debugfs_create_bool("fec_feature_enable", 0644, dir, &debug->parser->fec_feature_enable); return rc; } @@ -2299,25 +2256,10 @@ static int dp_debug_init_feature_toggle(struct dp_debug_private *debug, struct dentry *dir) { int rc = 0; - struct dentry *file; - file = debugfs_create_bool("ssc_enable", 0644, dir, - &debug->pll->ssc_en); - if (IS_ERR_OR_NULL(file)) { - rc = PTR_ERR(file); - DP_ERR("[%s] debugfs ssc_enable failed, rc=%d\n", - DEBUG_NAME, rc); - return rc; - } + debugfs_create_bool("ssc_enable", 0644, dir, &debug->pll->ssc_en); - file = debugfs_create_bool("widebus_mode", 0644, dir, - &debug->parser->has_widebus); - if (IS_ERR_OR_NULL(file)) { - rc = PTR_ERR(file); - DP_ERR("[%s] debugfs widebus_mode failed, rc=%d\n", - DEBUG_NAME, rc); - return rc; - } + debugfs_create_bool("widebus_mode", 0644, dir, &debug->parser->has_widebus); return rc; } @@ -2326,16 +2268,10 @@ static int dp_debug_init_configs(struct dp_debug_private *debug, struct dentry *dir) { int rc = 0; - struct dentry *file; - file = debugfs_create_ulong("connect_notification_delay_ms", 0644, dir, + debugfs_create_ulong("connect_notification_delay_ms", 0644, dir, &debug->dp_debug.connect_notification_delay_ms); - if (IS_ERR_OR_NULL(file)) { - rc = PTR_ERR(file); - DP_ERR("[%s] debugfs connect_notification_delay_ms failed, rc=%d\n", - DEBUG_NAME, rc); - return rc; - } + debug->dp_debug.connect_notification_delay_ms = DEFAULT_CONNECT_NOTIFICATION_DELAY_MS;