OSDN Git Service

ath11k: remove h from printk format specifier
authorTom Rix <trix@redhat.com>
Thu, 28 Jan 2021 14:49:28 +0000 (06:49 -0800)
committerKalle Valo <kvalo@codeaurora.org>
Thu, 4 Feb 2021 07:39:10 +0000 (09:39 +0200)
This change fixes the checkpatch warning described in this commit
commit cbacb5ab0aa0 ("docs: printk-formats: Stop encouraging use of
  unnecessary %h[xudi] and %hh[xudi]")

Standard integer promotion is already done and %hx and %hhx is useless
so do not encourage the use of %hh[xudi] or %h[xudi].

Signed-off-by: Tom Rix <trix@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20210128144928.2557605-1-trix@redhat.com
drivers/net/wireless/ath/ath11k/dp_rx.c
drivers/net/wireless/ath/ath11k/mac.c
drivers/net/wireless/ath/ath11k/trace.h
drivers/net/wireless/ath/ath11k/wmi.c

index 42328a0..859cfca 100644 (file)
@@ -1292,7 +1292,7 @@ int ath11k_dp_htt_tlv_iter(struct ath11k_base *ab, const void *ptr, size_t len,
                len -= sizeof(*tlv);
 
                if (tlv_len > len) {
-                       ath11k_err(ab, "htt tlv parse failure of tag %hhu at byte %zd (%zu bytes left, %hhu expected)\n",
+                       ath11k_err(ab, "htt tlv parse failure of tag %u at byte %zd (%zu bytes left, %u expected)\n",
                                   tlv_tag, ptr - begin, len, tlv_len);
                        return -EINVAL;
                }
@@ -1381,22 +1381,22 @@ ath11k_update_per_peer_tx_stats(struct ath11k *ar,
         */
 
        if (flags == WMI_RATE_PREAMBLE_HE && mcs > 11) {
-               ath11k_warn(ab, "Invalid HE mcs %hhd peer stats",  mcs);
+               ath11k_warn(ab, "Invalid HE mcs %d peer stats",  mcs);
                return;
        }
 
        if (flags == WMI_RATE_PREAMBLE_HE && mcs > ATH11K_HE_MCS_MAX) {
-               ath11k_warn(ab, "Invalid HE mcs %hhd peer stats",  mcs);
+               ath11k_warn(ab, "Invalid HE mcs %d peer stats",  mcs);
                return;
        }
 
        if (flags == WMI_RATE_PREAMBLE_VHT && mcs > ATH11K_VHT_MCS_MAX) {
-               ath11k_warn(ab, "Invalid VHT mcs %hhd peer stats",  mcs);
+               ath11k_warn(ab, "Invalid VHT mcs %d peer stats",  mcs);
                return;
        }
 
        if (flags == WMI_RATE_PREAMBLE_HT && (mcs > ATH11K_HT_MCS_MAX || nss < 1)) {
-               ath11k_warn(ab, "Invalid HT mcs %hhd nss %hhd peer stats",
+               ath11k_warn(ab, "Invalid HT mcs %d nss %d peer stats",
                            mcs, nss);
                return;
        }
index 8f2c4b2..288720c 100644 (file)
@@ -4849,7 +4849,7 @@ static int ath11k_mac_op_add_chanctx(struct ieee80211_hw *hw,
        struct ath11k_base *ab = ar->ab;
 
        ath11k_dbg(ab, ATH11K_DBG_MAC,
-                  "mac chanctx add freq %hu width %d ptr %pK\n",
+                  "mac chanctx add freq %u width %d ptr %pK\n",
                   ctx->def.chan->center_freq, ctx->def.width, ctx);
 
        mutex_lock(&ar->conf_mutex);
@@ -4873,7 +4873,7 @@ static void ath11k_mac_op_remove_chanctx(struct ieee80211_hw *hw,
        struct ath11k_base *ab = ar->ab;
 
        ath11k_dbg(ab, ATH11K_DBG_MAC,
-                  "mac chanctx remove freq %hu width %d ptr %pK\n",
+                  "mac chanctx remove freq %u width %d ptr %pK\n",
                   ctx->def.chan->center_freq, ctx->def.width, ctx);
 
        mutex_lock(&ar->conf_mutex);
@@ -5117,7 +5117,7 @@ ath11k_mac_update_vif_chan(struct ath11k *ar,
                arvif = (void *)vifs[i].vif->drv_priv;
 
                ath11k_dbg(ab, ATH11K_DBG_MAC,
-                          "mac chanctx switch vdev_id %i freq %hu->%hu width %d->%d\n",
+                          "mac chanctx switch vdev_id %i freq %u->%u width %d->%d\n",
                           arvif->vdev_id,
                           vifs[i].old_ctx->def.chan->center_freq,
                           vifs[i].new_ctx->def.chan->center_freq,
@@ -5214,7 +5214,7 @@ static void ath11k_mac_op_change_chanctx(struct ieee80211_hw *hw,
        mutex_lock(&ar->conf_mutex);
 
        ath11k_dbg(ab, ATH11K_DBG_MAC,
-                  "mac chanctx change freq %hu width %d ptr %pK changed %x\n",
+                  "mac chanctx change freq %u width %d ptr %pK changed %x\n",
                   ctx->def.chan->center_freq, ctx->def.width, ctx, changed);
 
        /* This shouldn't really happen because channel switching should use
@@ -5583,7 +5583,7 @@ static int ath11k_mac_set_fixed_rate_params(struct ath11k_vif *arvif,
 
        lockdep_assert_held(&ar->conf_mutex);
 
-       ath11k_dbg(ar->ab, ATH11K_DBG_MAC, "mac set fixed rate params vdev %i rate 0x%02hhx nss %hhu sgi %hhu\n",
+       ath11k_dbg(ar->ab, ATH11K_DBG_MAC, "mac set fixed rate params vdev %i rate 0x%02x nss %u sgi %u\n",
                   arvif->vdev_id, rate, nss, sgi);
 
        vdev_param = WMI_VDEV_PARAM_FIXED_RATE;
index 66d0aae..d2d2a3c 100644 (file)
@@ -43,7 +43,7 @@ TRACE_EVENT(ath11k_htt_pktlog,
        ),
 
        TP_printk(
-               "%s %s size %hu pktlog_checksum %d",
+               "%s %s size %u pktlog_checksum %d",
                __get_str(driver),
                __get_str(device),
                __entry->buf_len,
index 73869d4..2e6ce28 100644 (file)
@@ -169,7 +169,7 @@ ath11k_wmi_tlv_iter(struct ath11k_base *ab, const void *ptr, size_t len,
                len -= sizeof(*tlv);
 
                if (tlv_len > len) {
-                       ath11k_err(ab, "wmi tlv parse failure of tag %hhu at byte %zd (%zu bytes left, %hhu expected)\n",
+                       ath11k_err(ab, "wmi tlv parse failure of tag %u at byte %zd (%zu bytes left, %u expected)\n",
                                   tlv_tag, ptr - begin, len, tlv_len);
                        return -EINVAL;
                }
@@ -177,7 +177,7 @@ ath11k_wmi_tlv_iter(struct ath11k_base *ab, const void *ptr, size_t len,
                if (tlv_tag < ARRAY_SIZE(wmi_tlv_policies) &&
                    wmi_tlv_policies[tlv_tag].min_len &&
                    wmi_tlv_policies[tlv_tag].min_len > tlv_len) {
-                       ath11k_err(ab, "wmi tlv parse failure of tag %hhu at byte %zd (%hhu bytes is less than min length %zu)\n",
+                       ath11k_err(ab, "wmi tlv parse failure of tag %u at byte %zd (%u bytes is less than min length %zu)\n",
                                   tlv_tag, ptr - begin, tlv_len,
                                   wmi_tlv_policies[tlv_tag].min_len);
                        return -EINVAL;