teei_debug.h 754 B

123456789101112131415161718192021222324252627282930313233
  1. #ifndef __TEEI_DEBUG_H_
  2. #define __TEEI_DEBUG_H_
  3. /* #define TEEI_DEBUG */
  4. /* #define TEEI_INFO */
  5. #undef TDEBUG
  6. #undef TINFO
  7. #undef TERR
  8. #define TZDebug(fmt, args...) pr_info("\033[;34m[TZDriver]"fmt"\033[0m\n", ##args)
  9. #ifdef TEEI_DEBUG
  10. /*
  11. #define TDEBUG(fmt, args...) pr_info("%s(%i, %s): " fmt "\n", \
  12. __func__, current->pid, current->comm, ##args)
  13. */
  14. #define TDEBUG(fmt, args...) pr_info("tz driver"fmt"\n", ##args)
  15. #else
  16. #define TDEBUG(fmt, args...)
  17. #endif
  18. #ifdef TEEI_INFO
  19. #define TINFO(fmt, args...) pr_info("%s(%i, %s): " fmt "\n", \
  20. __func__, current->pid, current->comm, ##args)
  21. #else
  22. #define TINFO(fmt, args...)
  23. #endif
  24. #define TERR(fmt, args...) pr_err("%s(%i, %s): " fmt "\n", \
  25. __func__, current->pid, current->comm, ##args)
  26. #endif