From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hannes Schmelzer Date: Fri, 5 May 2017 21:45:30 +0200 Subject: [U-Boot] [PATCH v2 1/1] board/BuR/common: incorrect check of dtb In-Reply-To: <20170505185732.4191-1-xypron.glpk@gmx.de> References: <4edefe45-e8bc-ec7e-b28c-3d1cad6de49a@schmelzer.or.at> <20170505185732.4191-1-xypron.glpk@gmx.de> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de > The logical expression to check the dtb is incorrect in > load_devicetree. > > The problem was indicated by cppcheck. > > The inconsistent variable name dtppart is changed to dtbpart. > > Signed-off-by: Heinrich Schuchardt > --- > v2: > fix syntax error due to incorrect spelling of variable > > Building was checked with buildman > > $ buildman -k brxre1 > boards.cfg is up to date. Nothing to do. > Building current source for 1 boards (1 thread, 4 jobs per thread) > 1 0 0 /1 brxre1 > $ buildman -k brppt1 > boards.cfg is up to date. Nothing to do. > Building current source for 3 boards (3 threads, 2 jobs per thread) > 3 0 0 /3 0:00:45 : brppt1_nand > > I do not have a BuR board available for actual testing. > > v1: > Original patch > https://patchwork.ozlabs.org/patch/758237/ > --- > board/BuR/common/common.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/board/BuR/common/common.c b/board/BuR/common/common.c > index 876150402c..5cc82c9473 100644 > --- a/board/BuR/common/common.c > +++ b/board/BuR/common/common.c > @@ -264,13 +264,13 @@ static int load_devicetree(void) > #else > char *dtbname = getenv("dtb"); > char *dtbdev = getenv("dtbdev"); > - char *dtppart = getenv("dtbpart"); > - if (!dtbdev || !dtbdev || !dtbname) { > + char *dtbpart = getenv("dtbpart"); > + if (!dtbdev || !dtbpart || !dtbname) { > printf("%s: // missing.\n", __func__); > return -1; > } > > - if (fs_set_blk_dev(dtbdev, dtppart, FS_TYPE_EXT)) { > + if (fs_set_blk_dev(dtbdev, dtbpart, FS_TYPE_EXT)) { > puts("load_devicetree: set_blk_dev failed.\n"); > return -1; > } Reviewed-by: Hannes Schmelzer Acked-by: Hannes Schmelzer