From: Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
To: Alban Bedel
<alban.bedel-RM9K5IK7kjKj5M59NBduVrNAH6kLmebB@public.gmane.org>
Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Allen Martin <amartin-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>,
Penny Chiu <pchiu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Subject: Re: [tegrarcm PATCH 1/2] Remove the operational mode check
Date: Wed, 11 Nov 2015 10:07:21 -0700 [thread overview]
Message-ID: <564375C9.9070405@wwwdotorg.org> (raw)
In-Reply-To: <1447089586-24826-2-git-send-email-alban.bedel-RM9K5IK7kjKj5M59NBduVrNAH6kLmebB@public.gmane.org>
On 11/09/2015 10:19 AM, Alban Bedel wrote:
> This check isn't really needed, if communication isn't possible it
> will just fails later on. Further it currently prevent communicating
> with secured devices, so just remove it.
> diff --git a/src/main.c b/src/main.c
> @@ -352,13 +352,6 @@ int main(int argc, char **argv)
> - if (info.op_mode != RCM_OP_MODE_DEVEL &&
> - info.op_mode != RCM_OP_MODE_ODM_OPEN &&
> - info.op_mode != RCM_OP_MODE_ODM_SECURE &&
> - info.op_mode != RCM_OP_MODE_PRE_PRODUCTION)
> - error(1, ENODEV, "device is not in developer, open, secure, "
> - "or pre-production mode, cannot flash");
I would rather maintain the sanity check. The set of OP_MODE values
should be quite small, so we should be able to simply add another on
here. Recasting this as a switch might make the code marginally simpler.
Either way, we should update src/rcm.h to add a new RCM_OP_MODE
constant, and dump_platform_info() so that it can print the name of the
relevant other mode(s).
next prev parent reply other threads:[~2015-11-11 17:07 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-09 17:19 [tegrarcm PATCH 0/2] Initial support for secured devices Alban Bedel
[not found] ` <1447089586-24826-1-git-send-email-alban.bedel-RM9K5IK7kjKj5M59NBduVrNAH6kLmebB@public.gmane.org>
2015-11-09 17:19 ` [tegrarcm PATCH 1/2] Remove the operational mode check Alban Bedel
[not found] ` <1447089586-24826-2-git-send-email-alban.bedel-RM9K5IK7kjKj5M59NBduVrNAH6kLmebB@public.gmane.org>
2015-11-11 17:07 ` Stephen Warren [this message]
2015-11-09 17:19 ` [tegrarcm PATCH 2/2] Add support for communicating with secured production devices Alban Bedel
[not found] ` <1447089586-24826-3-git-send-email-alban.bedel-RM9K5IK7kjKj5M59NBduVrNAH6kLmebB@public.gmane.org>
2015-11-11 17:25 ` Stephen Warren
[not found] ` <564379ED.4060503-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2015-11-11 18:04 ` Alban Bedel
2015-11-11 16:55 ` [tegrarcm PATCH 0/2] Initial support for secured devices Stephen Warren
[not found] ` <56437303.7090006-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2015-11-11 18:38 ` Alban Bedel
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=564375C9.9070405@wwwdotorg.org \
--to=swarren-3lzwwm7+weoh9zmkesr00q@public.gmane.org \
--cc=alban.bedel-RM9K5IK7kjKj5M59NBduVrNAH6kLmebB@public.gmane.org \
--cc=amartin-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
--cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=pchiu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
/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 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.