]> git.ipfire.org Git - people/ms/u-boot.git/blame - drivers/core/util.c
Merge git://git.denx.de/u-boot-dm
[people/ms/u-boot.git] / drivers / core / util.c
CommitLineData
6494d708
SG
1/*
2 * Copyright (c) 2013 Google, Inc
3 *
4 * SPDX-License-Identifier: GPL-2.0+
5 */
6
7#include <common.h>
8#include <vsprintf.h>
9
10void dm_warn(const char *fmt, ...)
11{
12 va_list args;
13
14 va_start(args, fmt);
15 vprintf(fmt, args);
16 va_end(args);
17}
18
19void dm_dbg(const char *fmt, ...)
20{
21 va_list args;
22
23 va_start(args, fmt);
24 vprintf(fmt, args);
25 va_end(args);
26}
27
28int list_count_items(struct list_head *head)
29{
30 struct list_head *node;
31 int count = 0;
32
33 list_for_each(node, head)
34 count++;
35
36 return count;
37}