env: add prototypes for weak function
PATCH 1/1 env: add prototypes for weak function
This patch adds prototypes for several weak functions:
- env_ext4_get_intf
- env_ext4_get_dev_part
- env_get_location
It solves the following warnings when compiling with W=1 on stm32mp1 board:
board/st/stm32mp1/stm32mp1.c:849:19: warning: no previous prototype for 'env_get_location' [-Wmissing-prototypes]
enum env_location env_get_location(enum env_operation op, int prio)
^~~~~~~~~~~~~~~~
board/st/stm32mp1/stm32mp1.c:876:13: warning: no previous prototype for 'env_ext4_get_intf' [-Wmissing-prototypes]
const char *env_ext4_get_intf(void)
^~~~~~~~~~~~~~~~~
board/st/stm32mp1/stm32mp1.c:889:13: warning: no previous prototype for 'env_ext4_get_dev_part' [-Wmissing-prototypes]
const char *env_ext4_get_dev_part(void)
^~~~~~~~~~~~~~~~~~~~~---
include/env_internal.h | 8 ++++++++ 1 file changed, 8 insertions(+)
include/env_internal.h +8 -0
@@ -209,6 +209,14 @@ struct env_driver {extern struct hsearch_data env_htab; +/* allows to set ext4 interface */ +const char *env_ext4_get_intf (void ); + +/* allows to set ext4 device and partition */ +const char *env_ext4_get_dev_part (void ); + +/* Returns the best env location for a board */ +enum env_location env_get_location (enum env_operation op,int prio);#endif /* DO_DEPS_ONLY */ #endif /* _ENV_INTERNAL_H_ */
Signature · 1 line
2.17.1
PATCH 1/1 env: add prototypes for weak function
Dear Patrick,
include/env_internal.h struct env_driver { · line 213
Quoted 3 lines · In message <[email protected]> you wrote:
include/env_internal.h +2
-0+/* allows to set ext4 interface */ +const char *env_ext4_get_intf (void );
Are you sure these comments are correct?
A "get interface" function is not supposed to set anything?
include/env_internal.h struct env_driver { · line 216
Quoted 2 lines
include/env_internal.h +2
-0+/* allows to set ext4 device and partition */ +const char *env_ext4_get_dev_part (void );
A "get device and partition" function is not supposed to set anything?
Best regards,
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de A Puritan is someone who is deathly afraid that someone, somewhere, is having fun.
PATCH 1/1 env: add prototypes for weak function
Hi,
Quoted 12 lines
From: Wolfgang Denk <[email protected]>
Sent: vendredi 24 janvier 2020 14:20Dear Patrick,
include/env_internal.h struct env_driver { · line 213
Quoted 3 lines · In message <[email protected]> you wrote:
include/env_internal.h +2
-0+/* allows to set ext4 interface */ +const char *env_ext4_get_intf (void );Are you sure these comments are correct?
Quoted 6 lines
A "get interface" function is not supposed to set anything?
Review
Quoted 2 lines
(quoted diff) +2
-0+/* allows to set ext4 device and partition */ const char +*env_ext4_get_dev_part(void);A "get device and partition" function is not supposed to set anything?
Yes, I will update the comment.
Quoted 10 lines
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de A Puritan is someone who is deathly afraid that someone, somewhere, is having fun.
Thanks,
Patrick