From: Andy Shevchenko Date: Fri, 5 Sep 2014 14:30:16 +0000 (+0300) Subject: hostap: proc: substitute loops by %*phN X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=62c5afb8e388eae4e54f1ad415c1a1bc745c8b08;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git hostap: proc: substitute loops by %*phN For dumping small buffers we may use %*phN specifier instead of custom approach.. Signed-off-by: Andy Shevchenko Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/hostap/hostap_proc.c b/drivers/net/wireless/hostap/hostap_proc.c index 4e5c0f8c9496..8efd17c52f65 100644 --- a/drivers/net/wireless/hostap/hostap_proc.c +++ b/drivers/net/wireless/hostap/hostap_proc.c @@ -186,11 +186,9 @@ static int prism2_bss_list_proc_show(struct seq_file *m, void *v) bss->ssid[i] : '_'); seq_putc(m, '\t'); - for (i = 0; i < bss->ssid_len; i++) - seq_printf(m, "%02x", bss->ssid[i]); + seq_printf(m, "%*phN", (int)bss->ssid_len, bss->ssid); seq_putc(m, '\t'); - for (i = 0; i < bss->wpa_ie_len; i++) - seq_printf(m, "%02x", bss->wpa_ie[i]); + seq_printf(m, "%*phN", (int)bss->wpa_ie_len, bss->wpa_ie); seq_putc(m, '\n'); return 0; }