* Coverity: sdhci_versal_sdcardclk_set_phase(): Uninitialized variables
@ 2020-04-17 21:52 coverity-bot
2020-04-19 23:35 ` Stephen Rothwell
0 siblings, 1 reply; 2+ messages in thread
From: coverity-bot @ 2020-04-17 21:52 UTC (permalink / raw)
To: Manish Narani; +Cc: Ulf Hansson, Adrian Hunter, Gustavo A. R. Silva, linux-next
Hello!
This is an experimental semi-automated report about issues detected by
Coverity from a scan of next-20200417 as part of the linux-next scan project:
https://scan.coverity.com/projects/linux-next-weekly-scan
You're getting this email because you were associated with the identified
lines of code (noted below) that were touched by commits:
Mon Apr 6 23:13:31 2020 +0530
f73e66a36772 ("sdhci: arasan: Add support for Versal Tap Delays")
Coverity reported the following:
*** CID 1492645: Uninitialized variables (UNINIT)
/drivers/mmc/host/sdhci-of-arasan.c: 784 in sdhci_versal_sdcardclk_set_phase()
778 regval |= SDHCI_OTAPDLY_ENABLE;
779 sdhci_writel(host, regval, SDHCI_ARASAN_OTAPDLY_REGISTER);
780 regval |= tap_delay;
781 sdhci_writel(host, regval, SDHCI_ARASAN_OTAPDLY_REGISTER);
782 }
783
vvv CID 1492645: Uninitialized variables (UNINIT)
vvv Using uninitialized value "ret".
784 return ret;
785 }
786
787 static const struct clk_ops versal_sdcardclk_ops = {
788 .recalc_rate = sdhci_arasan_sdcardclk_recalc_rate,
789 .set_phase = sdhci_versal_sdcardclk_set_phase,
If this is a false positive, please let us know so we can mark it as
such, or teach the Coverity rules to be smarter. If not, please make
sure fixes get into linux-next. :) For patches fixing this, please
include these lines (but double-check the "Fixes" first):
Human edit: also on line 860, same issue.
Reported-by: coverity-bot <keescook+coverity-bot@chromium.org>
Addresses-Coverity-ID: 1492645 ("Uninitialized variables")
Fixes: f73e66a36772 ("sdhci: arasan: Add support for Versal Tap Delays")
Thanks for your attention!
--
Coverity-bot
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Coverity: sdhci_versal_sdcardclk_set_phase(): Uninitialized variables
2020-04-17 21:52 Coverity: sdhci_versal_sdcardclk_set_phase(): Uninitialized variables coverity-bot
@ 2020-04-19 23:35 ` Stephen Rothwell
0 siblings, 0 replies; 2+ messages in thread
From: Stephen Rothwell @ 2020-04-19 23:35 UTC (permalink / raw)
To: coverity-bot
Cc: Manish Narani, Ulf Hansson, Adrian Hunter, Gustavo A. R. Silva,
linux-next
[-- Attachment #1: Type: text/plain, Size: 2015 bytes --]
Hi Kees,
On Fri, 17 Apr 2020 14:52:01 -0700 coverity-bot <keescook@chromium.org> wrote:
>
> Hello!
>
> This is an experimental semi-automated report about issues detected by
> Coverity from a scan of next-20200417 as part of the linux-next scan project:
> https://scan.coverity.com/projects/linux-next-weekly-scan
>
> You're getting this email because you were associated with the identified
> lines of code (noted below) that were touched by commits:
>
> Mon Apr 6 23:13:31 2020 +0530
> f73e66a36772 ("sdhci: arasan: Add support for Versal Tap Delays")
>
> Coverity reported the following:
>
> *** CID 1492645: Uninitialized variables (UNINIT)
> /drivers/mmc/host/sdhci-of-arasan.c: 784 in sdhci_versal_sdcardclk_set_phase()
> 778 regval |= SDHCI_OTAPDLY_ENABLE;
> 779 sdhci_writel(host, regval, SDHCI_ARASAN_OTAPDLY_REGISTER);
> 780 regval |= tap_delay;
> 781 sdhci_writel(host, regval, SDHCI_ARASAN_OTAPDLY_REGISTER);
> 782 }
> 783
> vvv CID 1492645: Uninitialized variables (UNINIT)
> vvv Using uninitialized value "ret".
> 784 return ret;
> 785 }
> 786
> 787 static const struct clk_ops versal_sdcardclk_ops = {
> 788 .recalc_rate = sdhci_arasan_sdcardclk_recalc_rate,
> 789 .set_phase = sdhci_versal_sdcardclk_set_phase,
>
> If this is a false positive, please let us know so we can mark it as
> such, or teach the Coverity rules to be smarter. If not, please make
> sure fixes get into linux-next. :) For patches fixing this, please
> include these lines (but double-check the "Fixes" first):
>
> Human edit: also on line 860, same issue.
>
> Reported-by: coverity-bot <keescook+coverity-bot@chromium.org>
> Addresses-Coverity-ID: 1492645 ("Uninitialized variables")
> Fixes: f73e66a36772 ("sdhci: arasan: Add support for Versal Tap Delays")
>
> Thanks for your attention!
This was reported elsewhere and should be fixed in today's linux-next.
--
Cheers,
Stephen Rothwell
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-04-19 23:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-17 21:52 Coverity: sdhci_versal_sdcardclk_set_phase(): Uninitialized variables coverity-bot
2020-04-19 23:35 ` Stephen Rothwell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).