Skip to contentSkip to conversation

lib: decode_timing_property should return -NOENT when proprty is not found

PATCH Superseded megous at megous.com 2 participants 4 messages Feb 13, 2019 – Apr 12, 2019 Library code

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 lib: decode_timing_property should return -NOENT when proprty is not found

From: Ondrej Jirman <[email protected]>

Length may be unitialized when fdt_getprop fails. Return ENOENT when the property can't be found.

---
This was previously sent as a part of other series of patches, but it's unrelated to the rest of the patches, so I'm resending it individually.

v2:
- improved description

 lib/fdtdec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/fdtdec.c +1 -1
index 18663ce6bd..3510de78e1 100644
@@ -980,7 +980,7 @@ static int decode_timing_property(const void *blob, int node, const char *name,
 	if (!prop) {
 		debug("%s: could not find property %s\n",
 		      fdt_get_name(blob, node, NULL), name);
-		return length;
+		return -ENOENT;
 	}
 
 	if (length == sizeof(u32)) {
Signature · 1 line
2.20.1
#1 lore raw

PATCH v2 1/1 lib: decode_timing_property should return -NOENT when proprty is not found

Hi,

Quoted 5 lines · On Wed, 13 Feb 2019 at 10:50, <[email protected]> wrote:

From: Ondrej Jirman <[email protected]>

Length may be unitialized when fdt_getprop fails. Return ENOENT when the property can't be found.

It should always be the error code. What situation are you seeing here?

Regards,
Simon

Quoted 29 lines

---
This was previously sent as a part of other series of patches, but it's unrelated to the rest of the patches, so I'm resending it individually.

v2:
- improved description

 lib/fdtdec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/fdtdec.c +1 -2
index 18663ce6bd..3510de78e1 100644
@@ -980,7 +980,7 @@ static int decode_timing_property(const void *blob, int node, const char *name,
        if (!prop) {
                debug("%s: could not find property %s\n",
                      fdt_get_name(blob, node, NULL), name);
-               return length;
+               return -ENOENT;
        }
 
        if (length == sizeof(u32)) {
--

2.20.1

#2 lore raw

PATCH v2 1/1 lib: decode_timing_property should return -NOENT when proprty is not found

Hi,

Quoted 12 lines · Simon Glass

Hi,

Quoted 5 lines · On Wed, 13 Feb 2019 at 10:50, <[email protected]> wrote:

From: Ondrej Jirman <[email protected]>

Length may be unitialized when fdt_getprop fails. Return ENOENT when the property can't be found.

It should always be the error code. What situation are you seeing here?

Any update on this?

Regards,
Simon

Quoted 33 lines

Regards,
Simon

Quoted 29 lines

---
This was previously sent as a part of other series of patches, but it's unrelated to the rest of the patches, so I'm resending it individually.

v2:
- improved description

 lib/fdtdec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/fdtdec.c +1 -2
index 18663ce6bd..3510de78e1 100644
@@ -980,7 +980,7 @@ static int decode_timing_property(const void *blob, int node, const char *name,
        if (!prop) {
                debug("%s: could not find property %s\n",
                      fdt_get_name(blob, node, NULL), name);
-               return length;
+               return -ENOENT;
        }
 
        if (length == sizeof(u32)) {
--

2.20.1

#3 lore raw

PATCH v2 1/1 lib: decode_timing_property should return -NOENT when proprty is not found

Hello Simon,

Quoted 10 lines · Simon Glass

Hi,

Quoted 7 lines · Simon Glass

Hi,

Quoted 3 lines · On Wed, 13 Feb 2019 at 10:50, <[email protected]> wrote:

From: Ondrej Jirman <[email protected]>

Quoted 7 lines
Quoted 5 lines
Quoted 2 lines

Length may be unitialized when fdt_getprop fails. Return ENOENT when the property can't be found.

It should always be the error code. What situation are you seeing here?

Any update on this?

See my response on v1 of the patch. You can ignore it.

thank you and regards,
o.

Quoted 41 lines

Regards,
Simon

Quoted 29 lines

Regards,
Simon

Quoted 25 lines

---
This was previously sent as a part of other series of patches, but it's unrelated to the rest of the patches, so I'm resending it individually.

v2:
- improved description

 lib/fdtdec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/fdtdec.c +1 -1
index 18663ce6bd..3510de78e1 100644
@@ -980,7 +980,7 @@ static int decode_timing_property(const void *blob, int node, const char *name,
        if (!prop) {
                debug("%s: could not find property %s\n",
                      fdt_get_name(blob, node, NULL), name);
-               return length;
+               return -ENOENT;
        }
 
Quoted 4 lines
Quoted 4 lines
lib/fdtdec.c +0 -1
        if (length == sizeof(u32)) {
--

2.20.1

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
https://lists.denx.de/listinfo/u-boot