Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 764c42be authored by Armaan Siddiqui's avatar Armaan Siddiqui Committed by Prakruthi Deepak Heragu
Browse files

msm: ipa: Fix compilation issues when DEBUG_FS is disabled



Adding changes to fix compiltaion errors when
flag CONFIG_DEBUG_FS is disabled.

Change-Id: Ib27c1ee1f883221f7cf240344b16d32219fd585c
Signed-off-by: default avatarArmaan Siddiqui <asiddiqu@codeaurora.org>
Signed-off-by: default avatarPrakruthi Deepak Heragu <pheragu@codeaurora.org>
parent 03901ca7
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2018-2019, The Linux Foundation. All rights reserved.
 * Copyright (c) 2018-2020, The Linux Foundation. All rights reserved.
 */

#include <linux/debugfs.h>
@@ -55,15 +55,18 @@
	} while (0)

#define IPA_GSB_MAX_MSG_LEN 512

#ifdef CONFIG_DEBUG_FS
static struct dentry *dent;
static struct dentry *dfile_stats;
static char dbg_buff[IPA_GSB_MAX_MSG_LEN];
#endif

#define IPA_GSB_SKB_HEADROOM 256
#define IPA_GSB_SKB_DUMMY_HEADER 42
#define IPA_GSB_AGGR_BYTE_LIMIT 14
#define IPA_GSB_AGGR_TIME_LIMIT 1000 /* 1000 us */

static struct dentry *dent;
static struct dentry *dfile_stats;

/**
 * struct stats - driver statistics,
+8 −6
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2015-2019, The Linux Foundation. All rights reserved.
 * Copyright (c) 2015-2020, The Linux Foundation. All rights reserved.
 */

#include <linux/debugfs.h>
@@ -147,11 +147,6 @@ struct ipa_mhi_client_ctx {
static struct ipa_mhi_client_ctx *ipa_mhi_client_ctx;
static DEFINE_MUTEX(mhi_client_general_mutex);

#ifdef CONFIG_DEBUG_FS
#define IPA_MHI_MAX_MSG_LEN 512
static char dbg_buff[IPA_MHI_MAX_MSG_LEN];
static struct dentry *dent;

static char *ipa_mhi_channel_state_str[] = {
	__stringify(IPA_HW_MHI_CHANNEL_STATE_DISABLE),
	__stringify(IPA_HW_MHI_CHANNEL_STATE_ENABLE),
@@ -262,6 +257,11 @@ static int ipa_mhi_read_write_host(enum ipa_mhi_dma_dir dir, void *dev_addr,
	return res;
}

#ifdef CONFIG_DEBUG_FS
#define IPA_MHI_MAX_MSG_LEN 512
static char dbg_buff[IPA_MHI_MAX_MSG_LEN];
static struct dentry *dent;

static int ipa_mhi_print_channel_info(struct ipa_mhi_channel_ctx *channel,
	char *buff, int len)
{
@@ -2186,10 +2186,12 @@ int ipa_mhi_destroy_all_channels(void)
	return 0;
}

#ifdef CONFIG_DEBUG_FS
static void ipa_mhi_debugfs_destroy(void)
{
	debugfs_remove_recursive(dent);
}
#endif

static void ipa_mhi_deregister_pm(void)
{
+9 −0
Original line number Diff line number Diff line
@@ -3102,6 +3102,15 @@ struct dentry *ipa_debugfs_get_root(void)
EXPORT_SYMBOL(ipa_debugfs_get_root);

#else /* !CONFIG_DEBUG_FS */
#define INVALID_NO_OF_CHAR (-1)
void ipa3_debugfs_init(void) {}
void ipa3_debugfs_remove(void) {}
int _ipa_read_ep_reg_v3_0(char *buf, int max_len, int pipe)
{
	return INVALID_NO_OF_CHAR;
}
int _ipa_read_ep_reg_v4_0(char *buf, int max_len, int pipe)
{
	return INVALID_NO_OF_CHAR;
}
#endif
+2 −0
Original line number Diff line number Diff line
@@ -922,7 +922,9 @@ static int ipa_ut_framework_init(void)

	ipa_assert_on(!ipa_ut_ctx);

#ifdef CONFIG_DEBUG_FS
	ipa_ut_ctx->ipa_dbgfs_root = ipa_debugfs_get_root();
#endif
	if (!ipa_ut_ctx->ipa_dbgfs_root) {
		IPA_UT_ERR("No IPA debugfs root entry\n");
		return -EFAULT;