02 Apr, 2013
1 commit
-
'bool' is defined in random places. This patch consolidates them into a
single header file include/linux/types.h, using stdbool.h introduced in C99.All other #define, typedef and enum are removed. They are all consistent with
true = 1, false = 0.Replace FALSE, False with false. Replace TRUE, True with true.
Skip *.py, *.php, lib/* files.Signed-off-by: York Sun
10 Oct, 2011
1 commit
-
While adding asm/cache.h to common.h for PPC targets, I got an
error about multiple definitions of some DBSR_ macros. While
scanning these defines, I noticed that some where defined not
correctly for all PPC variants. So I removed all unused defines,
and corrected the ones really used by bedbug (book-e vs. ppc40x).Signed-off-by: Stefan Roese
Cc: Wolfgang Denk
10 Sep, 2011
1 commit
-
Commit 21726a7 "Add assert() for debug assertions" caused build
warnings for many systems:In file included from bedbug.c:6:
/home/wd/git/u-boot/work/include/bedbug/bedbug.h:24:1: warning: "assert" redefined
In file included from bedbug.c:3:
/home/wd/git/u-boot/work/include/common.h:144:1: warning: this is the location of the previous definition
In file included from cmd_bedbug.c:10:
/home/wd/git/u-boot/work/include/bedbug/bedbug.h:24:1: warning: "assert" redefined
In file included from cmd_bedbug.c:5:
/home/wd/git/u-boot/work/include/common.h:144:1: warning: this is the location of the previous definitionSigned-off-by: Wolfgang Denk
Cc: Simon Glass
Acked-by: Simon Glass
05 Jul, 2010
1 commit
-
The hush shell dynamically allocates (and re-allocates) memory for the
argument strings in the "char *argv[]" argument vector passed to
commands. Any code that modifies these pointers will cause serious
corruption of the malloc data structures and crash U-Boot, so make
sure the compiler can check that no such modifications are being done
by changing the code into "char * const argv[]".This modification is the result of debugging a strange crash caused
after adding a new command, which used the following argument
processing code which has been working perfectly fine in all Unix
systems since version 6 - but not so in U-Boot:int main (int argc, char **argv)
{
while (--argc > 0 && **++argv == '-') {
/* ====> */ while (*++*argv) {
switch (**argv) {
case 'd':
debug++;
break;
...
default:
usage ();
}
}
}
...
}The line marked "====>" will corrupt the malloc data structures and
usually cause U-Boot to crash when the next command gets executed by
the shell. With the modification, the compiler will prevent this with
an
error: increment of read-only location '*argv'N.B.: The code above can be trivially rewritten like this:
while (--argc > 0 && **++argv == '-') {
char *arg = *argv;
while (*++arg) {
switch (*arg) {
...Signed-off-by: Wolfgang Denk
Acked-by: Mike Frysinger
21 May, 2008
1 commit
-
This commit gets rid of a huge amount of silly white-space issues.
Especially, all sequences of SPACEs followed by TAB characters get
removed (unless they appear in print statements).Also remove all embedded "vim:" and "vi:" statements which hide
indentation problems.Signed-off-by: Wolfgang Denk
28 Jun, 2003
1 commit
-
- remove trailing white space, trailing empty lines, C++ comments, etc.
- split cmd_boot.c (separate cmd_bdinfo.c and cmd_load.c)* Patches by Kenneth Johansson, 25 Jun 2003:
- major rework of command structure
(work done mostly by Michal Cendrowski and Joakim Kristiansen)
17 Aug, 2002
1 commit
09 Mar, 2002
1 commit