Re: [PATCH] net/irda: fixed style issues in irttp

2013-07-19 Thread David Miller
From: Dragos Foianu 
Date: Wed, 17 Jul 2013 12:25:38 +0100

> Applied error fixes suggested by checpatch.pl
> 
> Signed-off-by: Dragos Foianu 

Applied.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] net/irda: fixed style issues in irttp

2013-07-19 Thread David Miller
From: Dragos Foianu dragos.foi...@gmail.com
Date: Wed, 17 Jul 2013 12:25:38 +0100

 Applied error fixes suggested by checpatch.pl
 
 Signed-off-by: Dragos Foianu dragos.foi...@gmail.com

Applied.
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] net/irda: fixed style issues in irttp

2013-07-17 Thread Dragos Foianu
Applied error fixes suggested by checpatch.pl

Signed-off-by: Dragos Foianu 
---
 net/irda/irttp.c |   50 +++---
 1 file changed, 23 insertions(+), 27 deletions(-)

diff --git a/net/irda/irttp.c b/net/irda/irttp.c
index ae43c62..85372cf 100644
--- a/net/irda/irttp.c
+++ b/net/irda/irttp.c
@@ -75,7 +75,7 @@ static pi_minor_info_t pi_minor_call_table[] = {
{ NULL, 0 }, /* 0x00 */
{ irttp_param_max_sdu_size, PV_INTEGER | PV_BIG_ENDIAN } /* 0x01 */
 };
-static pi_major_info_t pi_major_call_table[] = {{ pi_minor_call_table, 2 }};
+static pi_major_info_t pi_major_call_table[] = { { pi_minor_call_table, 2 } };
 static pi_param_info_t param_info = { pi_major_call_table, 1, 0x0f, 4 };
 
 / GLOBAL PROCEDURES /
