Commit 12ec07a4 authored by Ajay Singh's avatar Ajay Singh Committed by Greg Kroah-Hartman

staging: wilc1000: fix line over 80 characters in wilc_spi_read_int()

Refactor wilc_spi_read_int() to fix the line over 80 char issues reported
by checkpatch.pl script.
Signed-off-by: default avatarAjay Singh <ajay.kathat@microchip.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c73f5950
...@@ -939,45 +939,46 @@ static int wilc_spi_read_int(struct wilc *wilc, u32 *int_status) ...@@ -939,45 +939,46 @@ static int wilc_spi_read_int(struct wilc *wilc, u32 *int_status)
int happened, j; int happened, j;
u32 unknown_mask; u32 unknown_mask;
u32 irq_flags; u32 irq_flags;
int k = IRG_FLAGS_OFFSET + 5;
if (g_spi.has_thrpt_enh) { if (g_spi.has_thrpt_enh) {
ret = spi_internal_read(wilc, 0xe840 - WILC_SPI_REG_BASE, ret = spi_internal_read(wilc, 0xe840 - WILC_SPI_REG_BASE,
int_status); int_status);
} else { return ret;
ret = wilc_spi_read_reg(wilc, WILC_VMM_TO_HOST_SIZE, }
&byte_cnt); ret = wilc_spi_read_reg(wilc, WILC_VMM_TO_HOST_SIZE, &byte_cnt);
if (!ret) { if (!ret) {
dev_err(&spi->dev, dev_err(&spi->dev,
"Failed read WILC_VMM_TO_HOST_SIZE ...\n"); "Failed read WILC_VMM_TO_HOST_SIZE ...\n");
goto _fail_; goto _fail_;
} }
tmp = (byte_cnt >> 2) & IRQ_DMA_WD_CNT_MASK; tmp = (byte_cnt >> 2) & IRQ_DMA_WD_CNT_MASK;
j = 0; j = 0;
do { do {
happened = 0; happened = 0;
wilc_spi_read_reg(wilc, 0x1a90, &irq_flags); wilc_spi_read_reg(wilc, 0x1a90, &irq_flags);
tmp |= ((irq_flags >> 27) << IRG_FLAGS_OFFSET); tmp |= ((irq_flags >> 27) << IRG_FLAGS_OFFSET);
if (g_spi.nint > 5) { if (g_spi.nint > 5) {
wilc_spi_read_reg(wilc, 0x1a94, wilc_spi_read_reg(wilc, 0x1a94, &irq_flags);
&irq_flags); tmp |= (((irq_flags >> 0) & 0x7) << k);
tmp |= (((irq_flags >> 0) & 0x7) << (IRG_FLAGS_OFFSET + 5)); }
}
unknown_mask = ~((1ul << g_spi.nint) - 1); unknown_mask = ~((1ul << g_spi.nint) - 1);
if ((tmp >> IRG_FLAGS_OFFSET) & unknown_mask) { if ((tmp >> IRG_FLAGS_OFFSET) & unknown_mask) {
dev_err(&spi->dev, "Unexpected interrupt (2): j=%d, tmp=%x, mask=%x\n", j, tmp, unknown_mask); dev_err(&spi->dev,
happened = 1; "Unexpected interrupt(2):j=%d,tmp=%x,mask=%x\n",
} j, tmp, unknown_mask);
happened = 1;
}
j++; j++;
} while (happened); } while (happened);
*int_status = tmp; *int_status = tmp;
}
_fail_: _fail_:
return ret; return ret;
......
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