| Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1 | /* Copyright (c) 2009, Code Aurora Forum. All rights reserved. | 
|  | 2 | * | 
|  | 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 |  | 
|  | 16 | /* The below macro removes the directory path name and retains only the | 
|  | 17 | * file name to avoid long path names in log messages that comes as | 
|  | 18 | * part of __FILE__ to compiler. | 
|  | 19 | */ | 
|  | 20 | #define __MM_FILE__ strrchr(__FILE__, '/') ? (strrchr(__FILE__, '/')+1) : \ | 
|  | 21 | __FILE__ | 
|  | 22 |  | 
|  | 23 | #define MM_DBG(fmt, args...) pr_debug("[%s] " fmt,\ | 
|  | 24 | __func__, ##args) | 
|  | 25 |  | 
|  | 26 | #define MM_INFO(fmt, args...) pr_info("[%s:%s] " fmt,\ | 
|  | 27 | __MM_FILE__, __func__, ##args) | 
|  | 28 |  | 
|  | 29 | #define MM_ERR(fmt, args...) pr_err("[%s:%s] " fmt,\ | 
|  | 30 | __MM_FILE__, __func__, ##args) | 
|  | 31 | #endif /* __ARCH_ARM_MACH_MSM_DEBUG_MM_H_ */ |