mirror of
https://github.com/rd-stuffs/msm-4.14.git
synced 2025-02-20 11:45:48 +08:00
ath6kl: convert ath6kl_info/err/warn macros to real functions
After this it's cleaner to add trace calls. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
This commit is contained in:
parent
4771979aab
commit
d470b4bcc1
@ -56,6 +56,57 @@ int ath6kl_printk(const char *level, const char *fmt, ...)
|
|||||||
}
|
}
|
||||||
EXPORT_SYMBOL(ath6kl_printk);
|
EXPORT_SYMBOL(ath6kl_printk);
|
||||||
|
|
||||||
|
int ath6kl_info(const char *fmt, ...)
|
||||||
|
{
|
||||||
|
struct va_format vaf = {
|
||||||
|
.fmt = fmt,
|
||||||
|
};
|
||||||
|
va_list args;
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
va_start(args, fmt);
|
||||||
|
vaf.va = &args;
|
||||||
|
ret = ath6kl_printk(KERN_INFO, "%pV", &vaf);
|
||||||
|
va_end(args);
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
EXPORT_SYMBOL(ath6kl_info);
|
||||||
|
|
||||||
|
int ath6kl_err(const char *fmt, ...)
|
||||||
|
{
|
||||||
|
struct va_format vaf = {
|
||||||
|
.fmt = fmt,
|
||||||
|
};
|
||||||
|
va_list args;
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
va_start(args, fmt);
|
||||||
|
vaf.va = &args;
|
||||||
|
ret = ath6kl_printk(KERN_ERR, "%pV", &vaf);
|
||||||
|
va_end(args);
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
EXPORT_SYMBOL(ath6kl_err);
|
||||||
|
|
||||||
|
int ath6kl_warn(const char *fmt, ...)
|
||||||
|
{
|
||||||
|
struct va_format vaf = {
|
||||||
|
.fmt = fmt,
|
||||||
|
};
|
||||||
|
va_list args;
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
va_start(args, fmt);
|
||||||
|
vaf.va = &args;
|
||||||
|
ret = ath6kl_printk(KERN_WARNING, "%pV", &vaf);
|
||||||
|
va_end(args);
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
EXPORT_SYMBOL(ath6kl_warn);
|
||||||
|
|
||||||
#ifdef CONFIG_ATH6KL_DEBUG
|
#ifdef CONFIG_ATH6KL_DEBUG
|
||||||
|
|
||||||
void ath6kl_dbg(enum ATH6K_DEBUG_MASK mask, const char *fmt, ...)
|
void ath6kl_dbg(enum ATH6K_DEBUG_MASK mask, const char *fmt, ...)
|
||||||
|
@ -51,13 +51,9 @@ enum ATH6K_DEBUG_MASK {
|
|||||||
extern unsigned int debug_mask;
|
extern unsigned int debug_mask;
|
||||||
extern __printf(2, 3)
|
extern __printf(2, 3)
|
||||||
int ath6kl_printk(const char *level, const char *fmt, ...);
|
int ath6kl_printk(const char *level, const char *fmt, ...);
|
||||||
|
extern __printf(1, 2) int ath6kl_info(const char *fmt, ...);
|
||||||
#define ath6kl_info(fmt, ...) \
|
extern __printf(1, 2) int ath6kl_err(const char *fmt, ...);
|
||||||
ath6kl_printk(KERN_INFO, fmt, ##__VA_ARGS__)
|
extern __printf(1, 2) int ath6kl_warn(const char *fmt, ...);
|
||||||
#define ath6kl_err(fmt, ...) \
|
|
||||||
ath6kl_printk(KERN_ERR, fmt, ##__VA_ARGS__)
|
|
||||||
#define ath6kl_warn(fmt, ...) \
|
|
||||||
ath6kl_printk(KERN_WARNING, fmt, ##__VA_ARGS__)
|
|
||||||
|
|
||||||
enum ath6kl_war {
|
enum ath6kl_war {
|
||||||
ATH6KL_WAR_INVALID_RATE,
|
ATH6KL_WAR_INVALID_RATE,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user