carl9170: fix formatting issues found by checkpatch
authorPavel Roskin <proski@gnu.org>
Thu, 14 Jul 2011 01:38:18 +0000 (21:38 -0400)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 15 Jul 2011 17:38:34 +0000 (13:38 -0400)
Signed-off-by: Pavel Roskin <proski@gnu.org>
Acked-By: christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/carl9170/cmd.h
drivers/net/wireless/ath/carl9170/debug.c
drivers/net/wireless/ath/carl9170/led.c
drivers/net/wireless/ath/carl9170/main.c
drivers/net/wireless/ath/carl9170/phy.c

index 568174c..d5f95bd 100644 (file)
@@ -87,7 +87,7 @@ do {                                                                  \
        __ar->cmd_buf[2 * __nreg + 1] = cpu_to_le32(r);                 \
        __ar->cmd_buf[2 * __nreg + 2] = cpu_to_le32(v);                 \
        __nreg++;                                                       \
-       if ((__nreg >= PAYLOAD_MAX/2)) {                                \
+       if ((__nreg >= PAYLOAD_MAX / 2)) {                              \
                if (IS_ACCEPTING_CMD(__ar))                             \
                        __err = carl9170_exec_cmd(__ar,                 \
                                CARL9170_CMD_WREG, 8 * __nreg,          \
@@ -160,7 +160,7 @@ do {                                                                        \
 } while (0)
 
 #define carl9170_async_regwrite_finish() do {                          \
-__async_regwrite_out :                                                 \
+__async_regwrite_out                                                 \
        if (__cmd != NULL && __err == 0)                                \
                carl9170_async_regwrite_flush();                        \
        kfree(__cmd);                                                   \
index 0ac1124..de57f90 100644 (file)
@@ -695,7 +695,7 @@ static char *carl9170_debugfs_bug_read(struct ar9170 *ar, char *buf,
 }
 __DEBUGFS_DECLARE_RW_FILE(bug, 400, CARL9170_STOPPED);
 
-static const char *erp_modes[] = {
+static const char *const erp_modes[] = {
        [CARL9170_ERP_INVALID] = "INVALID",
        [CARL9170_ERP_AUTO] = "Automatic",
        [CARL9170_ERP_MAC80211] = "Set by MAC80211",
index 4bb2cbd..78dadc7 100644 (file)
@@ -118,7 +118,7 @@ static void carl9170_led_set_brightness(struct led_classdev *led,
        }
 
        if (likely(IS_ACCEPTING_CMD(ar) && arl->toggled))
-               ieee80211_queue_delayed_work(ar->hw, &ar->led_work, HZ/10);
+               ieee80211_queue_delayed_work(ar->hw, &ar->led_work, HZ / 10);
 }
 
 static int carl9170_led_register_led(struct ar9170 *ar, int i, char *name,
index a61cf67..0122930 100644 (file)
@@ -1630,7 +1630,7 @@ static int carl9170_read_eeprom(struct ar9170 *ar)
        BUILD_BUG_ON(sizeof(ar->eeprom) % RB);
 #endif
 
-       for (i = 0; i < sizeof(ar->eeprom)/RB; i++) {
+       for (i = 0; i < sizeof(ar->eeprom) / RB; i++) {
                for (j = 0; j < RW; j++)
                        offsets[j] = cpu_to_le32(AR9170_EEPROM_START +
                                                 RB * i + 4 * j);
index da1ab96..aa147a9 100644 (file)
@@ -1098,7 +1098,7 @@ static u8 carl9170_interpolate_u8(u8 x, u8 x1, u8 y1, u8 x2, u8 y2)
         *      Isn't it just DIV_ROUND_UP(y, 1<<SHIFT)?
         *      Can we rely on the compiler to optimise away the div?
         */
-       return (y >> SHIFT) + ((y & (1<<(SHIFT-1))) >> (SHIFT - 1));
+       return (y >> SHIFT) + ((y & (1 << (SHIFT - 1))) >> (SHIFT - 1));
 #undef SHIFT
 }
 
@@ -1379,7 +1379,7 @@ static void carl9170_calc_ctl(struct ar9170 *ar, u32 freq, enum carl9170_bw bw)
 
                        modes[i].max_power =
                                carl9170_get_max_edge_power(ar,
-                                       freq+f_off, EDGES(ctl_idx, 1));
+                                       freq + f_off, EDGES(ctl_idx, 1));
 
                        /*
                         * TODO: check if the regulatory max. power is
@@ -1441,7 +1441,7 @@ static int carl9170_set_power_cal(struct ar9170 *ar, u32 freq,
        if (freq < 3000)
                f = freq - 2300;
        else
-               f = (freq - 4800)/5;
+               f = (freq - 4800) / 5;
 
        /*
         * cycle through the various modes