diff options
author | Joe Perches <joe@perches.com> | 2011-11-29 14:37:32 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-11-30 15:08:36 -0500 |
commit | ed1e0ad8816389ceefa2d94a9a3d3520088e410f (patch) | |
tree | bb15b4ed37d9e43f8ac1501f9fac26a808a36c22 /net/nfc/nci | |
parent | acda130b0e615596c63640f05febb02d2e681dde (diff) |
nfc: Use standard logging styles
Using the normal logging styles is preferred over
subsystem specific styles when the subsystem does
not take a specific struct.
Convert nfc_<level> specific messages to pr_<level>
Add newlines to uses.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/nfc/nci')
-rw-r--r-- | net/nfc/nci/core.c | 28 | ||||
-rw-r--r-- | net/nfc/nci/data.c | 8 | ||||
-rw-r--r-- | net/nfc/nci/ntf.c | 16 | ||||
-rw-r--r-- | net/nfc/nci/rsp.c | 4 |
4 files changed, 32 insertions, 24 deletions
diff --git a/net/nfc/nci/core.c b/net/nfc/nci/core.c index fe5ca89abfce..30032b2c685c 100644 --- a/net/nfc/nci/core.c +++ b/net/nfc/nci/core.c | |||
@@ -25,6 +25,8 @@ | |||
25 | * | 25 | * |
26 | */ | 26 | */ |
27 | 27 | ||
28 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
29 | |||
28 | #include <linux/types.h> | 30 | #include <linux/types.h> |
29 | #include <linux/workqueue.h> | 31 | #include <linux/workqueue.h> |
30 | #include <linux/completion.h> | 32 | #include <linux/completion.h> |
@@ -96,8 +98,8 @@ static int __nci_request(struct nci_dev *ndev, | |||
96 | break; | 98 | break; |
97 | } | 99 | } |
98 | } else { | 100 | } else { |
99 | nfc_err("wait_for_completion_interruptible_timeout failed %ld", | 101 | pr_err("wait_for_completion_interruptible_timeout failed %ld\n", |
100 | completion_rc); | 102 | completion_rc); |
101 | 103 | ||
102 | rc = ((completion_rc == 0) ? (-ETIMEDOUT) : (completion_rc)); | 104 | rc = ((completion_rc == 0) ? (-ETIMEDOUT) : (completion_rc)); |
103 | } | 105 | } |
@@ -355,12 +357,12 @@ static int nci_start_poll(struct nfc_dev *nfc_dev, __u32 protocols) | |||
355 | nfc_dbg("entry"); | 357 | nfc_dbg("entry"); |
356 | 358 | ||
357 | if (test_bit(NCI_DISCOVERY, &ndev->flags)) { | 359 | if (test_bit(NCI_DISCOVERY, &ndev->flags)) { |
358 | nfc_err("unable to start poll, since poll is already active"); | 360 | pr_err("unable to start poll, since poll is already active\n"); |
359 | return -EBUSY; | 361 | return -EBUSY; |
360 | } | 362 | } |
361 | 363 | ||
362 | if (ndev->target_active_prot) { | 364 | if (ndev->target_active_prot) { |
363 | nfc_err("there is an active target"); | 365 | pr_err("there is an active target\n"); |
364 | return -EBUSY; | 366 | return -EBUSY; |
365 | } | 367 | } |
366 | 368 | ||
@@ -389,7 +391,7 @@ static void nci_stop_poll(struct nfc_dev *nfc_dev) | |||
389 | nfc_dbg("entry"); | 391 | nfc_dbg("entry"); |
390 | 392 | ||
391 | if (!test_bit(NCI_DISCOVERY, &ndev->flags)) { | 393 | if (!test_bit(NCI_DISCOVERY, &ndev->flags)) { |
392 | nfc_err("unable to stop poll, since poll is not active"); | 394 | pr_err("unable to stop poll, since poll is not active\n"); |
393 | return; | 395 | return; |
394 | } | 396 | } |
395 | 397 | ||
@@ -405,18 +407,18 @@ static int nci_activate_target(struct nfc_dev *nfc_dev, __u32 target_idx, | |||
405 | nfc_dbg("entry, target_idx %d, protocol 0x%x", target_idx, protocol); | 407 | nfc_dbg("entry, target_idx %d, protocol 0x%x", target_idx, protocol); |
406 | 408 | ||
407 | if (!test_bit(NCI_POLL_ACTIVE, &ndev->flags)) { | 409 | if (!test_bit(NCI_POLL_ACTIVE, &ndev->flags)) { |
408 | nfc_err("there is no available target to activate"); | 410 | pr_err("there is no available target to activate\n"); |
409 | return -EINVAL; | 411 | return -EINVAL; |
410 | } | 412 | } |
411 | 413 | ||
412 | if (ndev->target_active_prot) { | 414 | if (ndev->target_active_prot) { |
413 | nfc_err("there is already an active target"); | 415 | pr_err("there is already an active target\n"); |
414 | return -EBUSY; | 416 | return -EBUSY; |
415 | } | 417 | } |
416 | 418 | ||
417 | if (!(ndev->target_available_prots & (1 << protocol))) { | 419 | if (!(ndev->target_available_prots & (1 << protocol))) { |
418 | nfc_err("target does not support the requested protocol 0x%x", | 420 | pr_err("target does not support the requested protocol 0x%x\n", |
419 | protocol); | 421 | protocol); |
420 | return -EINVAL; | 422 | return -EINVAL; |
421 | } | 423 | } |
422 | 424 | ||
@@ -433,7 +435,7 @@ static void nci_deactivate_target(struct nfc_dev *nfc_dev, __u32 target_idx) | |||
433 | nfc_dbg("entry, target_idx %d", target_idx); | 435 | nfc_dbg("entry, target_idx %d", target_idx); |
434 | 436 | ||
435 | if (!ndev->target_active_prot) { | 437 | if (!ndev->target_active_prot) { |
436 | nfc_err("unable to deactivate target, no active target"); | 438 | pr_err("unable to deactivate target, no active target\n"); |
437 | return; | 439 | return; |
438 | } | 440 | } |
439 | 441 | ||
@@ -456,7 +458,7 @@ static int nci_data_exchange(struct nfc_dev *nfc_dev, __u32 target_idx, | |||
456 | nfc_dbg("entry, target_idx %d, len %d", target_idx, skb->len); | 458 | nfc_dbg("entry, target_idx %d, len %d", target_idx, skb->len); |
457 | 459 | ||
458 | if (!ndev->target_active_prot) { | 460 | if (!ndev->target_active_prot) { |
459 | nfc_err("unable to exchange data, no active target"); | 461 | pr_err("unable to exchange data, no active target\n"); |
460 | return -EINVAL; | 462 | return -EINVAL; |
461 | } | 463 | } |
462 | 464 | ||
@@ -685,7 +687,7 @@ int nci_send_cmd(struct nci_dev *ndev, __u16 opcode, __u8 plen, void *payload) | |||
685 | 687 | ||
686 | skb = nci_skb_alloc(ndev, (NCI_CTRL_HDR_SIZE + plen), GFP_KERNEL); | 688 | skb = nci_skb_alloc(ndev, (NCI_CTRL_HDR_SIZE + plen), GFP_KERNEL); |
687 | if (!skb) { | 689 | if (!skb) { |
688 | nfc_err("no memory for command"); | 690 | pr_err("no memory for command\n"); |
689 | return -ENOMEM; | 691 | return -ENOMEM; |
690 | } | 692 | } |
691 | 693 | ||
@@ -760,7 +762,7 @@ static void nci_rx_work(struct work_struct *work) | |||
760 | break; | 762 | break; |
761 | 763 | ||
762 | default: | 764 | default: |
763 | nfc_err("unknown MT 0x%x", nci_mt(skb->data)); | 765 | pr_err("unknown MT 0x%x\n", nci_mt(skb->data)); |
764 | kfree_skb(skb); | 766 | kfree_skb(skb); |
765 | break; | 767 | break; |
766 | } | 768 | } |
diff --git a/net/nfc/nci/data.c b/net/nfc/nci/data.c index 511fb96e21bc..7d8a1251c76b 100644 --- a/net/nfc/nci/data.c +++ b/net/nfc/nci/data.c | |||
@@ -21,6 +21,8 @@ | |||
21 | * | 21 | * |
22 | */ | 22 | */ |
23 | 23 | ||
24 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
25 | |||
24 | #include <linux/types.h> | 26 | #include <linux/types.h> |
25 | #include <linux/interrupt.h> | 27 | #include <linux/interrupt.h> |
26 | #include <linux/wait.h> | 28 | #include <linux/wait.h> |
@@ -49,7 +51,7 @@ void nci_data_exchange_complete(struct nci_dev *ndev, | |||
49 | /* forward skb to nfc core */ | 51 | /* forward skb to nfc core */ |
50 | cb(cb_context, skb, err); | 52 | cb(cb_context, skb, err); |
51 | } else if (skb) { | 53 | } else if (skb) { |
52 | nfc_err("no rx callback, dropping rx data..."); | 54 | pr_err("no rx callback, dropping rx data...\n"); |
53 | 55 | ||
54 | /* no waiting callback, free skb */ | 56 | /* no waiting callback, free skb */ |
55 | kfree_skb(skb); | 57 | kfree_skb(skb); |
@@ -161,7 +163,7 @@ int nci_send_data(struct nci_dev *ndev, __u8 conn_id, struct sk_buff *skb) | |||
161 | /* fragment packet and queue the fragments */ | 163 | /* fragment packet and queue the fragments */ |
162 | rc = nci_queue_tx_data_frags(ndev, conn_id, skb); | 164 | rc = nci_queue_tx_data_frags(ndev, conn_id, skb); |
163 | if (rc) { | 165 | if (rc) { |
164 | nfc_err("failed to fragment tx data packet"); | 166 | pr_err("failed to fragment tx data packet\n"); |
165 | goto free_exit; | 167 | goto free_exit; |
166 | } | 168 | } |
167 | } | 169 | } |
@@ -191,7 +193,7 @@ static void nci_add_rx_data_frag(struct nci_dev *ndev, | |||
191 | 193 | ||
192 | /* first, make enough room for the already accumulated data */ | 194 | /* first, make enough room for the already accumulated data */ |
193 | if (skb_cow_head(skb, reassembly_len)) { | 195 | if (skb_cow_head(skb, reassembly_len)) { |
194 | nfc_err("error adding room for accumulated rx data"); | 196 | pr_err("error adding room for accumulated rx data\n"); |
195 | 197 | ||
196 | kfree_skb(skb); | 198 | kfree_skb(skb); |
197 | skb = 0; | 199 | skb = 0; |
diff --git a/net/nfc/nci/ntf.c b/net/nfc/nci/ntf.c index c1bf54172c25..c7043507fc68 100644 --- a/net/nfc/nci/ntf.c +++ b/net/nfc/nci/ntf.c | |||
@@ -25,6 +25,8 @@ | |||
25 | * | 25 | * |
26 | */ | 26 | */ |
27 | 27 | ||
28 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
29 | |||
28 | #include <linux/types.h> | 30 | #include <linux/types.h> |
29 | #include <linux/interrupt.h> | 31 | #include <linux/interrupt.h> |
30 | #include <linux/bitops.h> | 32 | #include <linux/bitops.h> |
@@ -114,8 +116,8 @@ static int nci_extract_activation_params_iso_dep(struct nci_dev *ndev, | |||
114 | break; | 116 | break; |
115 | 117 | ||
116 | default: | 118 | default: |
117 | nfc_err("unsupported activation_rf_tech_and_mode 0x%x", | 119 | pr_err("unsupported activation_rf_tech_and_mode 0x%x\n", |
118 | ntf->activation_rf_tech_and_mode); | 120 | ntf->activation_rf_tech_and_mode); |
119 | return -EPROTO; | 121 | return -EPROTO; |
120 | } | 122 | } |
121 | 123 | ||
@@ -182,8 +184,8 @@ static void nci_rf_intf_activated_ntf_packet(struct nci_dev *ndev, | |||
182 | break; | 184 | break; |
183 | 185 | ||
184 | default: | 186 | default: |
185 | nfc_err("unsupported activation_rf_tech_and_mode 0x%x", | 187 | pr_err("unsupported activation_rf_tech_and_mode 0x%x\n", |
186 | ntf.activation_rf_tech_and_mode); | 188 | ntf.activation_rf_tech_and_mode); |
187 | return; | 189 | return; |
188 | } | 190 | } |
189 | } | 191 | } |
@@ -214,8 +216,8 @@ static void nci_rf_intf_activated_ntf_packet(struct nci_dev *ndev, | |||
214 | break; | 216 | break; |
215 | 217 | ||
216 | default: | 218 | default: |
217 | nfc_err("unsupported rf_interface_type 0x%x", | 219 | pr_err("unsupported rf_interface_type 0x%x\n", |
218 | ntf.rf_interface_type); | 220 | ntf.rf_interface_type); |
219 | return; | 221 | return; |
220 | } | 222 | } |
221 | } | 223 | } |
@@ -278,7 +280,7 @@ void nci_ntf_packet(struct nci_dev *ndev, struct sk_buff *skb) | |||
278 | break; | 280 | break; |
279 | 281 | ||
280 | default: | 282 | default: |
281 | nfc_err("unknown ntf opcode 0x%x", ntf_opcode); | 283 | pr_err("unknown ntf opcode 0x%x\n", ntf_opcode); |
282 | break; | 284 | break; |
283 | } | 285 | } |
284 | 286 | ||
diff --git a/net/nfc/nci/rsp.c b/net/nfc/nci/rsp.c index 0591f5aff89f..6f51a28876ba 100644 --- a/net/nfc/nci/rsp.c +++ b/net/nfc/nci/rsp.c | |||
@@ -25,6 +25,8 @@ | |||
25 | * | 25 | * |
26 | */ | 26 | */ |
27 | 27 | ||
28 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
29 | |||
28 | #include <linux/types.h> | 30 | #include <linux/types.h> |
29 | #include <linux/interrupt.h> | 31 | #include <linux/interrupt.h> |
30 | #include <linux/bitops.h> | 32 | #include <linux/bitops.h> |
@@ -200,7 +202,7 @@ void nci_rsp_packet(struct nci_dev *ndev, struct sk_buff *skb) | |||
200 | break; | 202 | break; |
201 | 203 | ||
202 | default: | 204 | default: |
203 | nfc_err("unknown rsp opcode 0x%x", rsp_opcode); | 205 | pr_err("unknown rsp opcode 0x%x\n", rsp_opcode); |
204 | break; | 206 | break; |
205 | } | 207 | } |
206 | 208 | ||