* [PATCH] hostap: proc: substitute loops by %*phN
@ 2014-09-05 14:30 Andy Shevchenko
2014-09-11 19:27 ` John W. Linville
0 siblings, 1 reply; 4+ messages in thread
From: Andy Shevchenko @ 2014-09-05 14:30 UTC (permalink / raw)
To: Jouni Malinen, linux-wireless; +Cc: Andy Shevchenko
For dumping small buffers we may use %*phN specifier instead of custom
approach..
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/net/wireless/hostap/hostap_proc.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/net/wireless/hostap/hostap_proc.c b/drivers/net/wireless/hostap/hostap_proc.c
index 16a06b6..4e2a7dd9 100644
--- a/drivers/net/wireless/hostap/hostap_proc.c
+++ b/drivers/net/wireless/hostap/hostap_proc.c
@@ -184,11 +184,9 @@ static int prism2_bss_list_proc_show(struct seq_file *m, void *v)
seq_printf(m, "%*pE", bss->ssid_len, bss->ssid);
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;
}
--
2.1.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] hostap: proc: substitute loops by %*phN
2014-09-05 14:30 [PATCH] hostap: proc: substitute loops by %*phN Andy Shevchenko
@ 2014-09-11 19:27 ` John W. Linville
2014-09-12 7:24 ` Andy Shevchenko
0 siblings, 1 reply; 4+ messages in thread
From: John W. Linville @ 2014-09-11 19:27 UTC (permalink / raw)
To: Andy Shevchenko, g; +Cc: Jouni Malinen, linux-wireless
Applying: hostap: proc: substitute loops by %*phN
error: patch failed: drivers/net/wireless/hostap/hostap_proc.c:184
error: drivers/net/wireless/hostap/hostap_proc.c: patch does not apply
On Fri, Sep 05, 2014 at 05:30:16PM +0300, Andy Shevchenko wrote:
> For dumping small buffers we may use %*phN specifier instead of custom
> approach..
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
> drivers/net/wireless/hostap/hostap_proc.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/net/wireless/hostap/hostap_proc.c b/drivers/net/wireless/hostap/hostap_proc.c
> index 16a06b6..4e2a7dd9 100644
> --- a/drivers/net/wireless/hostap/hostap_proc.c
> +++ b/drivers/net/wireless/hostap/hostap_proc.c
> @@ -184,11 +184,9 @@ static int prism2_bss_list_proc_show(struct seq_file *m, void *v)
> seq_printf(m, "%*pE", bss->ssid_len, bss->ssid);
>
> 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;
> }
> --
> 2.1.0
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
--
John W. Linville Someday the world will need a hero, and you
linville@tuxdriver.com might be all we have. Be ready.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] hostap: proc: substitute loops by %*phN
2014-09-11 19:27 ` John W. Linville
@ 2014-09-12 7:24 ` Andy Shevchenko
2014-09-15 19:02 ` John W. Linville
0 siblings, 1 reply; 4+ messages in thread
From: Andy Shevchenko @ 2014-09-12 7:24 UTC (permalink / raw)
To: John W. Linville; +Cc: g, Jouni Malinen, linux-wireless
On Thu, 2014-09-11 at 15:27 -0400, John W. Linville wrote:
> Applying: hostap: proc: substitute loops by %*phN
> error: patch failed: drivers/net/wireless/hostap/hostap_proc.c:184
> error: drivers/net/wireless/hostap/hostap_proc.c: patch does not apply
Hmm... Originally it was applied on top of linux-next (few days ago).
Just checking with current origin/master. Applied correctly.
Moreover, took recent wireless-next. No issues.
Which tree you are trying?
>
> On Fri, Sep 05, 2014 at 05:30:16PM +0300, Andy Shevchenko wrote:
> > For dumping small buffers we may use %*phN specifier instead of custom
> > approach..
> >
> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> > ---
> > drivers/net/wireless/hostap/hostap_proc.c | 6 ++----
> > 1 file changed, 2 insertions(+), 4 deletions(-)
> >
> > diff --git a/drivers/net/wireless/hostap/hostap_proc.c b/drivers/net/wireless/hostap/hostap_proc.c
> > index 16a06b6..4e2a7dd9 100644
> > --- a/drivers/net/wireless/hostap/hostap_proc.c
> > +++ b/drivers/net/wireless/hostap/hostap_proc.c
> > @@ -184,11 +184,9 @@ static int prism2_bss_list_proc_show(struct seq_file *m, void *v)
> > seq_printf(m, "%*pE", bss->ssid_len, bss->ssid);
> >
> > 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;
> > }
> > --
> > 2.1.0
> >
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at http://vger.kernel.org/majordomo-info.html
> >
>
--
Andy Shevchenko <andriy.shevchenko@intel.com>
Intel Finland Oy
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] hostap: proc: substitute loops by %*phN
2014-09-12 7:24 ` Andy Shevchenko
@ 2014-09-15 19:02 ` John W. Linville
0 siblings, 0 replies; 4+ messages in thread
From: John W. Linville @ 2014-09-15 19:02 UTC (permalink / raw)
To: Andy Shevchenko; +Cc: g, Jouni Malinen, linux-wireless
On Fri, Sep 12, 2014 at 10:24:10AM +0300, Andy Shevchenko wrote:
> On Thu, 2014-09-11 at 15:27 -0400, John W. Linville wrote:
> > Applying: hostap: proc: substitute loops by %*phN
> > error: patch failed: drivers/net/wireless/hostap/hostap_proc.c:184
> > error: drivers/net/wireless/hostap/hostap_proc.c: patch does not apply
>
> Hmm... Originally it was applied on top of linux-next (few days ago).
>
> Just checking with current origin/master. Applied correctly.
>
> Moreover, took recent wireless-next. No issues.
> Which tree you are trying?
It only to wireless-next with some fuzz. I think I have it sorted now.
John
--
John W. Linville Someday the world will need a hero, and you
linville@tuxdriver.com might be all we have. Be ready.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-09-15 19:15 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-05 14:30 [PATCH] hostap: proc: substitute loops by %*phN Andy Shevchenko
2014-09-11 19:27 ` John W. Linville
2014-09-12 7:24 ` Andy Shevchenko
2014-09-15 19:02 ` John W. Linville
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).