public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: Wolfram Sang <wsa@kernel.org>
To: Nathan Chancellor <nathan@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 15:42:08 +0200	[thread overview]
Message-ID: <Yn+xsNqFyRMTu+5X@shikoro> (raw)
In-Reply-To: <20220505152738.1440249-1-nathan@kernel.org>


[-- Attachment #1.1: Type: text/plain, Size: 880 bytes --]

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!


[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2022-05-14 13:43 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 [this message]
2022-05-14 21:05   ` Nathan Chancellor

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=Yn+xsNqFyRMTu+5X@shikoro \
    --to=wsa@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=nathan@kernel.org \
    --cc=ndesaulniers@google.com \
    --cc=trix@redhat.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