hdm_log.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. /*
  2. * @file hdm_log.h
  3. * @brief Header file for HDM log
  4. * Copyright (c) 2019, Samsung Electronics Corporation. All rights reserved.
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License version 2 and
  8. * only version 2 as published by the Free Software Foundation.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. */
  15. #ifndef __HDM_LOG_H__
  16. #define __HDM_LOG_H__
  17. #include <linux/printk.h>
  18. #define TAG "[sec_hdm]"
  19. void hdm_printk(int level, const char *fmt, ...);
  20. #define DEV_ERR (1)
  21. #define DEV_WARN (2)
  22. #define DEV_NOTI (3)
  23. #define DEV_INFO (4)
  24. #define DEV_DEBUG (5)
  25. #define HDM_LOG_LEVEL DEV_INFO
  26. #define hdm_err(fmt, ...) hdm_printk(DEV_ERR, fmt, ## __VA_ARGS__)
  27. #define hdm_warn(fmt, ...) hdm_printk(DEV_WARN, fmt, ## __VA_ARGS__)
  28. #define hdm_noti(fmt, ...) hdm_printk(DEV_NOTI, fmt, ## __VA_ARGS__)
  29. #define hdm_info(fmt, ...) hdm_printk(DEV_INFO, fmt, ## __VA_ARGS__)
  30. #define hdm_debug(fmt, ...) hdm_printk(DEV_DEBUG, fmt, ## __VA_ARGS__)
  31. #endif //__HDM_LOG_H__