From: Nathan Chancellor <nathan@kernel.org>
To: Wolfram Sang <wsa@kernel.org>
Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>,
Tom Rix <trix@redhat.com>,
llvm@lists.linux.dev, Nick Desaulniers <ndesaulniers@google.com>,
linux-kernel@vger.kernel.org, Michael Walle <michael@walle.cc>,
linux-i2c@vger.kernel.org,
Codrin Ciubotariu <codrin.ciubotariu@microchip.com>,
Claudiu Beznea <claudiu.beznea@microchip.com>,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] i2c: at91: Initialize dma_buf in at91_twi_xfer()
Date: Sat, 14 May 2022 14:05:18 -0700 [thread overview]
Message-ID: <YoAZjpzAEugCiv/Q@dev-arch.thelio-3990X> (raw)
In-Reply-To: <Yn+xsNqFyRMTu+5X@shikoro>
On Sat, May 14, 2022 at 03:42:08PM +0200, Wolfram Sang wrote:
> On Thu, May 05, 2022 at 08:27:38AM -0700, Nathan Chancellor wrote:
> > Clang warns:
> >
> > drivers/i2c/busses/i2c-at91-master.c:707:6: warning: variable 'dma_buf' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
> > if (dev->use_dma) {
> > ^~~~~~~~~~~~
> > drivers/i2c/busses/i2c-at91-master.c:717:27: note: uninitialized use occurs here
> > i2c_put_dma_safe_msg_buf(dma_buf, m_start, !ret);
> > ^~~~~~~
> >
> > Initialize dma_buf to NULL, as i2c_put_dma_safe_msg_buf() is a no-op
> > when the first argument is NULL, which will work for the !dev->use_dma
> > case.
> >
> > Fixes: 03fbb903c8bf ("i2c: at91: use dma safe buffers")
> > Link: https://github.com/ClangBuiltLinux/linux/issues/1629
> > Signed-off-by: Nathan Chancellor <nathan@kernel.org>
>
> Applied to for-next, thanks!
>
Thank you!
Cheers,
Nathan
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
prev parent reply other threads:[~2022-05-14 21:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-05 15:27 [PATCH] i2c: at91: Initialize dma_buf in at91_twi_xfer() Nathan Chancellor
2022-05-05 15:38 ` Michael Walle
2022-05-13 16:50 ` Nathan Chancellor
2022-05-14 13:42 ` Wolfram Sang
2022-05-14 21:05 ` Nathan Chancellor [this message]
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=YoAZjpzAEugCiv/Q@dev-arch.thelio-3990X \
--to=nathan@kernel.org \
--cc=alexandre.belloni@bootlin.com \
--cc=claudiu.beznea@microchip.com \
--cc=codrin.ciubotariu@microchip.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=michael@walle.cc \
--cc=ndesaulniers@google.com \
--cc=trix@redhat.com \
--cc=wsa@kernel.org \
/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