Commit 3f29c522 authored by Pavel Roskin's avatar Pavel Roskin Committed by John W. Linville

carl9170: fix formatting issues found by checkpatch

Signed-off-by: default avatarPavel Roskin <proski@gnu.org>
Acked-By: default avatarchristian Lamparter <chunkeey@googlemail.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent fcad584d
...@@ -87,7 +87,7 @@ do { \ ...@@ -87,7 +87,7 @@ do { \
__ar->cmd_buf[2 * __nreg + 1] = cpu_to_le32(r); \ __ar->cmd_buf[2 * __nreg + 1] = cpu_to_le32(r); \
__ar->cmd_buf[2 * __nreg + 2] = cpu_to_le32(v); \ __ar->cmd_buf[2 * __nreg + 2] = cpu_to_le32(v); \
__nreg++; \ __nreg++; \
if ((__nreg >= PAYLOAD_MAX/2)) { \ if ((__nreg >= PAYLOAD_MAX / 2)) { \
if (IS_ACCEPTING_CMD(__ar)) \ if (IS_ACCEPTING_CMD(__ar)) \
__err = carl9170_exec_cmd(__ar, \ __err = carl9170_exec_cmd(__ar, \
CARL9170_CMD_WREG, 8 * __nreg, \ CARL9170_CMD_WREG, 8 * __nreg, \
...@@ -160,7 +160,7 @@ do { \ ...@@ -160,7 +160,7 @@ do { \
} while (0) } while (0)
#define carl9170_async_regwrite_finish() do { \ #define carl9170_async_regwrite_finish() do { \
__async_regwrite_out : \ __async_regwrite_out: \
if (__cmd != NULL && __err == 0) \ if (__cmd != NULL && __err == 0) \
carl9170_async_regwrite_flush(); \ carl9170_async_regwrite_flush(); \
kfree(__cmd); \ kfree(__cmd); \
......
...@@ -695,7 +695,7 @@ static char *carl9170_debugfs_bug_read(struct ar9170 *ar, char *buf, ...@@ -695,7 +695,7 @@ static char *carl9170_debugfs_bug_read(struct ar9170 *ar, char *buf,
} }
__DEBUGFS_DECLARE_RW_FILE(bug, 400, CARL9170_STOPPED); __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_INVALID] = "INVALID",
[CARL9170_ERP_AUTO] = "Automatic", [CARL9170_ERP_AUTO] = "Automatic",
[CARL9170_ERP_MAC80211] = "Set by MAC80211", [CARL9170_ERP_MAC80211] = "Set by MAC80211",
......
...@@ -118,7 +118,7 @@ static void carl9170_led_set_brightness(struct led_classdev *led, ...@@ -118,7 +118,7 @@ static void carl9170_led_set_brightness(struct led_classdev *led,
} }
if (likely(IS_ACCEPTING_CMD(ar) && arl->toggled)) 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, static int carl9170_led_register_led(struct ar9170 *ar, int i, char *name,
......
...@@ -1630,7 +1630,7 @@ static int carl9170_read_eeprom(struct ar9170 *ar) ...@@ -1630,7 +1630,7 @@ static int carl9170_read_eeprom(struct ar9170 *ar)
BUILD_BUG_ON(sizeof(ar->eeprom) % RB); BUILD_BUG_ON(sizeof(ar->eeprom) % RB);
#endif #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++) for (j = 0; j < RW; j++)
offsets[j] = cpu_to_le32(AR9170_EEPROM_START + offsets[j] = cpu_to_le32(AR9170_EEPROM_START +
RB * i + 4 * j); RB * i + 4 * j);
......
...@@ -1098,7 +1098,7 @@ static u8 carl9170_interpolate_u8(u8 x, u8 x1, u8 y1, u8 x2, u8 y2) ...@@ -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)? * Isn't it just DIV_ROUND_UP(y, 1<<SHIFT)?
* Can we rely on the compiler to optimise away the div? * 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 #undef SHIFT
} }
...@@ -1379,7 +1379,7 @@ static void carl9170_calc_ctl(struct ar9170 *ar, u32 freq, enum carl9170_bw bw) ...@@ -1379,7 +1379,7 @@ static void carl9170_calc_ctl(struct ar9170 *ar, u32 freq, enum carl9170_bw bw)
modes[i].max_power = modes[i].max_power =
carl9170_get_max_edge_power(ar, 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 * TODO: check if the regulatory max. power is
...@@ -1441,7 +1441,7 @@ static int carl9170_set_power_cal(struct ar9170 *ar, u32 freq, ...@@ -1441,7 +1441,7 @@ static int carl9170_set_power_cal(struct ar9170 *ar, u32 freq,
if (freq < 3000) if (freq < 3000)
f = freq - 2300; f = freq - 2300;
else else
f = (freq - 4800)/5; f = (freq - 4800) / 5;
/* /*
* cycle through the various modes * cycle through the various modes
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment