[PATCH 01/11] wcn36xx: Use pr_fmt instead of driver prefix.
Eugene Krasnikov
k.eugene.e at gmail.com
Thu Aug 22 04:45:54 EDT 2013
To make code similar to all ath drivers.
Signed-off-by: Eugene Krasnikov <k.eugene.e at gmail.com>
---
debug.c | 2 ++
dxe.c | 2 ++
main.c | 2 ++
pmc.c | 2 ++
smd.c | 2 ++
txrx.c | 2 ++
wcn36xx.h | 15 ++++++---------
7 files changed, 18 insertions(+), 9 deletions(-)
diff --git a/debug.c b/debug.c
index 9fa9957..ef21fc5 100644
--- a/debug.c
+++ b/debug.c
@@ -14,6 +14,8 @@
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
#include <linux/debugfs.h>
#include <linux/uaccess.h>
#include "wcn36xx.h"
diff --git a/dxe.c b/dxe.c
index baad701..4668efa 100644
--- a/dxe.c
+++ b/dxe.c
@@ -20,6 +20,8 @@
* through high channels managment packets are transfered
*/
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
#include <linux/interrupt.h>
#include "wcn36xx.h"
#include "txrx.h"
diff --git a/main.c b/main.c
index c2d1026..e4bf796 100644
--- a/main.c
+++ b/main.c
@@ -14,6 +14,8 @@
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
#include <linux/module.h>
#include <linux/platform_device.h>
#include "wcn36xx.h"
diff --git a/pmc.c b/pmc.c
index f98aeeb..ce7771f 100644
--- a/pmc.c
+++ b/pmc.c
@@ -14,6 +14,8 @@
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
#include "wcn36xx.h"
int wcn36xx_pmc_init(struct wcn36xx *wcn)
diff --git a/smd.c b/smd.c
index b39ef21..1f6f71d 100644
--- a/smd.c
+++ b/smd.c
@@ -14,6 +14,8 @@
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
#include <linux/etherdevice.h>
#include <linux/firmware.h>
#include <linux/bitops.h>
diff --git a/txrx.c b/txrx.c
index 54fb86e..973389d 100644
--- a/txrx.c
+++ b/txrx.c
@@ -14,6 +14,8 @@
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
#include "txrx.h"
static inline int get_rssi0(struct wcn36xx_rx_bd *bd)
diff --git a/wcn36xx.h b/wcn36xx.h
index 74e27fe..c718cb5 100644
--- a/wcn36xx.h
+++ b/wcn36xx.h
@@ -29,7 +29,6 @@
#include "pmc.h"
#include "debug.h"
-#define DRIVER_PREFIX "wcn36xx: "
#define WLAN_NV_FILE "wlan/prima/WCNSS_qcom_wlan_nv.bin"
#define WCN36XX_AGGR_BUFFER_SIZE 64
@@ -54,25 +53,23 @@ enum wcn36xx_debug_mask {
WCN36XX_DBG_ANY = 0xffffffff,
};
-#define wcn36xx_error(fmt, arg...) do { \
- pr_err(DRIVER_PREFIX "ERROR " fmt "\n", ##arg); \
- __WARN(); \
-} while (0)
+#define wcn36xx_error(fmt, arg...) \
+ printk(KERN_ERR pr_fmt("ERROR " fmt "\n"), ##arg);
#define wcn36xx_warn(fmt, arg...) \
- pr_warn(DRIVER_PREFIX "WARNING " fmt "\n", ##arg)
+ printk(KERN_WARNING pr_fmt("WARNING " fmt "\n"), ##arg)
#define wcn36xx_info(fmt, arg...) \
- pr_info(DRIVER_PREFIX fmt "\n", ##arg)
+ printk(KERN_INFO pr_fmt(fmt "\n"), ##arg)
#define wcn36xx_dbg(mask, fmt, arg...) do { \
if (debug_mask & mask) \
- pr_debug(DRIVER_PREFIX fmt "\n", ##arg); \
+ printk(KERN_DEBUG pr_fmt(fmt "\n"), ##arg); \
} while (0)
#define wcn36xx_dbg_dump(mask, prefix_str, buf, len) do { \
if (debug_mask & mask) \
- print_hex_dump(KERN_DEBUG, prefix_str, \
+ print_hex_dump(KERN_DEBUG, pr_fmt(prefix_str), \
DUMP_PREFIX_OFFSET, 32, 1, \
buf, len, false); \
} while (0)
--
1.8.2.2
More information about the wcn36xx
mailing list