@@ -205,7 +205,7 @@ static void irttp_todo_expired(unsigned long data)
  */
 static void irttp_flush_queues(struct tsap_cb *self)
 {
-   struct sk_buff* skb;
+   struct sk_buff *skb;
 
IRDA_DEBUG(4, "%s()\n", __func__);
 
@@ -400,7 +400,7 @@ struct tsap_cb *irttp_open_tsap(__u8 stsap_sel, int credit, 
notify_t *notify)
/* The IrLMP spec (IrLMP 1.1 p10) says that we have the right to
 * use only 0x01-0x6F. Of course, we can use LSAP_ANY as well.
 * JeanII */
-   if((stsap_sel != LSAP_ANY) &&
+   if ((stsap_sel != LSAP_ANY) &&
   ((stsap_sel < 0x01) || (stsap_sel >= 0x70))) {
IRDA_DEBUG(0, "%s(), invalid tsap!\n", __func__);
return NULL;
@@ -427,7 +427,7 @@ struct tsap_cb *irttp_open_tsap(__u8 stsap_sel, int credit, 
notify_t *notify)
ttp_notify.data_indication = irttp_data_indication;
ttp_notify.udata_indication = irttp_udata_indication;
ttp_notify.flow_indication = irttp_flow_indication;
-   if(notify->status_indication != NULL)
+   if (notify->status_indication != NULL)
ttp_notify.status_indication = irttp_status_indication;
ttp_notify.instance = self;
strncpy(ttp_notify.name, notify->name, NOTIFY_MAX_NAME);
@@ -639,8 +639,7 @@ int irttp_data_request(struct tsap_cb *self, struct sk_buff 
*skb)
 */
if ((self->tx_max_sdu_size != 0) &&
(self->tx_max_sdu_size != TTP_SAR_UNBOUND) &&
-   (skb->len > self->tx_max_sdu_size))
-   {
+   (skb->len > self->tx_max_sdu_size)) {
IRDA_ERROR("%s: SAR enabled, but data is larger than 
TxMaxSduSize!\n",
   __func__);
ret = -EMSGSIZE;
@@ -733,8 +732,7 @@ static void irttp_run_tx_queue(struct tsap_cb *self)
 * poll us through irttp_flow_indication() - Jean II */
while ((self->send_credit > 0) &&
   (!irlmp_lap_tx_queue_full(self->lsap)) &&
-  (skb = skb_dequeue(>tx_queue)))
-   {
+  (skb = skb_dequeue(>tx_queue))) {
/*
 *  Since we can transmit and receive frames concurrently,
 *  the code below is a critical region and we must assure that
@@ -798,8 +796,7 @@ static void irttp_run_tx_queue(struct tsap_cb *self)
 * where we can spend a bit of time doing stuff. - Jean II */
if ((self->tx_sdu_busy) &&
(skb_queue_len(>tx_queue) < TTP_TX_LOW_THRESHOLD) &&
-   (!self->close_pend))
-   {
+   (!self->close_pend)) {
if (self->notify.flow_indication)
self->notify.flow_indication(self->notify.instance,
 self, FLOW_START);
@@ -892,7 +889,7 @@ static int irttp_udata_indication(void *instance, void *sap,
/* Just pass data to layer above */
if (self->notify.udata_indication) {
err = self->notify.udata_indication(self->notify.instance,
-   self,skb);
+   self, skb);
/* Same comment as in irttp_do_data_indication() */
if (!err)
return 0;
@@ -1057,7 +1054,7 @@ static void irttp_flow_indication(void *instance, void 
*sap, LOCAL_FLOW flow)
 * to do that. Jean II */
 
/* If we need to send disconnect. try to do it now */
-   if(self->disconnect_pend)
+   if (self->disconnect_pend)
irttp_start_todo_timer(self, 0);
 }
 
@@ -1116,7 +1113,7 @@ int irttp_connect_request(struct tsap_cb *self, __u8 
dtsap_sel,
IRDA_ASSERT(self->magic == TTP_TSAP_MAGIC, return -EBADR;);
 
if (self->connected) {
-   if(userdata)
+   if (userdata)
dev_kfree_skb(userdata);
return -EISCONN;
}
@@ -1137,7 +1134,7 @@ int irttp_connect_request(struct tsap_cb *self, __u8 
dtsap_sel,
 *  headers
 */
IRDA_ASSERT(skb_headroom(userdata) >= 

[PATCH] net/irda: fixed style issues in irttp

2013-07-17 Thread Dragos Foianu
Applied error fixes suggested by checpatch.pl

Signed-off-by: Dragos Foianu dragos.foi...@gmail.com
---
 net/irda/irttp.c |   50 +++---
 1 file changed, 23 insertions(+), 27 deletions(-)

diff --git a/net/irda/irttp.c b/net/irda/irttp.c
index ae43c62..85372cf 100644
--- a/net/irda/irttp.c
+++ b/net/irda/irttp.c
@@ -75,7 +75,7 @@ static pi_minor_info_t pi_minor_call_table[] = {
{ NULL, 0 }, /* 0x00 */
{ irttp_param_max_sdu_size, PV_INTEGER | PV_BIG_ENDIAN } /* 0x01 */
 };
-static pi_major_info_t pi_major_call_table[] = {{ pi_minor_call_table, 2 }};
+static pi_major_info_t pi_major_call_table[] = { { pi_minor_call_table, 2 } };
 static pi_param_info_t param_info = { pi_major_call_table, 1, 0x0f, 4 };
 
 / GLOBAL PROCEDURES /
@@ -205,7 +205,7 @@ static void irttp_todo_expired(unsigned long data)
  */
 static void irttp_flush_queues(struct tsap_cb *self)
 {
-   struct sk_buff* skb;
+   struct sk_buff *skb;
 
IRDA_DEBUG(4, %s()\n, __func__);
 
@@ -400,7 +400,7 @@ struct tsap_cb *irttp_open_tsap(__u8 stsap_sel, int credit, 
notify_t *notify)
/* The IrLMP spec (IrLMP 1.1 p10) says that we have the right to
 * use only 0x01-0x6F. Of course, we can use LSAP_ANY as well.
 * JeanII */
-   if((stsap_sel != LSAP_ANY) 
+   if ((stsap_sel != LSAP_ANY) 
   ((stsap_sel  0x01) || (stsap_sel = 0x70))) {
IRDA_DEBUG(0, %s(), invalid tsap!\n, __func__);
return NULL;
@@ -427,7 +427,7 @@ struct tsap_cb *irttp_open_tsap(__u8 stsap_sel, int credit, 
notify_t *notify)
ttp_notify.data_indication = irttp_data_indication;
ttp_notify.udata_indication = irttp_udata_indication;
ttp_notify.flow_indication = irttp_flow_indication;
-   if(notify-status_indication != NULL)
+   if (notify-status_indication != NULL)
ttp_notify.status_indication = irttp_status_indication;
ttp_notify.instance = self;
strncpy(ttp_notify.name, notify-name, NOTIFY_MAX_NAME);
@@ -639,8 +639,7 @@ int irttp_data_request(struct tsap_cb *self, struct sk_buff 
*skb)
 */
if ((self-tx_max_sdu_size != 0) 
(self-tx_max_sdu_size != TTP_SAR_UNBOUND) 
-   (skb-len  self-tx_max_sdu_size))
-   {
+   (skb-len  self-tx_max_sdu_size)) {
IRDA_ERROR(%s: SAR enabled, but data is larger than 
TxMaxSduSize!\n,
   __func__);
ret = -EMSGSIZE;
@@ -733,8 +732,7 @@ static void irttp_run_tx_queue(struct tsap_cb *self)
 * poll us through irttp_flow_indication() - Jean II */
while ((self-send_credit  0) 
   (!irlmp_lap_tx_queue_full(self-lsap)) 
-  (skb = skb_dequeue(self-tx_queue)))
-   {
+  (skb = skb_dequeue(self-tx_queue))) {
/*
 *  Since we can transmit and receive frames concurrently,
 *  the code below is a critical region and we must assure that
@@ -798,8 +796,7 @@ static void irttp_run_tx_queue(struct tsap_cb *self)
 * where we can spend a bit of time doing stuff. - Jean II */
if ((self-tx_sdu_busy) 
(skb_queue_len(self-tx_queue)  TTP_TX_LOW_THRESHOLD) 
-   (!self-close_pend))
-   {
+   (!self-close_pend)) {
if (self-notify.flow_indication)
self-notify.flow_indication(self-notify.instance,
 self, FLOW_START);
@@ -892,7 +889,7 @@ static int irttp_udata_indication(void *instance, void *sap,
/* Just pass data to layer above */
if (self-notify.udata_indication) {
err = self-notify.udata_indication(self-notify.instance,
-   self,skb);
+   self, skb);
/* Same comment as in irttp_do_data_indication() */
if (!err)
return 0;
@@ -1057,7 +1054,7 @@ static void irttp_flow_indication(void *instance, void 
*sap, LOCAL_FLOW flow)
 * to do that. Jean II */
 
/* If we need to send disconnect. try to do it now */
-   if(self-disconnect_pend)
+   if (self-disconnect_pend)
irttp_start_todo_timer(self, 0);
 }
 
@@ -1116,7 +1113,7 @@ int irttp_connect_request(struct tsap_cb *self, __u8 
dtsap_sel,
IRDA_ASSERT(self-magic == TTP_TSAP_MAGIC, return -EBADR;);
 
if (self-connected) {
-   if(userdata)
+   if (userdata)
dev_kfree_skb(userdata);
return -EISCONN;
}
@@ -1137,7 +1134,7 @@ int irttp_connect_request(struct tsap_cb *self, __u8 
dtsap_sel,
 *  headers
 */
IRDA_ASSERT(skb_headroom(userdata) = TTP_MAX_HEADER,
-