From: Mark Brown <broonie@kernel.org>
To: Xianwei Zhao <xianwei.zhao@amlogic.com>
Cc: Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Liang Yang <liang.yang@amlogic.com>,
Feng Chen <feng.chen@amlogic.com>,
linux-spi@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-amlogic@lists.infradead.org
Subject: Re: [PATCH v4 2/3] spi: amlogic: add driver for Amlogic SPI Flash Controller
Date: Mon, 8 Sep 2025 17:55:16 +0100 [thread overview]
Message-ID: <e010ff93-574a-45d9-a5dc-0942b3fc90f2@sirena.org.uk> (raw)
In-Reply-To: <20250829-spifc-v4-2-1e57fd39f584@amlogic.com>
[-- Attachment #1.1: Type: text/plain, Size: 3087 bytes --]
On Fri, Aug 29, 2025 at 01:16:14PM +0800, Xianwei Zhao wrote:
> From: Feng Chen <feng.chen@amlogic.com>
>
> This driver provides support for the SPI mode of the Amlogic
> Flash Controller. It supports both SPI NOR flash and SPI NAND
> flash. For SPI NAND, the Host ECC hardware engine can be enabled.
This breaks an x86 allmodconfig build with clang-19 for me:
/build/stage/linux/drivers/spi/spi-amlogic-spifc-a4.c:592:7: error: variable 'is
_datain' is used uninitialized whenever 'if' condition is false [-Werror,-Wsomet
imes-uninitialized]
592 | if (!buf) {
| ^~~~
/build/stage/linux/drivers/spi/spi-amlogic-spifc-a4.c:601:12: note: uninitialize
d use occurs here
601 | is_datain ? sfc->info_buf : NULL,
| ^~~~~~~~~
/build/stage/linux/drivers/spi/spi-amlogic-spifc-a4.c:592:3: note: remove the 'i
f' if its condition is always true
592 | if (!buf) {
| ^~~~~~~~~
/build/stage/linux/drivers/spi/spi-amlogic-spifc-a4.c:590:13: error: variable 'is_datain' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized]
590 | } else if (op->data.dir == SPI_MEM_DATA_OUT) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/build/stage/linux/drivers/spi/spi-amlogic-spifc-a4.c:601:12: note: uninitialized use occurs here
601 | is_datain ? sfc->info_buf : NULL,
| ^~~~~~~~~
/build/stage/linux/drivers/spi/spi-amlogic-spifc-a4.c:590:9: note: remove the 'if' if its condition is always true
590 | } else if (op->data.dir == SPI_MEM_DATA_OUT) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/build/stage/linux/drivers/spi/spi-amlogic-spifc-a4.c:568:16: note: initialize the variable 'is_datain' to silence this warning
568 | bool is_datain;
| ^
| = 0
/build/stage/linux/drivers/spi/spi-amlogic-spifc-a4.c:590:13: error: variable 'buf' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized]
590 | } else if (op->data.dir == SPI_MEM_DATA_OUT) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/build/stage/linux/drivers/spi/spi-amlogic-spifc-a4.c:600:38: note: uninitialized use occurs here
600 | ret = aml_sfc_dma_buffer_setup(sfc, buf, op->data.nbytes,
| ^~~
/build/stage/linux/drivers/spi/spi-amlogic-spifc-a4.c:590:9: note: remove the 'if' if its condition is always true
590 | } else if (op->data.dir == SPI_MEM_DATA_OUT) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/build/stage/linux/drivers/spi/spi-amlogic-spifc-a4.c:566:11: note: initialize the variable 'buf' to silence this warning
566 | void *buf;
| ^
| = NULL
3 errors generated.
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
[-- Attachment #2: Type: text/plain, Size: 167 bytes --]
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
next prev parent reply other threads:[~2025-09-08 20:39 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-29 5:16 [PATCH v4 0/3] support for Amlogic SPI Flash Controller IP Xianwei Zhao via B4 Relay
2025-08-29 5:16 ` [PATCH v4 1/3] spi: dt-bindings: add Amlogic A113L2 SFC Xianwei Zhao via B4 Relay
2025-08-29 15:16 ` Conor Dooley
2025-08-29 5:16 ` [PATCH v4 2/3] spi: amlogic: add driver for Amlogic SPI Flash Controller Xianwei Zhao via B4 Relay
2025-09-08 16:55 ` Mark Brown [this message]
2025-09-09 5:15 ` Xianwei Zhao
2025-08-29 5:16 ` [PATCH v4 3/3] MAINTAINERS: Add an entry for Amlogic spifc driver Xianwei Zhao via B4 Relay
2025-09-12 1:11 ` [PATCH v4 0/3] support for Amlogic SPI Flash Controller IP Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e010ff93-574a-45d9-a5dc-0942b3fc90f2@sirena.org.uk \
--to=broonie@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=feng.chen@amlogic.com \
--cc=krzk+dt@kernel.org \
--cc=liang.yang@amlogic.com \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=robh@kernel.org \
--cc=xianwei.zhao@amlogic.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®