diff options
author | Andrei Emeltchenko <andrei.emeltchenko@intel.com> | 2012-09-25 05:49:45 -0400 |
---|---|---|
committer | Gustavo Padovan <gustavo.padovan@collabora.co.uk> | 2012-09-27 17:10:30 -0400 |
commit | 7028a8860f07d0efc5fdd7527fec065b818d108b (patch) | |
tree | 4a5c53e3b2580186bf9992b9cd138c5d91400983 /net/bluetooth/af_bluetooth.c | |
parent | fcb73338ed531dcc00cb17ca76fe3e05f774e4e9 (diff) |
Bluetooth: Use %pMR instead of baswap in seq_show
Use new bluetooth address print specifier %pMR for printing
bluetooth addresses instead of dedicated variable and baswap.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Diffstat (limited to 'net/bluetooth/af_bluetooth.c')
-rw-r--r-- | net/bluetooth/af_bluetooth.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/net/bluetooth/af_bluetooth.c b/net/bluetooth/af_bluetooth.c index 9d49ee6d7219..a9ad589f3e72 100644 --- a/net/bluetooth/af_bluetooth.c +++ b/net/bluetooth/af_bluetooth.c | |||
@@ -569,7 +569,6 @@ static int bt_seq_show(struct seq_file *seq, void *v) | |||
569 | { | 569 | { |
570 | struct bt_seq_state *s = seq->private; | 570 | struct bt_seq_state *s = seq->private; |
571 | struct bt_sock_list *l = s->l; | 571 | struct bt_sock_list *l = s->l; |
572 | bdaddr_t src_baswapped, dst_baswapped; | ||
573 | 572 | ||
574 | if (v == SEQ_START_TOKEN) { | 573 | if (v == SEQ_START_TOKEN) { |
575 | seq_puts(seq ,"sk RefCnt Rmem Wmem User Inode Src Dst Parent"); | 574 | seq_puts(seq ,"sk RefCnt Rmem Wmem User Inode Src Dst Parent"); |
@@ -583,18 +582,17 @@ static int bt_seq_show(struct seq_file *seq, void *v) | |||
583 | } else { | 582 | } else { |
584 | struct sock *sk = sk_entry(v); | 583 | struct sock *sk = sk_entry(v); |
585 | struct bt_sock *bt = bt_sk(sk); | 584 | struct bt_sock *bt = bt_sk(sk); |
586 | baswap(&src_baswapped, &bt->src); | ||
587 | baswap(&dst_baswapped, &bt->dst); | ||
588 | 585 | ||
589 | seq_printf(seq, "%pK %-6d %-6u %-6u %-6u %-6lu %pM %pM %-6lu", | 586 | seq_printf(seq, |
587 | "%pK %-6d %-6u %-6u %-6u %-6lu %pMR %pMR %-6lu", | ||
590 | sk, | 588 | sk, |
591 | atomic_read(&sk->sk_refcnt), | 589 | atomic_read(&sk->sk_refcnt), |
592 | sk_rmem_alloc_get(sk), | 590 | sk_rmem_alloc_get(sk), |
593 | sk_wmem_alloc_get(sk), | 591 | sk_wmem_alloc_get(sk), |
594 | sock_i_uid(sk), | 592 | sock_i_uid(sk), |
595 | sock_i_ino(sk), | 593 | sock_i_ino(sk), |
596 | &src_baswapped, | 594 | &bt->src, |
597 | &dst_baswapped, | 595 | &bt->dst, |
598 | bt->parent? sock_i_ino(bt->parent): 0LU); | 596 | bt->parent? sock_i_ino(bt->parent): 0LU); |
599 | 597 | ||
600 | if (l->custom_seq_show) { | 598 | if (l->custom_seq_show) { |