[U-Boot] [PATCH v2 31/34] env: Rename setenv() and friends to env_set()
Tom Rini
trini at konsulko.com
Wed Jul 26 20:14:02 UTC 2017
On Wed, Jul 26, 2017 at 12:34:33PM -0600, Simon Glass wrote:
> Hi Tom,
>
> On 26 July 2017 at 11:43, Tom Rini <trini at konsulko.com> wrote:
> > On Wed, Jul 26, 2017 at 01:29:48PM -0400, Tom Rini wrote:
> >> On Wed, Jul 26, 2017 at 10:28:38AM -0600, Simon Glass wrote:
> >> > Hi Tom,
> >> >
> >> > On 26 July 2017 at 10:11, Tom Rini <trini at konsulko.com> wrote:
> >> > > On Sun, Jul 23, 2017 at 09:20:06PM -0600, Simon Glass wrote:
> >> > >
> >> > >> We are now using an env_ prefix for environment functions. Rename these
> >> > >> for consistency. Also add function comments in common.h.
> >> > >>
> >> > >> Suggested-by: Wolfgang Denk <wd at denx.de>
> >> > >> Signed-off-by: Simon Glass <sjg at chromium.org>
> >> > >> ---
> >> > >>
> >> > >> Changes in v2:
> >> > >> - Add new patch to rename setenv() and friends to env_set()
> >> > > [snip]
> >> > >> 214 files changed, 630 insertions(+), 599 deletions(-)
> >> > >
> >> > > This gets pretty massive, and the "and friends" includes things like
> >> > > eth_setenv_enetaddr and fsl_setenv_chain_of_trust. Wolfgang, since it
> >> > > was your suggestion, how about we just rename setenv() to env_set() to
> >> > > match the rest and leave "and friends" alone? Thanks!
> >> >
> >> > I'm fine with that. It does leave some inconsistency though. Is that
> >> > the end state you want?
> >>
> >> Honestly? I think so, yes. "^setenv()$" becoming "^env_set()$" to
> >> match the rest of the "^env_xxx()$" API makes sense to me, while
> >> "^eth_setenv_enetaddr()$" and "^fsl_setenv_chain_of_trust()$" are other
> >> namespaces and at least should be stand-alone patches that their
> >> respective custodians ack and pickup. YMMV on if those different names
> >> make it clearer in those cases, but making it clear setenv() is part of
> >> the env_xxx family is an improvement in my mind. And %s/set/get/ as
> >> well, for the follow-up patch of course.
> >
> > And now, trying to be clear has bit me. setenv_hex, etc, are part of
> > the "env" API and should also be renamed for clarity.
>
> OK, sounds good. I'll redo those two patches, but please go ahead and
> take whatever you can from that series, then I'll rebase. I should
> have more time next week.
Will do. I think it's the first 10 or 11 I can pick up now and then we
hit the one with the TODOs.
--
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/20170726/693ade8f/attachment.sig>
More information about the U-Boot
mailing list