Fix common misspellings
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / net / irda / qos.c
index 349012c926b704aa6ce28a645090ccd1413f3d0f..1b51bcf423945bc036022465e51ebaffed7a10f1 100644 (file)
 #include <net/irda/irlap_frame.h>
 
 /*
- * Maximum values of the baud rate we negociate with the other end.
+ * Maximum values of the baud rate we negotiate with the other end.
  * Most often, you don't have to change that, because Linux-IrDA will
  * use the maximum offered by the link layer, which usually works fine.
  * In some very rare cases, you may want to limit it to lower speeds...
  */
 int sysctl_max_baud_rate = 16000000;
 /*
- * Maximum value of the lap disconnect timer we negociate with the other end.
+ * Maximum value of the lap disconnect timer we negotiate with the other end.
  * Most often, the value below represent the best compromise, but some user
- * may want to keep the LAP alive longuer or shorter in case of link failure.
+ * may want to keep the LAP alive longer or shorter in case of link failure.
  * Remember that the threshold time (early warning) is fixed to 3s...
  */
 int sysctl_max_noreply_time = 12;
@@ -201,7 +201,7 @@ static int msb_index (__u16 word)
         * it's very likely the peer. - Jean II */
        if (word == 0) {
                IRDA_WARNING("%s(), Detected buggy peer, adjust null PV to 0x1!\n",
-                        __FUNCTION__);
+                        __func__);
                /* The only safe choice (we don't know the array size) */
                word = 0x1;
        }
@@ -342,7 +342,7 @@ static void irlap_adjust_qos_settings(struct qos_info *qos)
        __u32 line_capacity;
        int index;
 
-       IRDA_DEBUG(2, "%s()\n", __FUNCTION__);
+       IRDA_DEBUG(2, "%s()\n", __func__);
 
        /*
         * Make sure the mintt is sensible.
@@ -352,7 +352,7 @@ static void irlap_adjust_qos_settings(struct qos_info *qos)
                int i;
 
                IRDA_WARNING("%s(), Detected buggy peer, adjust mtt to %dus!\n",
-                        __FUNCTION__, sysctl_min_tx_turn_time);
+                        __func__, sysctl_min_tx_turn_time);
 
                /* We don't really need bits, but easier this way */
                i = value_highest_bit(sysctl_min_tx_turn_time, min_turn_times,
@@ -370,7 +370,7 @@ static void irlap_adjust_qos_settings(struct qos_info *qos)
        {
                IRDA_DEBUG(0,
                           "%s(), adjusting max turn time from %d to 500 ms\n",
-                          __FUNCTION__, qos->max_turn_time.value);
+                          __func__, qos->max_turn_time.value);
                qos->max_turn_time.value = 500;
        }
 
@@ -386,7 +386,7 @@ static void irlap_adjust_qos_settings(struct qos_info *qos)
        while ((qos->data_size.value > line_capacity) && (index > 0)) {
                qos->data_size.value = data_sizes[index--];
                IRDA_DEBUG(2, "%s(), reducing data size to %d\n",
-                          __FUNCTION__, qos->data_size.value);
+                          __func__, qos->data_size.value);
        }
 #else /* Use method described in section 6.6.11 of IrLAP */
        while (irlap_requested_line_capacity(qos) > line_capacity) {
@@ -396,14 +396,14 @@ static void irlap_adjust_qos_settings(struct qos_info *qos)
                if (qos->window_size.value > 1) {
                        qos->window_size.value--;
                        IRDA_DEBUG(2, "%s(), reducing window size to %d\n",
-                                  __FUNCTION__, qos->window_size.value);
+                                  __func__, qos->window_size.value);
                } else if (index > 1) {
                        qos->data_size.value = data_sizes[index--];
                        IRDA_DEBUG(2, "%s(), reducing data size to %d\n",
-                                  __FUNCTION__, qos->data_size.value);
+                                  __func__, qos->data_size.value);
                } else {
                        IRDA_WARNING("%s(), nothing more we can do!\n",
-                                    __FUNCTION__);
+                                    __func__);
                }
        }
 #endif /* CONFIG_IRDA_DYNAMIC_WINDOW */
@@ -411,7 +411,7 @@ static void irlap_adjust_qos_settings(struct qos_info *qos)
         * Fix tx data size according to user limits - Jean II
         */
        if (qos->data_size.value > sysctl_max_tx_data_size)
