ath: Add and use pr_fmt, convert printks to pr_<level>
authorJoe Perches <joe@perches.com>
Mon, 19 Mar 2012 00:30:52 +0000 (17:30 -0700)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 10 Apr 2012 18:52:13 +0000 (14:52 -0400)
Use a more current logging style.
Make sure all output is prefixed appropriately.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
26 files changed:
drivers/net/wireless/ath/ath5k/ani.c
drivers/net/wireless/ath/ath5k/ath5k.h
drivers/net/wireless/ath/ath5k/attach.c
drivers/net/wireless/ath/ath5k/base.c
drivers/net/wireless/ath/ath5k/debug.c
drivers/net/wireless/ath/ath5k/desc.c
drivers/net/wireless/ath/ath5k/dma.c
drivers/net/wireless/ath/ath5k/eeprom.c
drivers/net/wireless/ath/ath5k/initvals.c
drivers/net/wireless/ath/ath5k/led.c
drivers/net/wireless/ath/ath5k/mac80211-ops.c
drivers/net/wireless/ath/ath5k/pci.c
drivers/net/wireless/ath/ath5k/phy.c
drivers/net/wireless/ath/ath5k/qcu.c
drivers/net/wireless/ath/ath5k/reset.c
drivers/net/wireless/ath/ath5k/sysfs.c
drivers/net/wireless/ath/ath6kl/cfg80211.c
drivers/net/wireless/ath/ath6kl/init.c
drivers/net/wireless/ath/ath6kl/main.c
drivers/net/wireless/ath/ath6kl/txrx.c
drivers/net/wireless/ath/ath9k/htc_drv_init.c
drivers/net/wireless/ath/ath9k/htc_hst.c
drivers/net/wireless/ath/ath9k/init.c
drivers/net/wireless/ath/ath9k/pci.c
drivers/net/wireless/ath/main.c
drivers/net/wireless/ath/regd.c

index 35e93704c4ef53bdbb6b633d2285f2e9c31f9884..5c008757662b50e05b63024a2e293bfd1a30d671 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 "ath5k.h"
 #include "reg.h"
 #include "debug.h"
@@ -728,33 +730,25 @@ void
 ath5k_ani_print_counters(struct ath5k_hw *ah)
 {
        /* clears too */
-       printk(KERN_NOTICE "ACK fail\t%d\n",
-               ath5k_hw_reg_read(ah, AR5K_ACK_FAIL));
-       printk(KERN_NOTICE "RTS fail\t%d\n",
-               ath5k_hw_reg_read(ah, AR5K_RTS_FAIL));
-       printk(KERN_NOTICE "RTS success\t%d\n",
-               ath5k_hw_reg_read(ah, AR5K_RTS_OK));
-       printk(KERN_NOTICE "FCS error\t%d\n",
-               ath5k_hw_reg_read(ah, AR5K_FCS_FAIL));
+       pr_notice("ACK fail\t%d\n", ath5k_hw_reg_read(ah, AR5K_ACK_FAIL));
+       pr_notice("RTS fail\t%d\n", ath5k_hw_reg_read(ah, AR5K_RTS_FAIL));
+       pr_notice("RTS success\t%d\n", ath5k_hw_reg_read(ah, AR5K_RTS_OK));
+       pr_notice("FCS error\t%d\n", ath5k_hw_reg_read(ah, AR5K_FCS_FAIL));
 
        /* no clear */
-       printk(KERN_NOTICE "tx\t%d\n",
-               ath5k_hw_reg_read(ah, AR5K_PROFCNT_TX));
-       printk(KERN_NOTICE "rx\t%d\n",
-               ath5k_hw_reg_read(ah, AR5K_PROFCNT_RX));
-       printk(KERN_NOTICE "busy\t%d\n",
-               ath5k_hw_reg_read(ah, AR5K_PROFCNT_RXCLR));
-       printk(KERN_NOTICE "cycles\t%d\n",
-               ath5k_hw_reg_read(ah, AR5K_PROFCNT_CYCLE));
-
-       printk(KERN_NOTICE "AR5K_PHYERR_CNT1\t%d\n",
-               ath5k_hw_reg_read(ah, AR5K_PHYERR_CNT1));
-       printk(KERN_NOTICE "AR5K_PHYERR_CNT2\t%d\n",
-               ath5k_hw_reg_read(ah, AR5K_PHYERR_CNT2));
-       printk(KERN_NOTICE "AR5K_OFDM_FIL_CNT\t%d\n",
-               ath5k_hw_reg_read(ah, AR5K_OFDM_FIL_CNT));
-       printk(KERN_NOTICE "AR5K_CCK_FIL_CNT\t%d\n",
-               ath5k_hw_reg_read(ah, AR5K_CCK_FIL_CNT));
+       pr_notice("tx\t%d\n", ath5k_hw_reg_read(ah, AR5K_PROFCNT_TX));
+       pr_notice("rx\t%d\n", ath5k_hw_reg_read(ah, AR5K_PROFCNT_RX));
+       pr_notice("busy\t%d\n", ath5k_hw_reg_read(ah, AR5K_PROFCNT_RXCLR));
+       pr_notice("cycles\t%d\n", ath5k_hw_reg_read(ah, AR5K_PROFCNT_CYCLE));
+
+       pr_notice("AR5K_PHYERR_CNT1\t%d\n",
+                 ath5k_hw_reg_read(ah, AR5K_PHYERR_CNT1));
+       pr_notice("AR5K_PHYERR_CNT2\t%d\n",
+                 ath5k_hw_reg_read(ah, AR5K_PHYERR_CNT2));
+       pr_notice("AR5K_OFDM_FIL_CNT\t%d\n",
+                 ath5k_hw_reg_read(ah, AR5K_OFDM_FIL_CNT));
+       pr_notice("AR5K_CCK_FIL_CNT\t%d\n",
+                 ath5k_hw_reg_read(ah, AR5K_CCK_FIL_CNT));
 }
 
 #endif
