From: Eric Nelson <eric.nelson@boundarydevices.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH V2] i.MX6Q: mx6qsabrelite: Add keypress support to alter boot flow
Date: Mon, 16 Apr 2012 12:28:11 -0700 [thread overview]
Message-ID: <4F8C72CB.4000500@boundarydevices.com> (raw)
In-Reply-To: <201204161929.55214.marex@denx.de>
Thanks for reviewing Marek,
On 04/16/2012 10:29 AM, Marek Vasut wrote:
> Dear Eric Nelson,
>
>> Uses the 'magic_keys' idiom as described in doc/README.kbd:
>> http://lists.denx.de/pipermail/u-boot/2012-April/122502.html
>>
>> Signed-off-by: Eric Nelson<eric.nelson@boundarydevices.com>
>> ---
>> V2 based on suggestion by Wolfgang to follow prior implementations.
>>
>> board/freescale/mx6qsabrelite/mx6qsabrelite.c | 121
>> ++++++++++++++++++++++++- include/configs/mx6qsabrelite.h |
>> 3 +
>> 2 files changed, 122 insertions(+), 2 deletions(-)
>>
>> diff --git a/board/freescale/mx6qsabrelite/mx6qsabrelite.c
>> b/board/freescale/mx6qsabrelite/mx6qsabrelite.c index 1d09a72..9ca46e7
>>
>> <snip>
>>
>> + buf[numpressed] = '\0' ;
>> + return numpressed ;
>
> Delete the space before semicolon please.
>
Okay, but is there a rule here somewhere? There are a bunch of
other spots in this source that have space before semicolon.
>> +}
>> +
>> +static int do_kbd(cmd_tbl_t *cmdtp, int flag, int argc, char * const
>> argv[]) +{
>> + char envvalue[ARRAY_SIZE(buttons)+1];
>> + int numpressed = read_keys(envvalue);
>> + setenv("keybd", envvalue);
>> + return 0 == numpressed ;
>
> Drop yoda condition
>
Okay again, but are yoda conditionals verboten in U-Boot sources?
I find that this style catches typos (inadvertent assignments).
>> +}
>> +
>>
>> <snip>
>>
>> +static void preboot_keys(void)
>> +{
>> + int i, numpressed ;
>> + char keypress[ARRAY_SIZE(buttons)+1];
>> + numpressed = read_keys(keypress);
>> + if (0 != numpressed) {
>
> Yoda ...
>
Got it. I'm replacing some others as well.
>> + char *kbd_magic_keys = getenv("magic_keys");
>> + char *suffix;
>> + /* loop over all magic keys;
>
> Fix comment please?
>
V3 forthcoming.
prev parent reply other threads:[~2012-04-16 19:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <http://lists.denx.de/pipermail/u-boot/2012-March/#119232>
2012-04-16 17:12 ` [U-Boot] [PATCH V2] i.MX6Q: mx6qsabrelite: Add keypress support to alter boot flow Eric Nelson
2012-04-16 17:29 ` Marek Vasut
2012-04-16 19:28 ` Eric Nelson [this message]
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=4F8C72CB.4000500@boundarydevices.com \
--to=eric.nelson@boundarydevices.com \
--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 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.