0001
0002
0003
0004
0005
0006 #include <linux/device.h>
0007 #include <linux/module.h> /* bug in tracepoint.h, it should include this */
0008
0009 #ifndef __CHECKER__
0010 #define CREATE_TRACE_POINTS
0011 #include "bus.h"
0012 #include "tracepoint.h"
0013 #include "debug.h"
0014
0015 void __brcmf_err(struct brcmf_bus *bus, const char *func, const char *fmt, ...)
0016 {
0017 struct va_format vaf = {
0018 .fmt = fmt,
0019 };
0020 va_list args;
0021
0022 va_start(args, fmt);
0023 vaf.va = &args;
0024 if (bus)
0025 dev_err(bus->dev, "%s: %pV", func, &vaf);
0026 else
0027 pr_err("%s: %pV", func, &vaf);
0028 trace_brcmf_err(func, &vaf);
0029 va_end(args);
0030 }
0031
0032 #endif