public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Nikita Kiryanov <nikita@compulab.co.il>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v3 1/3] spl: mmc: Fix compiler warning with CONFIG_DM_MMC
Date: Thu, 3 Dec 2015 11:28:52 +0200	[thread overview]
Message-ID: <20151203092852.GA28899@skynet> (raw)
In-Reply-To: <1449079153-25422-2-git-send-email-sjg@chromium.org>

On Wed, Dec 02, 2015 at 10:59:11AM -0700, Simon Glass wrote:
> Since commit 4188ba3 we get the following warning on rockchip boards:
> 
> common/spl/spl_mmc.c:31:24: warning: ?mmc? may be used uninitialized in this function [-Wmaybe-uninitialized]
>   count = mmc->block_dev.block_read(0, sector, 1, header);
>                         ^
> common/spl/spl_mmc.c:251:14: note: ?mmc? was declared here
>   struct mmc *mmc;
> 
> Correct this by move the variable init earlier.

Acked-by: Nikita Kiryanov <nikita@compulab.co.il>

> 
> Signed-off-by: Simon Glass <sjg@chromium.org>
> Tested-by: Michal Simek <michal.simek@xilinx.com>
> ---

  reply	other threads:[~2015-12-03  9:28 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-02 17:59 [U-Boot] [PATCH v3 0/3] spl: mmc: Fix warning and unify spl_mmc_find_device() Simon Glass
2015-12-02 17:59 ` [U-Boot] [PATCH v3 1/3] spl: mmc: Fix compiler warning with CONFIG_DM_MMC Simon Glass
2015-12-03  9:28   ` Nikita Kiryanov [this message]
2015-12-06 22:07   ` [U-Boot] [U-Boot, v3, " Tom Rini
2015-12-02 17:59 ` [U-Boot] [PATCH v3 2/3] spl: mmc: Rename 'mmc' variable to 'mmcp' Simon Glass
2015-12-06 22:07   ` [U-Boot] [U-Boot, v3, " Tom Rini
2015-12-02 17:59 ` [U-Boot] [PATCH v3 3/3] spl: mmc: Unify non/driver model spl_mmc_find_device() Simon Glass
2015-12-06 22:07   ` [U-Boot] [U-Boot, v3, " 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=20151203092852.GA28899@skynet \
    --to=nikita@compulab.co.il \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox