rsi: Add pr_fmt,__printf, fix format & arg mismatch
authorJoe Perches <joe@perches.com>
Wed, 19 Mar 2014 00:59:47 +0000 (17:59 -0700)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 19 Mar 2014 19:15:47 +0000 (15:15 -0400)
Emit a prefix for the rsi_dbg messages.

Fix the format and argument mismatch and add
__printf(2, 3) to try to avoid more.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/rsi/rsi_91x_main.c
drivers/net/wireless/rsi/rsi_91x_mgmt.c
drivers/net/wireless/rsi/rsi_main.h

index 7367be4..8810862 100644 (file)
@@ -14,6 +14,8 @@
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/module.h>
 #include <linux/firmware.h>
 #include "rsi_mgmt.h"
index f09c72e..ef37d4b 100644 (file)
@@ -393,7 +393,8 @@ static int rsi_mgmt_pkt_to_core(struct rsi_common *common,
 
                msg_len -= pad_bytes;
                if ((msg_len <= 0) || (!msg)) {
-                       rsi_dbg(MGMT_RX_ZONE, "Invalid rx msg of len = %d\n",
+                       rsi_dbg(MGMT_RX_ZONE,
+                               "%s: Invalid rx msg of len = %d\n",
                                __func__, msg_len);
                        return -EINVAL;
                }
index e97e6ad..2cb73e7 100644 (file)
@@ -40,7 +40,7 @@
 #define FSM_MAC_INIT_DONE               6
 
 extern u32 rsi_zone_enabled;
-extern void rsi_dbg(u32 zone, const char *fmt, ...);
+extern __printf(2, 3) void rsi_dbg(u32 zone, const char *fmt, ...);
 
 #define RSI_MAX_VIFS                    1
 #define NUM_EDCA_QUEUES                 4