ath: change logging functions to return void
The return values are not used by callers of these functions so change the functions to return void. Other miscellanea: o add __printf verification to wil6210 logging functions No format/argument mismatches found Acked-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
This commit is contained in:
parent
7869b4faf5
commit
babcb3edd9
|
@ -107,21 +107,18 @@ struct ath10k_dump_file_data {
|
||||||
u8 data[0];
|
u8 data[0];
|
||||||
} __packed;
|
} __packed;
|
||||||
|
|
||||||
int ath10k_info(struct ath10k *ar, const char *fmt, ...)
|
void ath10k_info(struct ath10k *ar, const char *fmt, ...)
|
||||||
{
|
{
|
||||||
struct va_format vaf = {
|
struct va_format vaf = {
|
||||||
.fmt = fmt,
|
.fmt = fmt,
|
||||||
};
|
};
|
||||||
va_list args;
|
va_list args;
|
||||||
int ret;
|
|
||||||
|
|
||||||
va_start(args, fmt);
|
va_start(args, fmt);
|
||||||
vaf.va = &args;
|
vaf.va = &args;
|
||||||
ret = dev_info(ar->dev, "%pV", &vaf);
|
dev_info(ar->dev, "%pV", &vaf);
|
||||||
trace_ath10k_log_info(ar, &vaf);
|
trace_ath10k_log_info(ar, &vaf);
|
||||||
va_end(args);
|
va_end(args);
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(ath10k_info);
|
EXPORT_SYMBOL(ath10k_info);
|
||||||
|
|
||||||
|
@ -148,25 +145,22 @@ void ath10k_print_driver_info(struct ath10k *ar)
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(ath10k_print_driver_info);
|
EXPORT_SYMBOL(ath10k_print_driver_info);
|
||||||
|
|
||||||
int ath10k_err(struct ath10k *ar, const char *fmt, ...)
|
void ath10k_err(struct ath10k *ar, const char *fmt, ...)
|
||||||
{
|
{
|
||||||
struct va_format vaf = {
|
struct va_format vaf = {
|
||||||
.fmt = fmt,
|
.fmt = fmt,
|
||||||
};
|
};
|
||||||
va_list args;
|
va_list args;
|
||||||
int ret;
|
|
||||||
|
|
||||||
va_start(args, fmt);
|
va_start(args, fmt);
|
||||||
vaf.va = &args;
|
vaf.va = &args;
|
||||||
ret = dev_err(ar->dev, "%pV", &vaf);
|
dev_err(ar->dev, "%pV", &vaf);
|
||||||
trace_ath10k_log_err(ar, &vaf);
|
trace_ath10k_log_err(ar, &vaf);
|
||||||
va_end(args);
|
va_end(args);
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(ath10k_err);
|
EXPORT_SYMBOL(ath10k_err);
|
||||||
|
|
||||||
int ath10k_warn(struct ath10k *ar, const char *fmt, ...)
|
void ath10k_warn(struct ath10k *ar, const char *fmt, ...)
|
||||||
{
|
{
|
||||||
struct va_format vaf = {
|
struct va_format vaf = {
|
||||||
.fmt = fmt,
|
.fmt = fmt,
|
||||||
|
@ -179,8 +173,6 @@ int ath10k_warn(struct ath10k *ar, const char *fmt, ...)
|
||||||
trace_ath10k_log_warn(ar, &vaf);
|
trace_ath10k_log_warn(ar, &vaf);
|
||||||
|
|
||||||
va_end(args);
|
va_end(args);
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(ath10k_warn);
|
EXPORT_SYMBOL(ath10k_warn);
|
||||||
|
|
||||||
|
|
|
@ -40,9 +40,9 @@ enum ath10k_debug_mask {
|
||||||
|
|
||||||
extern unsigned int ath10k_debug_mask;
|
extern unsigned int ath10k_debug_mask;
|
||||||
|
|
||||||
__printf(2, 3) int ath10k_info(struct ath10k *ar, const char *fmt, ...);
|
__printf(2, 3) void ath10k_info(struct ath10k *ar, const char *fmt, ...);
|
||||||
__printf(2, 3) int ath10k_err(struct ath10k *ar, const char *fmt, ...);
|
__printf(2, 3) void ath10k_err(struct ath10k *ar, const char *fmt, ...);
|
||||||
__printf(2, 3) int ath10k_warn(struct ath10k *ar, const char *fmt, ...);
|
__printf(2, 3) void ath10k_warn(struct ath10k *ar, const char *fmt, ...);
|
||||||
void ath10k_print_driver_info(struct ath10k *ar);
|
void ath10k_print_driver_info(struct ath10k *ar);
|
||||||
|
|
||||||
#ifdef CONFIG_ATH10K_DEBUGFS
|
#ifdef CONFIG_ATH10K_DEBUGFS
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
#define ATH6KL_MAX_IE 256
|
#define ATH6KL_MAX_IE 256
|
||||||
|
|
||||||
__printf(2, 3) int ath6kl_printk(const char *level, const char *fmt, ...);
|
__printf(2, 3) void ath6kl_printk(const char *level, const char *fmt, ...);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Reflects the version of binary interface exposed by ATH6KL target
|
* Reflects the version of binary interface exposed by ATH6KL target
|
||||||
|
|
|
@ -37,76 +37,64 @@ struct ath6kl_fwlog_slot {
|
||||||
|
|
||||||
#define ATH6KL_FWLOG_VALID_MASK 0x1ffff
|
#define ATH6KL_FWLOG_VALID_MASK 0x1ffff
|
||||||
|
|
||||||
int ath6kl_printk(const char *level, const char *fmt, ...)
|
void ath6kl_printk(const char *level, const char *fmt, ...)
|
||||||
{
|
{
|
||||||
struct va_format vaf;
|
struct va_format vaf;
|
||||||
va_list args;
|
va_list args;
|
||||||
int rtn;
|
|
||||||
|
|
||||||
va_start(args, fmt);
|
va_start(args, fmt);
|
||||||
|
|
||||||
vaf.fmt = fmt;
|
vaf.fmt = fmt;
|
||||||
vaf.va = &args;
|
vaf.va = &args;
|
||||||
|
|
||||||
rtn = printk("%sath6kl: %pV", level, &vaf);
|
printk("%sath6kl: %pV", level, &vaf);
|
||||||
|
|
||||||
va_end(args);
|
va_end(args);
|
||||||
|
|
||||||
return rtn;
|
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(ath6kl_printk);
|
EXPORT_SYMBOL(ath6kl_printk);
|
||||||
|
|
||||||
int ath6kl_info(const char *fmt, ...)
|
void ath6kl_info(const char *fmt, ...)
|
||||||
{
|
{
|
||||||
struct va_format vaf = {
|
struct va_format vaf = {
|
||||||
.fmt = fmt,
|
.fmt = fmt,
|
||||||
};
|
};
|
||||||
va_list args;
|
va_list args;
|
||||||
int ret;
|
|
||||||
|
|
||||||
va_start(args, fmt);
|
va_start(args, fmt);
|
||||||
vaf.va = &args;
|
vaf.va = &args;
|
||||||
ret = ath6kl_printk(KERN_INFO, "%pV", &vaf);
|
ath6kl_printk(KERN_INFO, "%pV", &vaf);
|
||||||
trace_ath6kl_log_info(&vaf);
|
trace_ath6kl_log_info(&vaf);
|
||||||
va_end(args);
|
va_end(args);
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(ath6kl_info);
|
EXPORT_SYMBOL(ath6kl_info);
|
||||||
|
|
||||||
int ath6kl_err(const char *fmt, ...)
|
void ath6kl_err(const char *fmt, ...)
|
||||||
{
|
{
|
||||||
struct va_format vaf = {
|
struct va_format vaf = {
|
||||||
.fmt = fmt,
|
.fmt = fmt,
|
||||||
};
|
};
|
||||||
va_list args;
|
va_list args;
|
||||||
int ret;
|
|
||||||
|
|
||||||
va_start(args, fmt);
|
va_start(args, fmt);
|
||||||
vaf.va = &args;
|
vaf.va = &args;
|
||||||
ret = ath6kl_printk(KERN_ERR, "%pV", &vaf);
|
ath6kl_printk(KERN_ERR, "%pV", &vaf);
|
||||||
trace_ath6kl_log_err(&vaf);
|
trace_ath6kl_log_err(&vaf);
|
||||||
va_end(args);
|
va_end(args);
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(ath6kl_err);
|
EXPORT_SYMBOL(ath6kl_err);
|
||||||
|
|
||||||
int ath6kl_warn(const char *fmt, ...)
|
void ath6kl_warn(const char *fmt, ...)
|
||||||
{
|
{
|
||||||
struct va_format vaf = {
|
struct va_format vaf = {
|
||||||
.fmt = fmt,
|
.fmt = fmt,
|
||||||
};
|
};
|
||||||
va_list args;
|
va_list args;
|
||||||
int ret;
|
|
||||||
|
|
||||||
va_start(args, fmt);
|
va_start(args, fmt);
|
||||||
vaf.va = &args;
|
vaf.va = &args;
|
||||||
ret = ath6kl_printk(KERN_WARNING, "%pV", &vaf);
|
ath6kl_printk(KERN_WARNING, "%pV", &vaf);
|
||||||
trace_ath6kl_log_warn(&vaf);
|
trace_ath6kl_log_warn(&vaf);
|
||||||
va_end(args);
|
va_end(args);
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(ath6kl_warn);
|
EXPORT_SYMBOL(ath6kl_warn);
|
||||||
|
|
||||||
|
|
|
@ -50,10 +50,10 @@ enum ATH6K_DEBUG_MASK {
|
||||||
};
|
};
|
||||||
|
|
||||||
extern unsigned int debug_mask;
|
extern unsigned int debug_mask;
|
||||||
__printf(2, 3) int ath6kl_printk(const char *level, const char *fmt, ...);
|
__printf(2, 3) void ath6kl_printk(const char *level, const char *fmt, ...);
|
||||||
__printf(1, 2) int ath6kl_info(const char *fmt, ...);
|
__printf(1, 2) void ath6kl_info(const char *fmt, ...);
|
||||||
__printf(1, 2) int ath6kl_err(const char *fmt, ...);
|
__printf(1, 2) void ath6kl_err(const char *fmt, ...);
|
||||||
__printf(1, 2) int ath6kl_warn(const char *fmt, ...);
|
__printf(1, 2) void ath6kl_warn(const char *fmt, ...);
|
||||||
|
|
||||||
enum ath6kl_war {
|
enum ath6kl_war {
|
||||||
ATH6KL_WAR_INVALID_RATE,
|
ATH6KL_WAR_INVALID_RATE,
|
||||||
|
@ -81,10 +81,9 @@ int ath6kl_debug_init_fs(struct ath6kl *ar);
|
||||||
void ath6kl_debug_cleanup(struct ath6kl *ar);
|
void ath6kl_debug_cleanup(struct ath6kl *ar);
|
||||||
|
|
||||||
#else
|
#else
|
||||||
static inline int ath6kl_dbg(enum ATH6K_DEBUG_MASK dbg_mask,
|
static inline void ath6kl_dbg(enum ATH6K_DEBUG_MASK dbg_mask,
|
||||||
const char *fmt, ...)
|
const char *fmt, ...)
|
||||||
{
|
{
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void ath6kl_dbg_dump(enum ATH6K_DEBUG_MASK mask,
|
static inline void ath6kl_dbg_dump(enum ATH6K_DEBUG_MASK mask,
|
||||||
|
|
|
@ -17,40 +17,34 @@
|
||||||
#include "wil6210.h"
|
#include "wil6210.h"
|
||||||
#include "trace.h"
|
#include "trace.h"
|
||||||
|
|
||||||
int wil_err(struct wil6210_priv *wil, const char *fmt, ...)
|
void wil_err(struct wil6210_priv *wil, const char *fmt, ...)
|
||||||
{
|
{
|
||||||
struct net_device *ndev = wil_to_ndev(wil);
|
struct net_device *ndev = wil_to_ndev(wil);
|
||||||
struct va_format vaf = {
|
struct va_format vaf = {
|
||||||
.fmt = fmt,
|
.fmt = fmt,
|
||||||
};
|
};
|
||||||
va_list args;
|
va_list args;
|
||||||
int ret;
|
|
||||||
|
|
||||||
va_start(args, fmt);
|
va_start(args, fmt);
|
||||||
vaf.va = &args;
|
vaf.va = &args;
|
||||||
ret = netdev_err(ndev, "%pV", &vaf);
|
netdev_err(ndev, "%pV", &vaf);
|
||||||
trace_wil6210_log_err(&vaf);
|
trace_wil6210_log_err(&vaf);
|
||||||
va_end(args);
|
va_end(args);
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int wil_info(struct wil6210_priv *wil, const char *fmt, ...)
|
void wil_info(struct wil6210_priv *wil, const char *fmt, ...)
|
||||||
{
|
{
|
||||||
struct net_device *ndev = wil_to_ndev(wil);
|
struct net_device *ndev = wil_to_ndev(wil);
|
||||||
struct va_format vaf = {
|
struct va_format vaf = {
|
||||||
.fmt = fmt,
|
.fmt = fmt,
|
||||||
};
|
};
|
||||||
va_list args;
|
va_list args;
|
||||||
int ret;
|
|
||||||
|
|
||||||
va_start(args, fmt);
|
va_start(args, fmt);
|
||||||
vaf.va = &args;
|
vaf.va = &args;
|
||||||
ret = netdev_info(ndev, "%pV", &vaf);
|
netdev_info(ndev, "%pV", &vaf);
|
||||||
trace_wil6210_log_info(&vaf);
|
trace_wil6210_log_info(&vaf);
|
||||||
va_end(args);
|
va_end(args);
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int wil_dbg_trace(struct wil6210_priv *wil, const char *fmt, ...)
|
int wil_dbg_trace(struct wil6210_priv *wil, const char *fmt, ...)
|
||||||
|
|
|
@ -436,9 +436,12 @@ struct wil6210_priv {
|
||||||
#define wil_to_ndev(i) (wil_to_wdev(i)->netdev)
|
#define wil_to_ndev(i) (wil_to_wdev(i)->netdev)
|
||||||
#define ndev_to_wil(n) (wdev_to_wil(n->ieee80211_ptr))
|
#define ndev_to_wil(n) (wdev_to_wil(n->ieee80211_ptr))
|
||||||
|
|
||||||
|
__printf(2, 3)
|
||||||
int wil_dbg_trace(struct wil6210_priv *wil, const char *fmt, ...);
|
int wil_dbg_trace(struct wil6210_priv *wil, const char *fmt, ...);
|
||||||
int wil_err(struct wil6210_priv *wil, const char *fmt, ...);
|
__printf(2, 3)
|
||||||
int wil_info(struct wil6210_priv *wil, const char *fmt, ...);
|
void wil_err(struct wil6210_priv *wil, const char *fmt, ...);
|
||||||
|
__printf(2, 3)
|
||||||
|
void wil_info(struct wil6210_priv *wil, const char *fmt, ...);
|
||||||
#define wil_dbg(wil, fmt, arg...) do { \
|
#define wil_dbg(wil, fmt, arg...) do { \
|
||||||
netdev_dbg(wil_to_ndev(wil), fmt, ##arg); \
|
netdev_dbg(wil_to_ndev(wil), fmt, ##arg); \
|
||||||
wil_dbg_trace(wil, fmt, ##arg); \
|
wil_dbg_trace(wil, fmt, ##arg); \
|
||||||
|
|
Loading…
Reference in New Issue