From 3f1985583564d765dda0c8af867a42d47ba2f576 Mon Sep 17 00:00:00 2001 From: Prakruthi Deepak Heragu Date: Wed, 1 Apr 2020 14:15:56 -0700 Subject: [PATCH] drivers: Fix compilation issues when debugfs is disabled Fix the compilation issues seen when CONFIG_DEBUG_FS is disabled in ufs and thermal header files. Change-Id: I670ffd0f51c9727d1e15f9f49f1afea25904fa8e Signed-off-by: Prakruthi Deepak Heragu --- drivers/scsi/ufs/ufshcd.h | 6 +++++- drivers/thermal/tsens.h | 10 +++++----- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/drivers/scsi/ufs/ufshcd.h b/drivers/scsi/ufs/ufshcd.h index dd7e38857795..8c4f33828f09 100644 --- a/drivers/scsi/ufs/ufshcd.h +++ b/drivers/scsi/ufs/ufshcd.h @@ -524,7 +524,8 @@ struct ufs_uic_err_reg_hist { #endif -#if defined(CONFIG_SCSI_UFSHCD_QTI) && defined(CONFIG_DEBUG_FS) +#ifdef CONFIG_SCSI_UFSHCD_QTI +#ifdef CONFIG_DEBUG_FS /** * struct ufshcd_req_stat - statistics for request handling times (in usec) * @min: shortest time measured @@ -550,6 +551,7 @@ enum ts_types { TS_FLUSH = 5, TS_NUM_STATS = 6, }; +#endif enum ufshcd_ctx { QUEUE_CMD, @@ -609,12 +611,14 @@ struct ufs_stats { ktime_t last_hibern8_exit_tstamp; #ifdef CONFIG_SCSI_UFSHCD_QTI +#ifdef CONFIG_DEBUG_FS bool enabled; u64 **tag_stats; int q_depth; int err_stats[UFS_ERR_MAX]; struct ufshcd_req_stat req_stats[TS_NUM_STATS]; int query_stats_arr[UPIU_QUERY_OPCODE_MAX][MAX_QUERY_IDN]; +#endif u32 pa_err_cnt_total; u32 pa_err_cnt[UFS_EC_PA_MAX]; u32 dl_err_cnt_total; diff --git a/drivers/thermal/tsens.h b/drivers/thermal/tsens.h index 39b1fe984109..24ccced348d7 100644 --- a/drivers/thermal/tsens.h +++ b/drivers/thermal/tsens.h @@ -94,11 +94,11 @@ struct tsens_device; } \ } while (0) #else -#define TSENS_DBG1(x...) pr_debug(x) -#define TSENS_DBG(x...) pr_debug(x) -#define TSENS_INFO(x...) pr_info(x) -#define TSENS_ERR(x...) pr_err(x) -#define TSENS_DUMP(x...) pr_info(x) +#define TSENS_DBG1(dev, msg, x...) pr_debug(msg, ##x) +#define TSENS_DBG(dev, msg, x...) pr_debug(msg, ##x) +#define TSENS_INFO(dev, msg, x...) pr_info(msg, ##x) +#define TSENS_ERR(dev, msg, x...) pr_err(msg, ##x) +#define TSENS_DUMP(dev, msg, x...) pr_info(msg, ##x) #endif #if IS_ENABLED(CONFIG_THERMAL_TSENS)