From 7fc5b94897f416e606c3f9840700ed851f712790 Mon Sep 17 00:00:00 2001 From: Yong Ding Date: Mon, 26 Feb 2018 17:32:11 +0800 Subject: [PATCH] soc: qcom: hab: clean the pr_fmt redefined build warning In include/linux/printk.h, pr_fmt is programmed in such below way. #ifndef pr_fmt #define pr_fmt(fmt) fmt #endif And in hab.h, there is a customized pr_fmt definition. To avoid its redefinition warning, it should be undefed before the customized one if it already exists. And such warning happens in building khab.c now. Change-Id: Ia7a58bc32c7205ac27767f9738271ddce8fef339 Signed-off-by: Yong Ding --- drivers/soc/qcom/hab/hab.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/soc/qcom/hab/hab.h b/drivers/soc/qcom/hab/hab.h index 19a8584edd35..d94467e6bc76 100644 --- a/drivers/soc/qcom/hab/hab.h +++ b/drivers/soc/qcom/hab/hab.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016-2017, The Linux Foundation. All rights reserved. +/* Copyright (c) 2016-2018, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -13,6 +13,9 @@ #ifndef __HAB_H #define __HAB_H +#ifdef pr_fmt +#undef pr_fmt +#endif #define pr_fmt(fmt) "|hab:%s:%d|" fmt, __func__, __LINE__ #include -- 2.11.0