diff options
author | Yang Yingliang <yangyingliang@huawei.com> | 2021-08-10 22:24:05 +0800 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2021-08-12 12:19:19 +0100 |
commit | aca196842a9729a198af57c417725c3ac9ca05db (patch) | |
tree | 8b1cb35314368570838d24eb24be5255aaaff92d /drivers/spi/spi-mxic.c | |
parent | 976c1de1de147bb7f4e0d87482f375221c05aeaf (diff) | |
download | lwn-aca196842a9729a198af57c417725c3ac9ca05db.tar.gz lwn-aca196842a9729a198af57c417725c3ac9ca05db.zip |
spi: mxic: add missing braces
Fix the following waring:
drivers/spi/spi-mxic.c: In function ‘mxic_spi_mem_exec_op’:
drivers/spi/spi-mxic.c:401:3: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
if (op->data.dir == SPI_MEM_DATA_IN)
^~
drivers/spi/spi-mxic.c:403:4: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
if (op->data.dtr)
^~
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Reviewed-by: Zhengxun Li <zhengxunli@mxic.com.tw>
Link: https://lore.kernel.org/r/20210810142405.2221540-1-yangyingliang@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi/spi-mxic.c')
-rw-r--r-- | drivers/spi/spi-mxic.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/spi/spi-mxic.c b/drivers/spi/spi-mxic.c index 32e757a04f14..45889947afed 100644 --- a/drivers/spi/spi-mxic.c +++ b/drivers/spi/spi-mxic.c @@ -398,10 +398,11 @@ static int mxic_spi_mem_exec_op(struct spi_mem *mem, if (op->data.nbytes) { ss_ctrl |= OP_DATA_BUSW(fls(op->data.buswidth) - 1) | (op->data.dtr ? OP_DATA_DDR : 0); - if (op->data.dir == SPI_MEM_DATA_IN) + if (op->data.dir == SPI_MEM_DATA_IN) { ss_ctrl |= OP_READ; if (op->data.dtr) ss_ctrl |= OP_DQS_EN; + } } writel(ss_ctrl, mxic->regs + SS_CTRL(mem->spi->chip_select)); |