]> err.no Git - linux-2.6/blobdiff - net/irda/irlap_event.c
Merge git://oss.sgi.com:8090/xfs/xfs-2.6
[linux-2.6] / net / irda / irlap_event.c
index 1cd89f5f3b759320f6472fb06d83800e871be82f..7b6433fe1dc23d4bacbff6eed1efd7937d201583 100644 (file)
@@ -25,7 +25,6 @@
  *
  ********************************************************************/
 
-#include <linux/config.h>
 #include <linux/string.h>
 #include <linux/kernel.h>
 #include <linux/delay.h>
@@ -191,7 +190,7 @@ static void irlap_start_poll_timer(struct irlap_cb *self, int timeout)
         * Send out the RR frames faster if our own transmit queue is empty, or
         * if the peer is busy. The effect is a much faster conversation
         */
-       if ((skb_queue_len(&self->txq) == 0) || (self->remote_busy)) {
+       if (skb_queue_empty(&self->txq) || self->remote_busy) {
                if (self->fast_RR == TRUE) {
                        /*
                         *  Assert that the fast poll timer has not reached the
@@ -263,7 +262,7 @@ void irlap_do_event(struct irlap_cb *self, IRLAP_EVENT event,
                IRDA_DEBUG(2, "%s() : queue len = %d\n", __FUNCTION__,
                           skb_queue_len(&self->txq));
 
-               if (skb_queue_len(&self->txq)) {
+               if (!skb_queue_empty(&self->txq)) {
                        /* Prevent race conditions with irlap_data_request() */
                        self->local_busy = TRUE;
 
@@ -828,7 +827,7 @@ static int irlap_state_conn(struct irlap_cb *self, IRLAP_EVENT event,
                irlap_disconnect_indication(self, LAP_DISC_INDICATION);
                break;
        default:
-               IRDA_DEBUG(1, "%s(), Unknown event %d, %s\n", __FUNCTION__, 
+               IRDA_DEBUG(1, "%s(), Unknown event %d, %s\n", __FUNCTION__,
                           event, irlap_event[event]);
 
                ret = -1;
@@ -865,7 +864,7 @@ static int irlap_state_setup(struct irlap_cb *self, IRLAP_EVENT event,
  *  between 15 msecs and 45 msecs.
  */
                        irlap_start_backoff_timer(self, msecs_to_jiffies(20 +
-                                                       (jiffies % 30)));
+                                                       (jiffies % 30)));
                } else {
                        /* Always switch state before calling upper layers */
                        irlap_next_state(self, LAP_NDM);
@@ -1074,7 +1073,7 @@ static int irlap_state_xmit_p(struct irlap_cb *self, IRLAP_EVENT event,
 #else  /* CONFIG_IRDA_DYNAMIC_WINDOW */
                        /* Window has been adjusted for the max packet
                         * size, so much simpler... - Jean II */
-                       nextfit = (skb_queue_len(&self->txq) > 0);
+                       nextfit = !skb_queue_empty(&self->txq);
 #endif /* CONFIG_IRDA_DYNAMIC_WINDOW */
                        /*
                         *  Send data with poll bit cleared only if window > 1
@@ -1378,7 +1377,7 @@ static int irlap_state_nrm_p(struct irlap_cb *self, IRLAP_EVENT event,
                                /* Resend rejected frames */
                                irlap_resend_rejected_frames(self, CMD_FRAME);
 
-                               /* Give peer some time to retransmit! 
+                               /* Give peer some time to retransmit!
                                 * But account for our own Tx. */
                                irlap_start_final_timer(self, 2 * self->final_timeout);
 
@@ -1814,7 +1813,7 @@ static int irlap_state_xmit_s(struct irlap_cb *self, IRLAP_EVENT event,
 #else  /* CONFIG_IRDA_DYNAMIC_WINDOW */
                        /* Window has been adjusted for the max packet
                         * size, so much simpler... - Jean II */
-                       nextfit = (skb_queue_len(&self->txq) > 0);
+                       nextfit = !skb_queue_empty(&self->txq);
 #endif /* CONFIG_IRDA_DYNAMIC_WINDOW */
                        /*
                         *  Send data with final bit cleared only if window > 1
@@ -1937,7 +1936,7 @@ static int irlap_state_nrm_s(struct irlap_cb *self, IRLAP_EVENT event,
                                irlap_data_indication(self, skb, FALSE);
 
                                /* Any pending data requests?  */
-                               if ((skb_queue_len(&self->txq) > 0) &&
+                               if (!skb_queue_empty(&self->txq) &&
                                    (self->window > 0))
                                {
                                        self->ack_required = TRUE;
@@ -2038,7 +2037,7 @@ static int irlap_state_nrm_s(struct irlap_cb *self, IRLAP_EVENT event,
                        /*
                         *  Any pending data requests?
                         */
-                       if ((skb_queue_len(&self->txq) > 0) &&
+                       if (!skb_queue_empty(&self->txq) &&
                            (self->window > 0) && !self->remote_busy)
                        {
                                irlap_data_indication(self, skb, TRUE);
@@ -2069,7 +2068,7 @@ static int irlap_state_nrm_s(struct irlap_cb *self, IRLAP_EVENT event,
                 */
                nr_status = irlap_validate_nr_received(self, info->nr);
                if (nr_status == NR_EXPECTED) {
-                       if ((skb_queue_len( &self->txq) > 0) &&
+                       if (!skb_queue_empty(&self->txq) &&
                            (self->window > 0)) {
                                self->remote_busy = FALSE;