LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH -next] spi: mxic: add missing braces
@ 2021-08-10 14:24 Yang Yingliang
  2021-08-11  3:12 ` zhengxunli
  2021-08-13 17:25 ` Mark Brown
  0 siblings, 2 replies; 3+ messages in thread
From: Yang Yingliang @ 2021-08-10 14:24 UTC (permalink / raw)
  To: linux-kernel, linux-spi; +Cc: broonie, zhengxunli

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>
---
 drivers/spi/spi-mxic.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

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));
-- 
2.25.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH -next] spi: mxic: add missing braces
  2021-08-10 14:24 [PATCH -next] spi: mxic: add missing braces Yang Yingliang
@ 2021-08-11  3:12 ` zhengxunli
  2021-08-13 17:25 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: zhengxunli @ 2021-08-11  3:12 UTC (permalink / raw)
  To: Yang Yingliang; +Cc: broonie, linux-kernel, linux-spi

"Yang Yingliang" <yangyingliang@huawei.com> wrote on 2021/08/10 下午 
10:24:05:

> "Yang Yingliang" <yangyingliang@huawei.com> 
> 2021/08/10 下午 10:18
> 
> To
> 
> <linux-kernel@vger.kernel.org>, <linux-spi@vger.kernel.org>, 
> 
> cc
> 
> <broonie@kernel.org>, <zhengxunli@mxic.com.tw>
> 
> Subject
> 
> [PATCH -next] 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>

CONFIDENTIALITY NOTE:

This e-mail and any attachments may contain confidential information 
and/or personal data, which is protected by applicable laws. Please be 
reminded that duplication, disclosure, distribution, or use of this e-mail 
(and/or its attachments) or any part thereof is prohibited. If you receive 
this e-mail in error, please notify us immediately and delete this mail as 
well as its attachment(s) from your system. In addition, please be 
informed that collection, processing, and/or use of personal data is 
prohibited unless expressly permitted by personal data protection laws. 
Thank you for your attention and cooperation.

Macronix International Co., Ltd.

=====================================================================



============================================================================

CONFIDENTIALITY NOTE:

This e-mail and any attachments may contain confidential information and/or personal data, which is protected by applicable laws. Please be reminded that duplication, disclosure, distribution, or use of this e-mail (and/or its attachments) or any part thereof is prohibited. If you receive this e-mail in error, please notify us immediately and delete this mail as well as its attachment(s) from your system. In addition, please be informed that collection, processing, and/or use of personal data is prohibited unless expressly permitted by personal data protection laws. Thank you for your attention and cooperation.

Macronix International Co., Ltd.

=====================================================================

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH -next] spi: mxic: add missing braces
  2021-08-10 14:24 [PATCH -next] spi: mxic: add missing braces Yang Yingliang
  2021-08-11  3:12 ` zhengxunli
@ 2021-08-13 17:25 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2021-08-13 17:25 UTC (permalink / raw)
  To: linux-spi, Yang Yingliang, linux-kernel; +Cc: Mark Brown, zhengxunli

On Tue, 10 Aug 2021 22:24:05 +0800, Yang Yingliang wrote:
> 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)
>     ^~
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next

Thanks!

[1/1] spi: mxic: add missing braces
      commit: aca196842a9729a198af57c417725c3ac9ca05db

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-08-13 17:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-10 14:24 [PATCH -next] spi: mxic: add missing braces Yang Yingliang
2021-08-11  3:12 ` zhengxunli
2021-08-13 17:25 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).