All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] board/BuR/common: incorrect check of dtb
@ 2017-05-03 21:44 Heinrich Schuchardt
  2017-05-04 10:35 ` Hannes Schmelzer
  2017-05-05 16:38 ` [U-Boot] " Tom Rini
  0 siblings, 2 replies; 9+ messages in thread
From: Heinrich Schuchardt @ 2017-05-03 21:44 UTC (permalink / raw)
  To: u-boot

The logical expression to check the dtb is incorrect in
load_devicetree.

The problem was indicated by cppcheck.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
---
I do not have a board for testing.
Please, review carefully.
---
 board/BuR/common/common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/board/BuR/common/common.c b/board/BuR/common/common.c
index 876150402c..c0316b9ebd 100644
--- a/board/BuR/common/common.c
+++ b/board/BuR/common/common.c
@@ -265,7 +265,7 @@ static int load_devicetree(void)
 	char *dtbname = getenv("dtb");
 	char *dtbdev = getenv("dtbdev");
 	char *dtppart = getenv("dtbpart");
-	if (!dtbdev || !dtbdev || !dtbname) {
+	if (!dtbdev || !dtbpart || !dtbname) {
 		printf("%s: <dtbdev>/<dtbpart>/<dtb> missing.\n", __func__);
 		return -1;
 	}
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [U-Boot] [PATCH] board/BuR/common: incorrect check of dtb
  2017-05-03 21:44 [U-Boot] [PATCH] board/BuR/common: incorrect check of dtb Heinrich Schuchardt
@ 2017-05-04 10:35 ` Hannes Schmelzer
  2017-05-05 16:38 ` [U-Boot] " Tom Rini
  1 sibling, 0 replies; 9+ messages in thread
From: Hannes Schmelzer @ 2017-05-04 10:35 UTC (permalink / raw)
  To: u-boot

On 05/03/2017 11:44 PM, Heinrich Schuchardt wrote:
> The logical expression to check the dtb is incorrect in
> load_devicetree.
>
> The problem was indicated by cppcheck.
>
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> ---
> I do not have a board for testing.
> Please, review carefully.
> ---
>   board/BuR/common/common.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/board/BuR/common/common.c b/board/BuR/common/common.c
> index 876150402c..c0316b9ebd 100644
> --- a/board/BuR/common/common.c
> +++ b/board/BuR/common/common.c
> @@ -265,7 +265,7 @@ static int load_devicetree(void)
>   	char *dtbname = getenv("dtb");
>   	char *dtbdev = getenv("dtbdev");
>   	char *dtppart = getenv("dtbpart");
> -	if (!dtbdev || !dtbdev || !dtbname) {
> +	if (!dtbdev || !dtbpart || !dtbname) {
>   		printf("%s: <dtbdev>/<dtbpart>/<dtb> missing.\n", __func__);
>   		return -1;
>   	}
Reviewed-by: Hannes Schmelzer <oe5hpm@oevsv.at>
Acked-by: Hannes Schmelzer <oe5hpm@oevsv.at>

Thanks!

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] board/BuR/common: incorrect check of dtb
  2017-05-03 21:44 [U-Boot] [PATCH] board/BuR/common: incorrect check of dtb Heinrich Schuchardt
  2017-05-04 10:35 ` Hannes Schmelzer
@ 2017-05-05 16:38 ` Tom Rini
  2017-05-05 18:11   ` Anatolij Gustschin
  1 sibling, 1 reply; 9+ messages in thread
From: Tom Rini @ 2017-05-05 16:38 UTC (permalink / raw)
  To: u-boot

On Wed, May 03, 2017 at 11:44:11PM +0200, xypron.glpk at gmx.de wrote:

> The logical expression to check the dtb is incorrect in
> load_devicetree.
> 
> The problem was indicated by cppcheck.
> 
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> Reviewed-by: Hannes Schmelzer <oe5hpm@oevsv.at>
> Acked-by: Hannes Schmelzer <oe5hpm@oevsv.at>
> ---
> I do not have a board for testing.
> Please, review carefully.
> ---
>  board/BuR/common/common.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/board/BuR/common/common.c b/board/BuR/common/common.c
> index 876150402c..c0316b9ebd 100644
> --- a/board/BuR/common/common.c
> +++ b/board/BuR/common/common.c
> @@ -265,7 +265,7 @@ static int load_devicetree(void)
>  	char *dtbname = getenv("dtb");
>  	char *dtbdev = getenv("dtbdev");
>  	char *dtppart = getenv("dtbpart");
> -	if (!dtbdev || !dtbdev || !dtbname) {
> +	if (!dtbdev || !dtbpart || !dtbname) {
>  		printf("%s: <dtbdev>/<dtbpart>/<dtb> missing.\n", __func__);
>  		return -1;
>  	}

This breaks some boards such as brppt1_mmc, which I agree doesn't make a
lot of sense with just the above context, can you please test building
'BuR' via buildman?  Thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170505/fc22c8e6/attachment.sig>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] board/BuR/common: incorrect check of dtb
  2017-05-05 16:38 ` [U-Boot] " Tom Rini
@ 2017-05-05 18:11   ` Anatolij Gustschin
  2017-05-05 18:14     ` Tom Rini
  0 siblings, 1 reply; 9+ messages in thread
From: Anatolij Gustschin @ 2017-05-05 18:11 UTC (permalink / raw)
  To: u-boot

On Fri, 5 May 2017 12:38:06 -0400
Tom Rini trini at konsulko.com wrote:
...
> >  	char *dtbname = getenv("dtb");
> >  	char *dtbdev = getenv("dtbdev");
> >  	char *dtppart = getenv("dtbpart");
> > -	if (!dtbdev || !dtbdev || !dtbname) {
> > +	if (!dtbdev || !dtbpart || !dtbname) {
> >  		printf("%s: <dtbdev>/<dtbpart>/<dtb> missing.\n", __func__);
> >  		return -1;
> >  	}  
> 
> This breaks some boards such as brppt1_mmc, which I agree doesn't make a
> lot of sense with just the above context, can you please test building
> 'BuR' via buildman?  Thanks!

dtbpart is wrong here, the defined variable is dtppart.

--
Anatolij

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] board/BuR/common: incorrect check of dtb
  2017-05-05 18:11   ` Anatolij Gustschin
@ 2017-05-05 18:14     ` Tom Rini
  2017-05-05 18:44       ` Hannes Schmelzer
  0 siblings, 1 reply; 9+ messages in thread
From: Tom Rini @ 2017-05-05 18:14 UTC (permalink / raw)
  To: u-boot

On Fri, May 05, 2017 at 08:11:54PM +0200, Anatolij Gustschin wrote:
> On Fri, 5 May 2017 12:38:06 -0400
> Tom Rini trini at konsulko.com wrote:
> ...
> > >  	char *dtbname = getenv("dtb");
> > >  	char *dtbdev = getenv("dtbdev");
> > >  	char *dtppart = getenv("dtbpart");
> > > -	if (!dtbdev || !dtbdev || !dtbname) {
> > > +	if (!dtbdev || !dtbpart || !dtbname) {
> > >  		printf("%s: <dtbdev>/<dtbpart>/<dtb> missing.\n", __func__);
> > >  		return -1;
> > >  	}  
> > 
> > This breaks some boards such as brppt1_mmc, which I agree doesn't make a
> > lot of sense with just the above context, can you please test building
> > 'BuR' via buildman?  Thanks!
> 
> dtbpart is wrong here, the defined variable is dtppart.

Ah-ha!  Time to clean off the laptop screen...

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170505/d9525728/attachment.sig>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] board/BuR/common: incorrect check of dtb
  2017-05-05 18:14     ` Tom Rini
@ 2017-05-05 18:44       ` Hannes Schmelzer
  2017-05-05 18:57         ` [U-Boot] [PATCH v2 1/1] " Heinrich Schuchardt
  0 siblings, 1 reply; 9+ messages in thread
From: Hannes Schmelzer @ 2017-05-05 18:44 UTC (permalink / raw)
  To: u-boot

On 05/05/2017 08:14 PM, Tom Rini wrote:
> On Fri, May 05, 2017 at 08:11:54PM +0200, Anatolij Gustschin wrote:
>> On Fri, 5 May 2017 12:38:06 -0400
>> Tom Rini trini at konsulko.com wrote:
>> ...
>>>>   	char *dtbname = getenv("dtb");
>>>>   	char *dtbdev = getenv("dtbdev");
>>>>   	char *dtppart = getenv("dtbpart");
>>>> -	if (!dtbdev || !dtbdev || !dtbname) {
>>>> +	if (!dtbdev || !dtbpart || !dtbname) {
>>>>   		printf("%s: <dtbdev>/<dtbpart>/<dtb> missing.\n", __func__);
>>>>   		return -1;
>>>>   	}
>>> This breaks some boards such as brppt1_mmc, which I agree doesn't make a
>>> lot of sense with just the above context, can you please test building
>>> 'BuR' via buildman?  Thanks!
>> dtbpart is wrong here, the defined variable is dtppart.
> Ah-ha!  Time to clean off the laptop screen...
Yeah, maybe we should also do some cosmetic cleanup on this with an 
extra patch.
This typo is here since the early days ;-)

Heinrich, could you do so?

cheers,
Hannes

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] [PATCH v2 1/1] board/BuR/common: incorrect check of dtb
  2017-05-05 18:44       ` Hannes Schmelzer
@ 2017-05-05 18:57         ` Heinrich Schuchardt
  2017-05-05 19:45           ` Hannes Schmelzer
  2017-05-07  1:28           ` [U-Boot] [U-Boot, v2, " Tom Rini
  0 siblings, 2 replies; 9+ messages in thread
From: Heinrich Schuchardt @ 2017-05-05 18:57 UTC (permalink / raw)
  To: u-boot

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 <xypron.glpk@gmx.de>
---
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: <dtbdev>/<dtbpart>/<dtb> 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;
 	}
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [U-Boot] [PATCH v2 1/1] board/BuR/common: incorrect check of dtb
  2017-05-05 18:57         ` [U-Boot] [PATCH v2 1/1] " Heinrich Schuchardt
@ 2017-05-05 19:45           ` Hannes Schmelzer
  2017-05-07  1:28           ` [U-Boot] [U-Boot, v2, " Tom Rini
  1 sibling, 0 replies; 9+ messages in thread
From: Hannes Schmelzer @ 2017-05-05 19:45 UTC (permalink / raw)
  To: u-boot


> 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 <xypron.glpk@gmx.de>
> ---
> 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: <dtbdev>/<dtbpart>/<dtb> 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 <oe5hpm@oevsv.at>
Acked-by: Hannes Schmelzer <oe5hpm@oevsv.at>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] [U-Boot, v2, 1/1] board/BuR/common: incorrect check of dtb
  2017-05-05 18:57         ` [U-Boot] [PATCH v2 1/1] " Heinrich Schuchardt
  2017-05-05 19:45           ` Hannes Schmelzer
@ 2017-05-07  1:28           ` Tom Rini
  1 sibling, 0 replies; 9+ messages in thread
From: Tom Rini @ 2017-05-07  1:28 UTC (permalink / raw)
  To: u-boot

On Fri, May 05, 2017 at 08:57:32PM +0200, xypron.glpk at gmx.de wrote:

> 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 <xypron.glpk@gmx.de>
> Reviewed-by: Hannes Schmelzer <oe5hpm@oevsv.at>
> Acked-by: Hannes Schmelzer <oe5hpm@oevsv.at>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170506/1d74fe2f/attachment.sig>

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2017-05-07  1:28 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-03 21:44 [U-Boot] [PATCH] board/BuR/common: incorrect check of dtb Heinrich Schuchardt
2017-05-04 10:35 ` Hannes Schmelzer
2017-05-05 16:38 ` [U-Boot] " Tom Rini
2017-05-05 18:11   ` Anatolij Gustschin
2017-05-05 18:14     ` Tom Rini
2017-05-05 18:44       ` Hannes Schmelzer
2017-05-05 18:57         ` [U-Boot] [PATCH v2 1/1] " Heinrich Schuchardt
2017-05-05 19:45           ` Hannes Schmelzer
2017-05-07  1:28           ` [U-Boot] [U-Boot, v2, " Tom Rini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.