brintos

brintos / linux-shallow public Read only

0
0
Text · 624 B · 814fcc7 Raw
33 lines · c
1// SPDX-License-Identifier: ISC2/*3 * Copyright (c) 2012 Broadcom Corporation4 */5 6#include <linux/device.h>7#include <linux/module.h> /* bug in tracepoint.h, it should include this */8 9#ifndef __CHECKER__10#define CREATE_TRACE_POINTS11#include "bus.h"12#include "tracepoint.h"13#include "debug.h"14 15void __brcmf_err(struct brcmf_bus *bus, const char *func, const char *fmt, ...)16{17	struct va_format vaf = {18		.fmt = fmt,19	};20	va_list args;21 22	va_start(args, fmt);23	vaf.va = &args;24	if (bus)25		dev_err(bus->dev, "%s: %pV", func, &vaf);26	else27		pr_err("%s: %pV", func, &vaf);28	trace_brcmf_err(func, &vaf);29	va_end(args);30}31 32#endif33