* [bug report] spi: mxic: patch for octal DTR mode support
@ 2021-08-11 8:00 Dan Carpenter
2021-08-11 8:47 ` zhengxunli
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2021-08-11 8:00 UTC (permalink / raw)
To: zhengxunli; +Cc: linux-spi
Hello Zhengxun Li,
The patch d05aaa66ba3c: "spi: mxic: patch for octal DTR mode support"
from Aug 4, 2021, leads to the following
Smatch static checker warning:
drivers/spi/spi-mxic.c:403 mxic_spi_mem_exec_op()
warn: curly braces intended?
drivers/spi/spi-mxic.c
390 if (op->addr.nbytes)
391 ss_ctrl |= OP_ADDR_BYTES(op->addr.nbytes) |
392 OP_ADDR_BUSW(fls(op->addr.buswidth) - 1) |
393 (op->addr.dtr ? OP_ADDR_DDR : 0);
394
395 if (op->dummy.nbytes)
396 ss_ctrl |= OP_DUMMY_CYC(op->dummy.nbytes);
397
398 if (op->data.nbytes) {
399 ss_ctrl |= OP_DATA_BUSW(fls(op->data.buswidth) - 1) |
400 (op->data.dtr ? OP_DATA_DDR : 0);
401 if (op->data.dir == SPI_MEM_DATA_IN)
402 ss_ctrl |= OP_READ;
--> 403 if (op->data.dtr)
404 ss_ctrl |= OP_DQS_EN;
Probably you recieved or are about to recieve a bunc of static checker
warnings about curly braces or indenting here. It's hard to know what
was intended.
405 }
406
407 writel(ss_ctrl, mxic->regs + SS_CTRL(mem->spi->chip_select));
408
regards,
dan carpenter
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [bug report] spi: mxic: patch for octal DTR mode support
2021-08-11 8:00 [bug report] spi: mxic: patch for octal DTR mode support Dan Carpenter
@ 2021-08-11 8:47 ` zhengxunli
0 siblings, 0 replies; 2+ messages in thread
From: zhengxunli @ 2021-08-11 8:47 UTC (permalink / raw)
To: Dan Carpenter; +Cc: linux-spi
Hi Dan,
Thanks for your reply.
The "spi: mxic: add missing braces" fixed this issue.
"Dan Carpenter" <dan.carpenter@oracle.com> wrote on 2021/08/11 下午
04:00:11:
> "Dan Carpenter" <dan.carpenter@oracle.com>
> 2021/08/11 下午 04:00
>
> To
>
> zhengxunli@mxic.com.tw,
>
> cc
>
> linux-spi@vger.kernel.org
>
> Subject
>
> [bug report] spi: mxic: patch for octal DTR mode support
>
> Hello Zhengxun Li,
>
> The patch d05aaa66ba3c: "spi: mxic: patch for octal DTR mode support"
> from Aug 4, 2021, leads to the following
> Smatch static checker warning:
>
> drivers/spi/spi-mxic.c:403 mxic_spi_mem_exec_op()
> warn: curly braces intended?
>
> drivers/spi/spi-mxic.c
> 390 if (op->addr.nbytes)
> 391 ss_ctrl |= OP_ADDR_BYTES(op->addr.nbytes) |
> 392 OP_ADDR_BUSW(fls(op->addr.buswidth) - 1) |
> 393 (op->addr.dtr ? OP_ADDR_DDR : 0);
> 394
> 395 if (op->dummy.nbytes)
> 396 ss_ctrl |= OP_DUMMY_CYC(op->dummy.nbytes);
> 397
> 398 if (op->data.nbytes) {
> 399 ss_ctrl |= OP_DATA_BUSW(fls(op->data.buswidth) - 1) |
> 400 (op->data.dtr ? OP_DATA_DDR : 0);
> 401 if (op->data.dir == SPI_MEM_DATA_IN)
> 402 ss_ctrl |= OP_READ;
> --> 403 if (op->data.dtr)
> 404 ss_ctrl |= OP_DQS_EN;
>
> Probably you recieved or are about to recieve a bunc of static checker
> warnings about curly braces or indenting here. It's hard to know what
> was intended.
>
> 405 }
> 406
> 407 writel(ss_ctrl, mxic->regs + SS_CTRL(mem->spi->chip_select));
> 408
>
> regards,
> dan carpenter
Thanks,
Zhengxun
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] 2+ messages in thread
end of thread, other threads:[~2021-08-11 8:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-11 8:00 [bug report] spi: mxic: patch for octal DTR mode support Dan Carpenter
2021-08-11 8:47 ` zhengxunli
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.