diff options
| author | Alexander Aring <alex.aring@gmail.com> | 2013-12-12 14:15:25 -0500 |
|---|---|---|
| committer | Marcel Holtmann <marcel@holtmann.org> | 2013-12-12 15:14:54 -0500 |
| commit | 841a5ec72c028432f716670c4a7c2e1b70ee1341 (patch) | |
| tree | 7f5c061987928ff287c1c55b3ffe596c4c670f98 /net/bluetooth | |
| parent | 30d3db44bb337321b25344eea3ed6a64ee16fcc8 (diff) | |
6lowpan: fix/move/cleanup debug functions
There are several issues on current debug behaviour.
This patch fix the following issues:
- Fix debug printout only if DEBUG is defined.
- Move debug functions of 6LoWPAN code into 6lowpan header.
- Cleanup codestyle of debug functions.
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/bluetooth')
| -rw-r--r-- | net/bluetooth/6lowpan.c | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/net/bluetooth/6lowpan.c b/net/bluetooth/6lowpan.c index 5ad8b483efa3..37239db31182 100644 --- a/net/bluetooth/6lowpan.c +++ b/net/bluetooth/6lowpan.c | |||
| @@ -167,33 +167,6 @@ static struct lowpan_dev *lookup_dev(struct l2cap_conn *conn) | |||
| 167 | return dev; | 167 | return dev; |
| 168 | } | 168 | } |
| 169 | 169 | ||
| 170 | /* print data in line */ | ||
| 171 | static inline void raw_dump_inline(const char *caller, char *msg, | ||
| 172 | unsigned char *buf, int len) | ||
| 173 | { | ||
| 174 | if (msg) | ||
| 175 | pr_debug("%s():%s: ", caller, msg); | ||
| 176 | |||
| 177 | print_hex_dump_debug("", DUMP_PREFIX_NONE, | ||
| 178 | 16, 1, buf, len, false); | ||
| 179 | } | ||
| 180 | |||
| 181 | /* print data in a table format: | ||
| 182 | * | ||
| 183 | * addr: xx xx xx xx xx xx | ||
| 184 | * addr: xx xx xx xx xx xx | ||
| 185 | * ... | ||
| 186 | */ | ||
| 187 | static inline void raw_dump_table(const char *caller, char *msg, | ||
| 188 | unsigned char *buf, int len) | ||
| 189 | { | ||
| 190 | if (msg) | ||
| 191 | pr_debug("%s():%s:\n", caller, msg); | ||
| 192 | |||
| 193 | print_hex_dump_debug("\t", DUMP_PREFIX_OFFSET, | ||
| 194 | 16, 1, buf, len, false); | ||
| 195 | } | ||
| 196 | |||
| 197 | static int give_skb_to_upper(struct sk_buff *skb, struct net_device *dev) | 170 | static int give_skb_to_upper(struct sk_buff *skb, struct net_device *dev) |
| 198 | { | 171 | { |
| 199 | struct sk_buff *skb_cp; | 172 | struct sk_buff *skb_cp; |
