From: Wolfgang Denk <wd@denx.de>
To: u-boot@lists.denx.de
Subject: [PATCH 3/5] env: make env_set_default_vars() return void
Date: Thu, 12 Nov 2020 20:51:08 +0100 [thread overview]
Message-ID: <8124.1605210668@gemini.denx.de> (raw)
In-Reply-To: <20201110202603.20944-4-rasmus.villemoes@prevas.dk>
Dear Rasmus,
In message <20201110202603.20944-4-rasmus.villemoes@prevas.dk> you wrote:
> Unlike most other functions declared in env.h, the return value of
> this one also isn't documented. It only has a single caller, which
> ignores the return value. And the companion, env_set_default(),
> already has void as return type.
>
> Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Naked-by: Wolfgang Denk <wd@denx.de>
This is not a good idea. himport_r() can run into problems, and
then it returns an error code. Ignoring errors is never correct.
Instead, the caller should be fixed to add proper error handling.
env_set_default() at least prints a proper error message.
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
Don't have a battle of wits with an unarmed opponent.
next prev parent reply other threads:[~2020-11-12 19:51 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-10 20:25 [PATCH 0/5] allow default environment to be amended from dtb Rasmus Villemoes
2020-11-10 20:25 ` [PATCH 1/5] fdtdec: make fdtdec_get_config_string() return const char* Rasmus Villemoes
2020-11-16 23:52 ` Simon Glass
2020-11-10 20:26 ` [PATCH 2/5] fdtdec: introduce fdtdec_get_config_property Rasmus Villemoes
2020-11-16 23:52 ` Simon Glass
2020-11-10 20:26 ` [PATCH 3/5] env: make env_set_default_vars() return void Rasmus Villemoes
2020-11-12 19:51 ` Wolfgang Denk [this message]
2020-11-10 20:26 ` [PATCH 4/5] env: allow default environment to be amended from control dtb Rasmus Villemoes
2020-11-12 19:58 ` Wolfgang Denk
2020-11-16 23:52 ` Simon Glass
2020-11-17 9:49 ` Rasmus Villemoes
2020-11-20 10:13 ` Wolfgang Denk
2020-11-20 10:33 ` Rasmus Villemoes
2020-11-20 10:53 ` Wolfgang Denk
2020-11-17 11:31 ` Wolfgang Denk
2020-11-17 18:23 ` Tom Rini
2020-11-18 14:37 ` Simon Glass
2020-11-20 10:28 ` Wolfgang Denk
2020-11-21 23:07 ` Simon Glass
2020-11-22 16:12 ` Wolfgang Denk
2020-11-20 10:16 ` Wolfgang Denk
2020-11-17 10:01 ` Stefano Babic
2020-11-10 20:26 ` [PATCH 5/5] test: add tests for default environment Rasmus Villemoes
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8124.1605210668@gemini.denx.de \
--to=wd@denx.de \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox