All of lore.kernel.org
 help / color / mirror / Atom feed
From: Masahisa Kojima <masahisa.kojima@linaro.org>
To: u-boot@lists.denx.de
Cc: Jassi Brar <jaswinder.singh@linaro.org>,
	Satoru Okamoto <okamoto.satoru@socionext.com>,
	Masahisa Kojima <masahisa.kojima@linaro.org>,
	Jagan Teki <jagan@amarulasolutions.com>
Subject: [PATCH 1/4] spi: synquacer: busy variable must be initialized before use
Date: Tue, 17 May 2022 17:41:36 +0900	[thread overview]
Message-ID: <20220517084139.6986-2-masahisa.kojima@linaro.org> (raw)
In-Reply-To: <20220517084139.6986-1-masahisa.kojima@linaro.org>

"busy" variable is ORed without being initialized,
must be zeroed before use.

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Signed-off-by: Satoru Okamoto <okamoto.satoru@socionext.com>
---
 drivers/spi/spi-synquacer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/spi/spi-synquacer.c b/drivers/spi/spi-synquacer.c
index ce558c4bc0..62f85f0335 100644
--- a/drivers/spi/spi-synquacer.c
+++ b/drivers/spi/spi-synquacer.c
@@ -275,7 +275,7 @@ static int synquacer_spi_xfer(struct udevice *dev, unsigned int bitlen,
 {
 	struct udevice *bus = dev->parent;
 	struct synquacer_spi_priv *priv = dev_get_priv(bus);
-	u32 val, words, busy;
+	u32 val, words, busy = 0;
 
 	val = readl(priv->base + FIFOCFG);
 	val |= (1 << RX_FLUSH);
-- 
2.17.1


  reply	other threads:[~2022-05-17  8:41 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-17  8:41 [PATCH 0/4] spi-synquacer fixes and improvement Masahisa Kojima
2022-05-17  8:41 ` Masahisa Kojima [this message]
2022-05-18  3:42   ` [PATCH 1/4] spi: synquacer: busy variable must be initialized before use Jassi Brar
2022-06-10 21:40   ` Tom Rini
2022-05-17  8:41 ` [PATCH 2/4] spi: synquacer: wait until slave is deselected Masahisa Kojima
2022-05-18  3:42   ` Jassi Brar
2022-06-10 21:40   ` Tom Rini
2022-05-17  8:41 ` [PATCH 3/4] spi: synquacer: DMSTART bit must not be set while transferring Masahisa Kojima
2022-05-18  3:43   ` Jassi Brar
2022-06-10 21:40   ` Tom Rini
2022-05-17  8:41 ` [PATCH 4/4] spi: synquacer: simplify tx completion checking Masahisa Kojima
2022-05-18  3:43   ` Jassi Brar
2022-06-10 21:40   ` Tom Rini

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=20220517084139.6986-2-masahisa.kojima@linaro.org \
    --to=masahisa.kojima@linaro.org \
    --cc=jagan@amarulasolutions.com \
    --cc=jaswinder.singh@linaro.org \
    --cc=okamoto.satoru@socionext.com \
    --cc=u-boot@lists.denx.de \
    /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 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.