blob: 6b27dedee35e3397e4e31c28b822f6dc089a9038 [file] [log] [blame]
Duy Truong790f06d2013-02-13 16:38:12 -08001/* Copyright (c) 2009, The Linux Foundation. All rights reserved.
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License version 2 and
5 * only version 2 as published by the Free Software Foundation.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 *
12 */
13#ifndef __ARCH_ARM_MACH_MSM_DEBUG_MM_H_
14#define __ARCH_ARM_MACH_MSM_DEBUG_MM_H_
15
Steve Mucklef132c6c2012-06-06 18:30:57 -070016#include <linux/string.h>
17
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070018/* The below macro removes the directory path name and retains only the
19 * file name to avoid long path names in log messages that comes as
20 * part of __FILE__ to compiler.
21 */
22#define __MM_FILE__ strrchr(__FILE__, '/') ? (strrchr(__FILE__, '/')+1) : \
23 __FILE__
24
25#define MM_DBG(fmt, args...) pr_debug("[%s] " fmt,\
26 __func__, ##args)
27
28#define MM_INFO(fmt, args...) pr_info("[%s:%s] " fmt,\
29 __MM_FILE__, __func__, ##args)
30
31#define MM_ERR(fmt, args...) pr_err("[%s:%s] " fmt,\
32 __MM_FILE__, __func__, ##args)
33#endif /* __ARCH_ARM_MACH_MSM_DEBUG_MM_H_ */