Skip to content

Commit

Permalink
rtl8xxxu: tuse %*ph to dump buffers
Browse files Browse the repository at this point in the history
Use %*ph specifier to dump small buffers in hex format instead of doing this
byte-by-byte.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
  • Loading branch information
Andy Shevchenko authored and Kalle Valo committed Jun 29, 2016
1 parent 08eca32 commit 2b9c9f5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 21 deletions.
9 changes: 2 additions & 7 deletions drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192c.c
Original file line number Diff line number Diff line change
Expand Up @@ -413,13 +413,8 @@ static int rtl8192cu_parse_efuse(struct rtl8xxxu_priv *priv)
dev_info(&priv->udev->dev,
"%s: dumping efuse (0x%02zx bytes):\n",
__func__, sizeof(struct rtl8192cu_efuse));
for (i = 0; i < sizeof(struct rtl8192cu_efuse); i += 8) {
dev_info(&priv->udev->dev, "%02x: "
"%02x %02x %02x %02x %02x %02x %02x %02x\n", i,
raw[i], raw[i + 1], raw[i + 2],
raw[i + 3], raw[i + 4], raw[i + 5],
raw[i + 6], raw[i + 7]);
}
for (i = 0; i < sizeof(struct rtl8192cu_efuse); i += 8)
dev_info(&priv->udev->dev, "%02x: %8ph\n", i, &raw[i]);
}
return 0;
}
Expand Down
9 changes: 2 additions & 7 deletions drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192e.c
Original file line number Diff line number Diff line change
Expand Up @@ -622,13 +622,8 @@ static int rtl8192eu_parse_efuse(struct rtl8xxxu_priv *priv)
dev_info(&priv->udev->dev,
"%s: dumping efuse (0x%02zx bytes):\n",
__func__, sizeof(struct rtl8192eu_efuse));
for (i = 0; i < sizeof(struct rtl8192eu_efuse); i += 8) {
dev_info(&priv->udev->dev, "%02x: "
"%02x %02x %02x %02x %02x %02x %02x %02x\n", i,
raw[i], raw[i + 1], raw[i + 2],
raw[i + 3], raw[i + 4], raw[i + 5],
raw[i + 6], raw[i + 7]);
}
for (i = 0; i < sizeof(struct rtl8192eu_efuse); i += 8)
dev_info(&priv->udev->dev, "%02x: %8ph\n", i, &raw[i]);
}
return 0;
}
Expand Down
9 changes: 2 additions & 7 deletions drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8723b.c
Original file line number Diff line number Diff line change
Expand Up @@ -466,13 +466,8 @@ static int rtl8723bu_parse_efuse(struct rtl8xxxu_priv *priv)
dev_info(&priv->udev->dev,
"%s: dumping efuse (0x%02zx bytes):\n",
__func__, sizeof(struct rtl8723bu_efuse));
for (i = 0; i < sizeof(struct rtl8723bu_efuse); i += 8) {
dev_info(&priv->udev->dev, "%02x: "
"%02x %02x %02x %02x %02x %02x %02x %02x\n", i,
raw[i], raw[i + 1], raw[i + 2],
raw[i + 3], raw[i + 4], raw[i + 5],
raw[i + 6], raw[i + 7]);
}
for (i = 0; i < sizeof(struct rtl8723bu_efuse); i += 8)
dev_info(&priv->udev->dev, "%02x: %8ph\n", i, &raw[i]);
}

return 0;
Expand Down

0 comments on commit 2b9c9f5

Please sign in to comment.