All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] env: add prototypes for weak function
@ 2020-01-24 12:41 Patrick Delaunay
  2020-01-24 13:19 ` Wolfgang Denk
  0 siblings, 1 reply; 3+ messages in thread
From: Patrick Delaunay @ 2020-01-24 12:41 UTC (permalink / raw)
  To: u-boot

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)
             ^~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
---

 include/env_internal.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/include/env_internal.h b/include/env_internal.h
index 90a4df8a72..874ef48646 100644
--- a/include/env_internal.h
+++ b/include/env_internal.h
@@ -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_ */
-- 
2.17.1

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

* [PATCH] env: add prototypes for weak function
  2020-01-24 12:41 [PATCH] env: add prototypes for weak function Patrick Delaunay
@ 2020-01-24 13:19 ` Wolfgang Denk
  2020-01-27 10:49   ` Patrick DELAUNAY
  0 siblings, 1 reply; 3+ messages in thread
From: Wolfgang Denk @ 2020-01-24 13:19 UTC (permalink / raw)
  To: u-boot

Dear Patrick,

In message <20200124124142.392-1-patrick.delaunay@st.com> you wrote:
>
> +/* 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?

> +/* 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

-- 
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.

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

* [PATCH] env: add prototypes for weak function
  2020-01-24 13:19 ` Wolfgang Denk
@ 2020-01-27 10:49   ` Patrick DELAUNAY
  0 siblings, 0 replies; 3+ messages in thread
From: Patrick DELAUNAY @ 2020-01-27 10:49 UTC (permalink / raw)
  To: u-boot

Hi,

> From: Wolfgang Denk <wd@denx.de>
> Sent: vendredi 24 janvier 2020 14:20
> 
> Dear Patrick,
> 
> In message <20200124124142.392-1-patrick.delaunay@st.com> you wrote:
> >
> > +/* 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?
> 
> > +/* 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.
 
> 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

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

end of thread, other threads:[~2020-01-27 10:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-24 12:41 [PATCH] env: add prototypes for weak function Patrick Delaunay
2020-01-24 13:19 ` Wolfgang Denk
2020-01-27 10:49   ` Patrick DELAUNAY

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.