-               /* Allow non discrete adjustement to avoid loosing capacity */
+               /* Allow non discrete adjustement to avoid losing capacity */
                qos->data_size.value = sysctl_max_tx_data_size;
        /*
         * Override Tx window if user request it. - Jean II
@@ -469,49 +469,49 @@ int irlap_insert_qos_negotiation_params(struct irlap_cb *self,
        int ret;
 
        /* Insert data rate */
-       ret = irda_param_insert(self, PI_BAUD_RATE, skb->tail,
+       ret = irda_param_insert(self, PI_BAUD_RATE, skb_tail_pointer(skb),
                                skb_tailroom(skb), &irlap_param_info);
        if (ret < 0)
                return ret;
        skb_put(skb, ret);
 
        /* Insert max turnaround time */
-       ret = irda_param_insert(self, PI_MAX_TURN_TIME, skb->tail,
+       ret = irda_param_insert(self, PI_MAX_TURN_TIME, skb_tail_pointer(skb),
                                skb_tailroom(skb), &irlap_param_info);
        if (ret < 0)
                return ret;
        skb_put(skb, ret);
 
        /* Insert data size */
-       ret = irda_param_insert(self, PI_DATA_SIZE, skb->tail,
+       ret = irda_param_insert(self, PI_DATA_SIZE, skb_tail_pointer(skb),
                                skb_tailroom(skb), &irlap_param_info);
        if (ret < 0)
                return ret;
        skb_put(skb, ret);
 
        /* Insert window size */
-       ret = irda_param_insert(self, PI_WINDOW_SIZE, skb->tail,
+       ret = irda_param_insert(self, PI_WINDOW_SIZE, skb_tail_pointer(skb),
                                skb_tailroom(skb), &irlap_param_info);
        if (ret < 0)
                return ret;
        skb_put(skb, ret);
 
        /* Insert additional BOFs */
-       ret = irda_param_insert(self, PI_ADD_BOFS, skb->tail,
+       ret = irda_param_insert(self, PI_ADD_BOFS, skb_tail_pointer(skb),
                                skb_tailroom(skb), &irlap_param_info);
        if (ret < 0)
                return ret;
        skb_put(skb, ret);
 
        /* Insert minimum turnaround time */
-       ret = irda_param_insert(self, PI_MIN_TURN_TIME, skb->tail,
+       ret = irda_param_insert(self, PI_MIN_TURN_TIME, skb_tail_pointer(skb),
                                skb_tailroom(skb), &irlap_param_info);
        if (ret < 0)
                return ret;
        skb_put(skb, ret);
 
        /* Insert link disconnect/threshold time */
-       ret = irda_param_insert(self, PI_LINK_DISC, skb->tail,
+       ret = irda_param_insert(self, PI_LINK_DISC, skb_tail_pointer(skb),
                                skb_tailroom(skb), &irlap_param_info);
        if (ret < 0)
                return ret;
@@ -538,7 +538,7 @@ static int irlap_param_baud_rate(void *instance, irda_param_t *param, int get)
        if (get) {
                param->pv.i = self->qos_rx.baud_rate.bits;
                IRDA_DEBUG(2, "%s(), baud rate = 0x%02x\n",
-                          __FUNCTION__, param->pv.i);
+                          __func__, param->pv.i);
        } else {
                /*
                 *  Stations must agree on baud rate, so calculate
@@ -711,7 +711,7 @@ __u32 irlap_max_line_capacity(__u32 speed, __u32 max_turn_time)
        int i,j;
 
        IRDA_DEBUG(2, "%s(), speed=%d, max_turn_time=%d\n",
-                  __FUNCTION__, speed, max_turn_time);
+                  __func__, speed, max_turn_time);
 
        i = value_index(speed, baud_rates, 10);
        j = value_index(max_turn_time, max_turn_times, 4);
@@ -722,7 +722,7 @@ __u32 irlap_max_line_capacity(__u32 speed, __u32 max_turn_time)
        line_capacity = max_line_capacities[i][j];
 
        IRDA_DEBUG(2, "%s(), line capacity=%d bytes\n",
-                  __FUNCTION__, line_capacity);
+                  __func__, line_capacity);
 
        return line_capacity;
 }
@@ -738,7 +738,7 @@ static __u32 irlap_requested_line_capacity(struct qos_info *qos)
                                             qos->min_turn_time.value);
 
        IRDA_DEBUG(2, "%s(), requested line capacity=%d\n",
-                  __FUNCTION__, line_capacity);
+                  __func__, line_capacity);
 
        return line_capacity;
 }