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 568174c71b94af0b830566b6d4bacb33379be1df..d5f95bdc75c1cf1f1e8abafa09f3235b6faef7d4 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 0ac1124c2a0b74b3bcaa09eb7174b4e2b599f4e7..de57f90e1d5f0aadeb87543967a46053cd7d9c78 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 4bb2cbd8bd9b9ccf7975613e021c6f19c18d6d38..78dadc7975586b030e948b21cf62f78fae6b1adc 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 a61cf6781d5e0d3a0f936c04363d70f5d01737f5..0122930b14c71f85ab0f9d779a87030373011ebb 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 da1ab962ee4839cd52bb06c81e8c68a465c4016c..aa147a9120b6e4c7652cf49a9d4c791d2393bb2a 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