util.h 486 B

123456789101112131415161718192021222324252627282930
  1. /*
  2. * Copyright (c) 2013 Google, Inc
  3. *
  4. * SPDX-License-Identifier: GPL-2.0+
  5. */
  6. #ifndef __DM_UTIL_H
  7. #define __DM_UTIL_H
  8. void dm_warn(const char *fmt, ...);
  9. #ifdef DEBUG
  10. void dm_dbg(const char *fmt, ...);
  11. #else
  12. static inline void dm_dbg(const char *fmt, ...)
  13. {
  14. }
  15. #endif
  16. struct list_head;
  17. /**
  18. * list_count_items() - Count number of items in a list
  19. *
  20. * @param head: Head of list
  21. * @return number of items, or 0 if empty
  22. */
  23. int list_count_items(struct list_head *head);
  24. #endif