From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nikita Kiryanov Date: Thu, 3 Dec 2015 11:28:52 +0200 Subject: [U-Boot] [PATCH v3 1/3] spl: mmc: Fix compiler warning with CONFIG_DM_MMC In-Reply-To: <1449079153-25422-2-git-send-email-sjg@chromium.org> References: <1449079153-25422-1-git-send-email-sjg@chromium.org> <1449079153-25422-2-git-send-email-sjg@chromium.org> Message-ID: <20151203092852.GA28899@skynet> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 > > Signed-off-by: Simon Glass > Tested-by: Michal Simek > ---