aboutsummaryrefslogtreecommitdiffstats
path: root/net/caif
diff options
context:
space:
mode:
authorSjur Braendeland <sjur.braendeland@stericsson.com>2010-09-21 07:44:44 -0400
committerDavid S. Miller <davem@davemloft.net>2010-09-21 21:05:30 -0400
commitb04367df66eb63444d38c43d15f5e39499d85ae6 (patch)
treebeb31309a5ab2000ad07b92ee4c4e22a6cbc2a90 /net/caif
parent9c44c9fa78c5a449699491f0355189e2a09c242a (diff)
caif: Minor fixes in log prints.
Use pr_debug for flow control printouts, and refine an error printout. Signed-off-by: Sjur Braendeland <sjur.brandeland@stericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/caif')
-rw-r--r--net/caif/caif_socket.c8
-rw-r--r--net/caif/cfcnfg.c2
2 files changed, 3 insertions, 7 deletions
diff --git a/net/caif/caif_socket.c b/net/caif/caif_socket.c
index fd1f5df0827c..3943398f70cd 100644
--- a/net/caif/caif_socket.c
+++ b/net/caif/caif_socket.c
@@ -159,9 +159,7 @@ static int caif_queue_rcv_skb(struct sock *sk, struct sk_buff *skb)
159 159
160 if (atomic_read(&sk->sk_rmem_alloc) + skb->truesize >= 160 if (atomic_read(&sk->sk_rmem_alloc) + skb->truesize >=
161 (unsigned)sk->sk_rcvbuf && rx_flow_is_on(cf_sk)) { 161 (unsigned)sk->sk_rcvbuf && rx_flow_is_on(cf_sk)) {
162 trace_printk("CAIF: %s(): " 162 pr_debug("sending flow OFF (queue len = %d %d)\n",
163 "sending flow OFF (queue len = %d %d)\n",
164 __func__,
165 atomic_read(&cf_sk->sk.sk_rmem_alloc), 163 atomic_read(&cf_sk->sk.sk_rmem_alloc),
166 sk_rcvbuf_lowwater(cf_sk)); 164 sk_rcvbuf_lowwater(cf_sk));
167 set_rx_flow_off(cf_sk); 165 set_rx_flow_off(cf_sk);
@@ -174,9 +172,7 @@ static int caif_queue_rcv_skb(struct sock *sk, struct sk_buff *skb)
174 return err; 172 return err;
175 if (!sk_rmem_schedule(sk, skb->truesize) && rx_flow_is_on(cf_sk)) { 173 if (!sk_rmem_schedule(sk, skb->truesize) && rx_flow_is_on(cf_sk)) {
176 set_rx_flow_off(cf_sk); 174 set_rx_flow_off(cf_sk);
177 trace_printk("CAIF: %s(): " 175 pr_debug("sending flow OFF due to rmem_schedule\n");
178 "sending flow OFF due to rmem_schedule\n",
179 __func__);
180 dbfs_atomic_inc(&cnt.num_rx_flow_off); 176 dbfs_atomic_inc(&cnt.num_rx_flow_off);
181 caif_flow_ctrl(sk, CAIF_MODEMCMD_FLOW_OFF_REQ); 177 caif_flow_ctrl(sk, CAIF_MODEMCMD_FLOW_OFF_REQ);
182 } 178 }
diff --git a/net/caif/cfcnfg.c b/net/caif/cfcnfg.c
index ef93a131310b..41adafd18914 100644
--- a/net/caif/cfcnfg.c
+++ b/net/caif/cfcnfg.c
@@ -197,7 +197,7 @@ int cfcnfg_disconn_adapt_layer(struct cfcnfg *cnfg, struct cflayer *adap_layer)
197 caif_assert(adap_layer != NULL); 197 caif_assert(adap_layer != NULL);
198 channel_id = adap_layer->id; 198 channel_id = adap_layer->id;
199 if (adap_layer->dn == NULL || channel_id == 0) { 199 if (adap_layer->dn == NULL || channel_id == 0) {
200 pr_err("adap_layer->id is 0\n"); 200 pr_err("adap_layer->dn == NULL or adap_layer->id is 0\n");
201 ret = -ENOTCONN; 201 ret = -ENOTCONN;
202 goto end; 202 goto end;
203 } 203 }