]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
iwlwifi: mvm: fix sar profile printing issue
authorJanie Tu <janiex.tu@intel.com>
Wed, 9 Dec 2020 21:16:08 +0000 (23:16 +0200)
committerLuca Coelho <luciano.coelho@intel.com>
Wed, 9 Dec 2020 22:11:17 +0000 (00:11 +0200)
The profile shows an invalid value because the wrong format was used.
A u8 value should use by %hhu, not %hhd.  Fix thisit by changing it to
%hhu.

Signed-off-by: Janie Tu <janiex.tu@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/iwlwifi.20201209231352.a595be52af22.I1843c3c4f9fb32fa8d439052bd0a5ad230f292e2@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c

index 3395c46759883ff89ea8595f6bf372fa92876147..b33d82e025b6782cfa13f6986236fa240d24e938 100644 (file)
@@ -381,10 +381,10 @@ static ssize_t iwl_dbgfs_sar_geo_profile_read(struct file *file,
                pos += scnprintf(buf + pos, bufsz - pos,
                                 "Use geographic profile %d\n", tbl_idx);
                pos += scnprintf(buf + pos, bufsz - pos,
-                                "2.4GHz:\n\tChain A offset: %hhd dBm\n\tChain B offset: %hhd dBm\n\tmax tx power: %hhd dBm\n",
+                                "2.4GHz:\n\tChain A offset: %hhu dBm\n\tChain B offset: %hhu dBm\n\tmax tx power: %hhu dBm\n",
                                 value[1], value[2], value[0]);
                pos += scnprintf(buf + pos, bufsz - pos,
-                                "5.2GHz:\n\tChain A offset: %hhd dBm\n\tChain B offset: %hhd dBm\n\tmax tx power: %hhd dBm\n",
+                                "5.2GHz:\n\tChain A offset: %hhu dBm\n\tChain B offset: %hhu dBm\n\tmax tx power: %hhu dBm\n",
                                 value[4], value[5], value[3]);
        }
        mutex_unlock(&mvm->mutex);