Felix Held has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/48359 )
Change subject: include/device/device: add comment that config_of_soc never returns NULL ......................................................................
include/device/device: add comment that config_of_soc never returns NULL
Since config_of() calls die() if dev or dev->chip_info are NULL, config_of_soc() will either return a non-NULL pointer or won't return.
Change-Id: I6de6bb1610e823af215436c94ff1a78ff6b86b78 Signed-off-by: Felix Held felix-coreboot@felixheld.de --- M src/include/device/device.h 1 file changed, 1 insertion(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/59/48359/1
diff --git a/src/include/device/device.h b/src/include/device/device.h index 8a481b2..786a640 100644 --- a/src/include/device/device.h +++ b/src/include/device/device.h @@ -385,6 +385,7 @@ devtree_die(); }
+/* config_of_soc() either returns a non-NULL pointer or dies in the config_of() call. */ static inline DEVTREE_CONST void *config_of_soc(void) { return config_of(pcidev_on_root(0, 0));
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/48359 )
Change subject: include/device/device: add comment that config_of_soc never returns NULL ......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/c/coreboot/+/48359/1/src/include/device/device.h File src/include/device/device.h:
https://review.coreboot.org/c/coreboot/+/48359/1/src/include/device/device.h... PS1, Line 388: /* config_of_soc() either returns a non-NULL pointer or dies in the config_of() call. */ I wouldn't expect anyone to read this comment if they won't read the code right above it anyway.
Alexander Couzens has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/48359 )
Change subject: include/device/device: add comment that config_of_soc never returns NULL ......................................................................
Patch Set 1: Code-Review+2
Alexander Couzens has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/48359 )
Change subject: include/device/device: add comment that config_of_soc never returns NULL ......................................................................
Patch Set 1:
(1 comment)
Wh
https://review.coreboot.org/c/coreboot/+/48359/1/src/include/device/device.h File src/include/device/device.h:
https://review.coreboot.org/c/coreboot/+/48359/1/src/include/device/device.h... PS1, Line 388: /* config_of_soc() either returns a non-NULL pointer or dies in the config_of() call. */
I wouldn't expect anyone to read this comment if they won't read the code right above it anyway.
when using an IDE you might run into this. I might also run into it without an ide ;)
Felix Held has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/48359 )
Change subject: include/device/device: add comment that config_of_soc never returns NULL ......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/c/coreboot/+/48359/1/src/include/device/device.h File src/include/device/device.h:
https://review.coreboot.org/c/coreboot/+/48359/1/src/include/device/device.h... PS1, Line 388: /* config_of_soc() either returns a non-NULL pointer or dies in the config_of() call. */
when using an IDE you might run into this. […]
my IDE (SlickEdit) shows when i hover over the function name with the cursor which it doesn't do without the comment here
Felix Held has submitted this change. ( https://review.coreboot.org/c/coreboot/+/48359 )
Change subject: include/device/device: add comment that config_of_soc never returns NULL ......................................................................
include/device/device: add comment that config_of_soc never returns NULL
Since config_of() calls die() if dev or dev->chip_info are NULL, config_of_soc() will either return a non-NULL pointer or won't return.
Change-Id: I6de6bb1610e823af215436c94ff1a78ff6b86b78 Signed-off-by: Felix Held felix-coreboot@felixheld.de Reviewed-on: https://review.coreboot.org/c/coreboot/+/48359 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Alexander Couzens lynxis@fe80.eu --- M src/include/device/device.h 1 file changed, 1 insertion(+), 0 deletions(-)
Approvals: build bot (Jenkins): Verified Alexander Couzens: Looks good to me, approved
diff --git a/src/include/device/device.h b/src/include/device/device.h index 8a481b2..786a640 100644 --- a/src/include/device/device.h +++ b/src/include/device/device.h @@ -385,6 +385,7 @@ devtree_die(); }
+/* config_of_soc() either returns a non-NULL pointer or dies in the config_of() call. */ static inline DEVTREE_CONST void *config_of_soc(void) { return config_of(pcidev_on_root(0, 0));