index 8d434b8f58557ff8b105371fe012661b829367e4..954c3734da98addc880d8025e56aeb62e7b90e70 100644 (file)
   GENERIC DRIVER DEFINITIONS
 \****************************/
 
-#define ATH5K_PRINTF(fmt, ...) \
-       printk(KERN_WARNING "%s: " fmt, __func__, ##__VA_ARGS__)
-
-#define ATH5K_PRINTK(_sc, _level, _fmt, ...) \
-       printk(_level "ath5k %s: " _fmt, \
-               ((_sc) && (_sc)->hw) ? wiphy_name((_sc)->hw->wiphy) : "", \
-               ##__VA_ARGS__)
-
-#define ATH5K_PRINTK_LIMIT(_sc, _level, _fmt, ...) do { \
-       if (net_ratelimit()) \
-               ATH5K_PRINTK(_sc, _level, _fmt, ##__VA_ARGS__); \
-       } while (0)
+#define ATH5K_PRINTF(fmt, ...)                                         \
+       pr_warn("%s: " fmt, __func__, ##__VA_ARGS__)
+
+#define ATH5K_PRINTK(_sc, _level, _fmt, ...)                           \
+       printk(_level pr_fmt("%s%s" _fmt),                              \
+              ((_sc) && (_sc)->hw) ? wiphy_name((_sc)->hw->wiphy) : "", \
+              ((_sc) && (_sc)->hw) ? ": " : "",                        \
+              ##__VA_ARGS__)
+
+#define ATH5K_PRINTK_LIMIT(_sc, _level, _fmt, ...)                     \
+do {                                                                   \
+       if (net_ratelimit())                                            \
+               ATH5K_PRINTK(_sc, _level, _fmt, ##__VA_ARGS__);         \
+} while (0)
 
-#define ATH5K_INFO(_sc, _fmt, ...) \
+#define ATH5K_INFO(_sc, _fmt, ...)                                     \
        ATH5K_PRINTK(_sc, KERN_INFO, _fmt, ##__VA_ARGS__)
 
-#define ATH5K_WARN(_sc, _fmt, ...) \
+#define ATH5K_WARN(_sc, _fmt, ...)                                     \
        ATH5K_PRINTK_LIMIT(_sc, KERN_WARNING, _fmt, ##__VA_ARGS__)
 
-#define ATH5K_ERR(_sc, _fmt, ...) \
+#define ATH5K_ERR(_sc, _fmt, ...)                                      \
        ATH5K_PRINTK_LIMIT(_sc, KERN_ERR, _fmt, ##__VA_ARGS__)
 
 /*
index d7114c75fe9b0bb66515e6856128194ee8fd2b45..7106547a14ddc6819751b48041540ab3846e7f68 100644 (file)
@@ -20,6 +20,8 @@
 * Attach/Detach Functions and helpers *
 \*************************************/
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/pci.h>
 #include <linux/slab.h>
 #include "ath5k.h"
index 0e643b016b3286a12d80e040a7d399914468f8fb..a9c0503237e9bedb1f707ebd365a24be7b7a207f 100644 (file)
@@ -40,6 +40,8 @@
  *
  */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/module.h>
 #include <linux/delay.h>
 #include <linux/dma-mapping.h>
index 8c5ce8b0c7346873a64c6ee9e8f358a2d5a565c6..9be885707e2039cc75b6a44c5198e61a40086bc0 100644 (file)
@@ -57,6 +57,9 @@
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
  * THE POSSIBILITY OF SUCH DAMAGES.
  */
+
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/export.h>
 #include <linux/moduleparam.h>
 
@@ -254,10 +257,10 @@ static ssize_t write_file_beacon(struct file *file,
 
        if (strncmp(buf, "disable", 7) == 0) {
                AR5K_REG_DISABLE_BITS(ah, AR5K_BEACON, AR5K_BEACON_ENABLE);
-               printk(KERN_INFO "debugfs disable beacons\n");
+               pr_info("debugfs disable beacons\n");
        } else if (strncmp(buf, "enable", 6) == 0) {
                AR5K_REG_ENABLE_BITS(ah, AR5K_BEACON, AR5K_BEACON_ENABLE);
-               printk(KERN_INFO "debugfs enable beacons\n");
+               pr_info("debugfs enable beacons\n");
        }
        return count;
 }
@@ -457,19 +460,19 @@ static ssize_t write_file_antenna(struct file *file,
 
        if (strncmp(buf, "diversity", 9) == 0) {
                ath5k_hw_set_antenna_mode(ah, AR5K_ANTMODE_DEFAULT);
-               printk(KERN_INFO "ath5k debug: enable diversity\n");
+               pr_info("debug: enable diversity\n");
        } else if (strncmp(buf, "fixed-a", 7) == 0) {
                ath5k_hw_set_antenna_mode(ah, AR5K_ANTMODE_FIXED_A);
-               printk(KERN_INFO "ath5k debugfs: fixed antenna A\n");
+               pr_info("debug: fixed antenna A\n");
        } else if (strncmp(buf, "fixed-b", 7) == 0) {
                ath5k_hw_set_antenna_mode(ah, AR5K_ANTMODE_FIXED_B);
-               printk(KERN_INFO "ath5k debug: fixed antenna B\n");
+               pr_info("debug: fixed antenna B\n");
        } else if (strncmp(buf, "clear", 5) == 0) {
                for (i = 0; i < ARRAY_SIZE(ah->stats.antenna_rx); i++) {
                        ah->stats.antenna_rx[i] = 0;
                        ah->stats.antenna_tx[i] = 0;
                }
-               printk(KERN_INFO "ath5k debug: cleared antenna stats\n");
+               pr_info("debug: cleared antenna stats\n");
        }
        return count;
 }
@@ -639,7 +642,7 @@ static ssize_t write_file_frameerrors(struct file *file,
                st->txerr_fifo = 0;
                st->txerr_filt = 0;
                st->tx_all_count = 0;
-               printk(KERN_INFO "ath5k debug: cleared frameerrors stats\n");
+               pr_info("debug: cleared frameerrors stats\n");
        }
        return count;
 }
index f8bfa3ac2af0c558d0cb5c7c1c602714816b78cd..77a60777909f6b228e8126aecba73b6a99a9f68a 100644 (file)
@@ -21,6 +21,8 @@
  Hardware Descriptor Functions
 \******************************/
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include "ath5k.h"
 #include "reg.h"
 #include "debug.h"
index 5cc9aa814697eef6720c0df2fc63c6463651856b..ce86f158423bdc3861dc4547242eb37fc8210930 100644 (file)
@@ -29,6 +29,8 @@
  * status registers (ISR).
  */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include "ath5k.h"
 #include "reg.h"
 #include "debug.h"
index cd708c15b77470a53b325e8856a003fc67ad1eaf..4026c906cc7b45745e3a80dbc5edc9360413f78f 100644 (file)
@@ -21,6 +21,8 @@
 * EEPROM access functions and helpers *
 \*************************************/
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/slab.h>
 
 #include "ath5k.h"
index a1ea78e05b479c09dc47e948e79152eb17669770..ee1c2fa8b59190e6739f1eb3774be53f04d1273a 100644 (file)
@@ -19,6 +19,8 @@
  *
  */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include "ath5k.h"
 #include "reg.h"
 #include "debug.h"
@@ -1574,8 +1576,7 @@ ath5k_hw_write_initvals(struct ath5k_hw *ah, u8 mode, bool skip_pcu)
 
                /* AR5K_MODE_11B */
                if (mode > 2) {
-                       ATH5K_ERR(ah,
-                               "unsupported channel mode: %d\n", mode);
+                       ATH5K_ERR(ah, "unsupported channel mode: %d\n", mode);
                        return -EINVAL;
                }
 
index c1151c72371105aaf19a520334cd2cca854fe45c..b9f708a45f4ed97bb65a47a7f11dcf0da2b09872 100644 (file)
@@ -39,6 +39,8 @@
  *
  */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/pci.h>
 #include "ath5k.h"
 
index 5c5329955414966247d5f44dcb8d7760e2d474f1..22b80af0f47ce89c72165c2c0c679fbd23cfeecf 100644 (file)
@@ -41,6 +41,8 @@
  *
  */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <net/mac80211.h>
 #include <asm/unaligned.h>
 
index 849fa060ebc4626d710aa09694676d3a3ae11e8f..53424e8e6d8275892345e96dde7577864e962f9e 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/nl80211.h>
 #include <linux/pci.h>
 #include <linux/pci-aspm.h>
@@ -347,7 +349,7 @@ init_ath5k_pci(void)
 
        ret = pci_register_driver(&ath5k_pci_driver);
        if (ret) {
-               printk(KERN_ERR "ath5k_pci: can't register pci driver\n");
+               pr_err("pci: can't register pci driver\n");
                return ret;
        }
 
index 3a2845489a1b67cb7df9c4750785a690639d9bdd..8b71a2d947e0c9348c1e1b402b4d6092e4d0b587 100644 (file)
@@ -22,6 +22,8 @@
 * PHY related functions *
 \***********************/
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/delay.h>
 #include <linux/slab.h>
 #include <asm/unaligned.h>
index 30b50f934172d59aca3f183c4004a715fbdf9052..a6de200538c322f11b30b2063dcebc3ff8c7ba33 100644 (file)
@@ -20,6 +20,8 @@
 Queue Control Unit, DCF Control Unit Functions
 \********************************************/
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include "ath5k.h"
 #include "reg.h"
 #include "debug.h"
index 200f165c0c6d9c4a508ece1da7a2fd996b9df094..0c2dd4771c365b798b7eb7b26eba79ddb4554c79 100644 (file)
@@ -23,6 +23,8 @@
   Reset function and helpers
 \****************************/
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <asm/unaligned.h>
 
 #include <linux/pci.h>         /* To determine if a card is pci-e */
index 9364da7bd131dd32d2b6f79715bdff5abf457fab..04cf0ca726108629784e67d1bf4901f357f4c6dd 100644 (file)
@@ -1,3 +1,5 @@
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/device.h>
 #include <linux/pci.h>
 
index 00d38952b5fb1d9d2f7aef30ae4b7fa87b5d4f03..bdcc68fb1e37b98a2f1edb14e0eba789491c4863 100644 (file)
@@ -15,6 +15,8 @@
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/moduleparam.h>
 #include <linux/inetdevice.h>
 #include <linux/export.h>
index 03cae142f17827b10694af4d582aeae9d7271507..eb7cc2f5b96f14f428f2f3590cf17abe92abdb79 100644 (file)
@@ -16,6 +16,8 @@
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/moduleparam.h>
 #include <linux/errno.h>
 #include <linux/export.h>
index 229e1922ebe436f6b7c154d0277d538101777838..07071fce8a0e0196391ad06d6d4d7e18ae47da57 100644 (file)
@@ -15,6 +15,8 @@
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include "core.h"
 #include "hif-ops.h"
 #include "cfg80211.h"
index f85353fd17928b90698bdcc1a25ca1f3f1233b51..521f0be990f1db589faca36aa2e7d98af963e668 100644 (file)
@@ -15,6 +15,8 @@
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include "core.h"
 #include "debug.h"
 
index de5ee15ee639f7964509c679580cadb2b3d95417..a2e939a280aab591504ac421d24ff9f296008f13 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 "htc.h"
 
 MODULE_AUTHOR("Atheros Communications");
@@ -966,9 +968,7 @@ int ath9k_htc_resume(struct htc_target *htc_handle)
 static int __init ath9k_htc_init(void)
 {
        if (ath9k_hif_usb_init() < 0) {
-               printk(KERN_ERR
-                       "ath9k_htc: No USB devices found,"
-                       " driver not installed.\n");
+               pr_err("No USB devices found, driver not installed\n");
                return -ENODEV;
        }
 
@@ -979,6 +979,6 @@ module_init(ath9k_htc_init);
 static void __exit ath9k_htc_exit(void)
 {
        ath9k_hif_usb_exit();
-       printk(KERN_INFO "ath9k_htc: Driver unloaded\n");
+       pr_info("Driver unloaded\n");
 }
 module_exit(ath9k_htc_exit);
index c25226a32ddc44c5410e515f932b39ce14fcc08e..4a9570dfba72605d2f492ddf51cde8e8e7db835b 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 "htc.h"
 
 static int htc_issue_send(struct htc_target *target, struct sk_buff* skb,
@@ -461,7 +463,7 @@ int ath9k_htc_hw_init(struct htc_target *target,
                      char *product, u32 drv_info)
 {
        if (ath9k_htc_probe_device(target, dev, devid, product, drv_info)) {
-               printk(KERN_ERR "Failed to initialize the device\n");
+               pr_err("Failed to initialize the device\n");
                return -ENODEV;
        }
 
index b8f3423fdbf939f8f9a11386d09d322963350a50..fc8156eb6eba6c454953fa196e952f61e64ad031 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/dma-mapping.h>
 #include <linux/slab.h>
 #include <linux/ath9k_platform.h>
@@ -867,17 +869,14 @@ static int __init ath9k_init(void)
        /* Register rate control algorithm */
        error = ath_rate_control_register();
        if (error != 0) {
-               printk(KERN_ERR
-                       "ath9k: Unable to register rate control "
-                       "algorithm: %d\n",
-                       error);
+               pr_err("Unable to register rate control algorithm: %d\n",
+                      error);
                goto err_out;
        }
 
        error = ath_pci_init();
        if (error < 0) {
-               printk(KERN_ERR
-                       "ath9k: No PCI devices found, driver not installed.\n");
+               pr_err("No PCI devices found, driver not installed\n");
                error = -ENODEV;
                goto err_rate_unregister;
        }
@@ -906,6 +905,6 @@ static void __exit ath9k_exit(void)
        ath_ahb_exit();
        ath_pci_exit();
        ath_rate_control_unregister();
-       printk(KERN_INFO "%s: Driver unloaded\n", dev_info);
+       pr_info("%s: Driver unloaded\n", dev_info);
 }
 module_exit(ath9k_exit);
index 77dc327def8dec509f50bfe4f490f1a29351f905..a856b51255f4aa0bc233c5af1176e667438324d8 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/nl80211.h>
 #include <linux/pci.h>
 #include <linux/pci-aspm.h>
@@ -171,14 +173,13 @@ static int ath_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 
        ret =  pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
        if (ret) {
-               printk(KERN_ERR "ath9k: 32-bit DMA not available\n");
+               pr_err("32-bit DMA not available\n");
                goto err_dma;
        }
 
        ret = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
        if (ret) {
-               printk(KERN_ERR "ath9k: 32-bit DMA consistent "
-                       "DMA enable failed\n");
+               pr_err("32-bit DMA consistent DMA enable failed\n");
                goto err_dma;
        }
 
@@ -224,7 +225,7 @@ static int ath_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 
        mem = pci_iomap(pdev, 0, 0);
        if (!mem) {
-               printk(KERN_ERR "PCI memory map error\n") ;
+               pr_err("PCI memory map error\n") ;
                ret = -EIO;
                goto err_iomap;
        }
index ea2c737138d3af4041ccceb1f3f8780d20af1519..8e99540cd90e59fdbbf38d48e6f618ad898ec4e0 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/kernel.h>
 #include <linux/module.h>
 
@@ -49,7 +51,7 @@ struct sk_buff *ath_rxbuf_alloc(struct ath_common *common,
                if (off != 0)
                        skb_reserve(skb, common->cachelsz - off);
        } else {
-               printk(KERN_ERR "skbuff alloc of size %u failed\n", len);
+               pr_err("skbuff alloc of size %u failed\n", len);
                return NULL;
        }
 
index 10dea37431b320ec31016203bb8a3bb47bf40070..d81698015bf75897ae9d58fcf80e4ef6359e4be9 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/kernel.h>
 #include <linux/export.h>
 #include <net/cfg80211.h>
@@ -562,7 +564,7 @@ static int __ath_regd_init(struct ath_regulatory *reg)
        printk(KERN_DEBUG "ath: EEPROM regdomain: 0x%0x\n", reg->current_rd);
 
        if (!ath_regd_is_eeprom_valid(reg)) {
-               printk(KERN_ERR "ath: Invalid EEPROM contents\n");
+               pr_err("Invalid EEPROM contents\n");
                return -EINVAL;
        }