wifi: ath12k: don't use %pK in dmesg format strings
authorJeff Johnson <quic_jjohnson@quicinc.com>
Tue, 16 Apr 2024 16:41:19 +0000 (09:41 -0700)
committerKalle Valo <quic_kvalo@quicinc.com>
Thu, 18 Apr 2024 15:24:08 +0000 (18:24 +0300)
Currently, when debug logs are enabled, messages such as the following
are found in the kernel log:

event mgmt rx skb         pK-error len 209 ftype 00 stype 50

The "pK-error" comes from using %pK to display an skb address in an
interrupt context.

Per the guidance in the current "printk-formats" documentation, %pK
"is only intended when producing content of a file read by userspace
from e.g. procfs or sysfs, not for dmesg."

So replace %pK with %p in all of the ath12k_dbg() format strings.

Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://msgid.link/20240416-pk-v1-1-2c8852743e6d@quicinc.com
drivers/net/wireless/ath/ath12k/dp_mon.c
drivers/net/wireless/ath/ath12k/dp_rx.c
drivers/net/wireless/ath/ath12k/htc.c
drivers/net/wireless/ath/ath12k/mac.c
drivers/net/wireless/ath/ath12k/pci.c
drivers/net/wireless/ath/ath12k/wmi.c

index 2d56913a75d0f89a7e9fb57d4d99f2fdaad23f49..6b0b72477540767080094e8fdb28a5b7f7d9772c 100644 (file)
@@ -944,7 +944,7 @@ ath12k_dp_mon_rx_merg_msdus(struct ath12k *ar,
                        goto err_merge_fail;
 
                ath12k_dbg(ab, ATH12K_DBG_DATA,
-                          "mpdu_buf %pK mpdu_buf->len %u",
+                          "mpdu_buf %p mpdu_buf->len %u",
                           prev_buf, prev_buf->len);
        } else {
                ath12k_dbg(ab, ATH12K_DBG_DATA,
@@ -958,7 +958,7 @@ ath12k_dp_mon_rx_merg_msdus(struct ath12k *ar,
 err_merge_fail:
        if (mpdu_buf && decap_format != DP_RX_DECAP_TYPE_RAW) {
                ath12k_dbg(ab, ATH12K_DBG_DATA,
-                          "err_merge_fail mpdu_buf %pK", mpdu_buf);
+                          "err_merge_fail mpdu_buf %p", mpdu_buf);
                /* Free the head buffer */
                dev_kfree_skb_any(mpdu_buf);
        }
@@ -1092,7 +1092,7 @@ static void ath12k_dp_mon_rx_deliver_msdu(struct ath12k *ar, struct napi_struct
        spin_unlock_bh(&ar->ab->base_lock);
 
        ath12k_dbg(ar->ab, ATH12K_DBG_DATA,
-                  "rx skb %pK len %u peer %pM %u %s %s%s%s%s%s%s%s%s %srate_idx %u vht_nss %u freq %u band %u flag 0x%x fcs-err %i mic-err %i amsdu-more %i\n",
+                  "rx skb %p len %u peer %pM %u %s %s%s%s%s%s%s%s%s %srate_idx %u vht_nss %u freq %u band %u flag 0x%x fcs-err %i mic-err %i amsdu-more %i\n",
                   msdu,
                   msdu->len,
                   peer ? peer->addr : NULL,
index 977a8acb736cc4df4f805dc772d188090c43d93a..2b89a8d2c08ff0260a77a4a21383bbb792ed0baa 100644 (file)
@@ -2467,7 +2467,7 @@ static void ath12k_dp_rx_deliver_msdu(struct ath12k *ar, struct napi_struct *nap
        spin_unlock_bh(&ab->base_lock);
 
        ath12k_dbg(ab, ATH12K_DBG_DATA,
-                  "rx skb %pK len %u peer %pM %d %s sn %u %s%s%s%s%s%s%s%s%s rate_idx %u vht_nss %u freq %u band %u flag 0x%x fcs-err %i mic-err %i amsdu-more %i\n",
+                  "rx skb %p len %u peer %pM %d %s sn %u %s%s%s%s%s%s%s%s%s rate_idx %u vht_nss %u freq %u band %u flag 0x%x fcs-err %i mic-err %i amsdu-more %i\n",
                   msdu,
                   msdu->len,
                   peer ? peer->addr : NULL,
index 23f7428abd95096ee46807cf310be4d5afeca9f5..2f2230f565bb24434b2febf9502db0f7ce617b1a 100644 (file)
@@ -1,7 +1,7 @@
 // SPDX-License-Identifier: BSD-3-Clause-Clear
 /*
  * Copyright (c) 2018-2021 The Linux Foundation. All rights reserved.
- * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2021-2022, 2024 Qualcomm Innovation Center, Inc. All rights reserved.
  */
 #include <linux/skbuff.h>
 #include <linux/ctype.h>
@@ -358,7 +358,7 @@ void ath12k_htc_rx_completion_handler(struct ath12k_base *ab,
                goto out;
        }
 
-       ath12k_dbg(ab, ATH12K_DBG_HTC, "htc rx completion ep %d skb %pK\n",
+       ath12k_dbg(ab, ATH12K_DBG_HTC, "htc rx completion ep %d skb %p\n",
                   eid, skb);
        ep->ep_ops.ep_rx_complete(ab, skb);
 
index 76f541fc29d4a0253d3a9330557a890ece36d148..cfb8831816166a6b93bd105199eb3ebaacee4b50 100644 (file)
@@ -6630,7 +6630,7 @@ static int ath12k_mac_op_add_chanctx(struct ieee80211_hw *hw,
        ab = ar->ab;
 
        ath12k_dbg(ab, ATH12K_DBG_MAC,
-                  "mac chanctx add freq %u width %d ptr %pK\n",
+                  "mac chanctx add freq %u width %d ptr %p\n",
                   ctx->def.chan->center_freq, ctx->def.width, ctx);
 
        mutex_lock(&ar->conf_mutex);
@@ -6660,7 +6660,7 @@ static void ath12k_mac_op_remove_chanctx(struct ieee80211_hw *hw,
        ab = ar->ab;
 
        ath12k_dbg(ab, ATH12K_DBG_MAC,
-                  "mac chanctx remove freq %u width %d ptr %pK\n",
+                  "mac chanctx remove freq %u width %d ptr %p\n",
                   ctx->def.chan->center_freq, ctx->def.width, ctx);
 
        mutex_lock(&ar->conf_mutex);
@@ -7114,7 +7114,7 @@ static void ath12k_mac_op_change_chanctx(struct ieee80211_hw *hw,
        mutex_lock(&ar->conf_mutex);
 
        ath12k_dbg(ab, ATH12K_DBG_MAC,
-                  "mac chanctx change freq %u width %d ptr %pK changed %x\n",
+                  "mac chanctx change freq %u width %d ptr %p changed %x\n",
                   ctx->def.chan->center_freq, ctx->def.width, ctx, changed);
 
        /* This shouldn't really happen because channel switching should use
@@ -7192,7 +7192,7 @@ ath12k_mac_op_assign_vif_chanctx(struct ieee80211_hw *hw,
        mutex_lock(&ar->conf_mutex);
 
        ath12k_dbg(ab, ATH12K_DBG_MAC,
-                  "mac chanctx assign ptr %pK vdev_id %i\n",
+                  "mac chanctx assign ptr %p vdev_id %i\n",
                   ctx, arvif->vdev_id);
 
        arvif->punct_bitmap = ctx->def.punctured;
@@ -7283,7 +7283,7 @@ ath12k_mac_op_unassign_vif_chanctx(struct ieee80211_hw *hw,
        mutex_lock(&ar->conf_mutex);
 
        ath12k_dbg(ab, ATH12K_DBG_MAC,
-                  "mac chanctx unassign ptr %pK vdev_id %i\n",
+                  "mac chanctx unassign ptr %p vdev_id %i\n",
                   ctx, arvif->vdev_id);
 
        WARN_ON(!arvif->is_started);
index 14954bc05144368feadf85729bcada2ec29692c5..5fa7a3d770ee06cc530e3a914d80668d142d90fb 100644 (file)
@@ -872,7 +872,7 @@ static int ath12k_pci_claim(struct ath12k_pci *ab_pci, struct pci_dev *pdev)
                goto release_region;
        }
 
-       ath12k_dbg(ab, ATH12K_DBG_BOOT, "boot pci_mem 0x%pK\n", ab->mem);
+       ath12k_dbg(ab, ATH12K_DBG_BOOT, "boot pci_mem 0x%p\n", ab->mem);
        return 0;
 
 release_region:
index 276b28f669ab51e1a7868c9bfd5d1cf46c2151ff..ab4f9e07ef0342f1b3e272a77e5147ee77dc1191 100644 (file)
@@ -5934,7 +5934,7 @@ static void ath12k_mgmt_rx_event(struct ath12k_base *ab, struct sk_buff *skb)
         */
 
        ath12k_dbg(ab, ATH12K_DBG_MGMT,
-                  "event mgmt rx skb %pK len %d ftype %02x stype %02x\n",
+                  "event mgmt rx skb %p len %d ftype %02x stype %02x\n",
                   skb, skb->len,
                   fc & IEEE80211_FCTL_FTYPE, fc & IEEE80211_FCTL_STYPE);