From 76e8402619cf777a3adae9cd70e56a848a9bf952 Mon Sep 17 00:00:00 2001 From: Kyle McMartin Date: Thu, 21 Feb 2013 16:43:04 -0800 Subject: lib/Kconfig.debug: unhide CONFIG_PANIC_ON_OOPS CONFIG_EXPERT doesn't really make sense, and hides it unintentionally. Remove superfluous "default n" pointed out by Ingo as well. Signed-off-by: Kyle McMartin Acked-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- lib/Kconfig.debug | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index a1714c8..be767fd 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -243,8 +243,7 @@ config BOOTPARAM_SOFTLOCKUP_PANIC_VALUE default 1 if BOOTPARAM_SOFTLOCKUP_PANIC config PANIC_ON_OOPS - bool "Panic on Oops" if EXPERT - default n + bool "Panic on Oops" help Say Y here to enable the kernel to panic when it oopses. This has the same effect as setting oops=panic on the kernel command -- cgit v1.1 From 7d7992108d02aa92ad4c77e5d9ce14088c942e75 Mon Sep 17 00:00:00 2001 From: Stepan Moskovchenko Date: Thu, 21 Feb 2013 16:43:09 -0800 Subject: lib/vsprintf.c: add %pa format specifier for phys_addr_t types Add the %pa format specifier for printing a phys_addr_t type and its derivative types (such as resource_size_t), since the physical address size on some platforms can vary based on build options, regardless of the native integer type. Signed-off-by: Stepan Moskovchenko Cc: Rob Landley Cc: George Spelvin Cc: Andy Shevchenko Cc: Stephen Boyd Cc: Andrei Emeltchenko Cc: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- lib/vsprintf.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lib') diff --git a/lib/vsprintf.c b/lib/vsprintf.c index fab33a9..0d62fd7 100644 --- a/lib/vsprintf.c +++ b/lib/vsprintf.c @@ -1030,6 +1030,7 @@ int kptr_restrict __read_mostly; * N no separator * The maximum supported length is 64 bytes of the input. Consider * to use print_hex_dump() for the larger input. + * - 'a' For a phys_addr_t type and its derivative types (passed by reference) * * Note: The difference between 'S' and 'F' is that on ia64 and ppc64 * function pointers are really function descriptors, which contain a @@ -1120,6 +1121,12 @@ char *pointer(const char *fmt, char *buf, char *end, void *ptr, return netdev_feature_string(buf, end, ptr, spec); } break; + case 'a': + spec.flags |= SPECIAL | SMALL | ZEROPAD; + spec.field_width = sizeof(phys_addr_t) * 2 + 2; + spec.base = 16; + return number(buf, end, + (unsigned long long) *((phys_addr_t *)ptr), spec); } spec.flags |= SMALL; if (spec.field_width == -1) { -- cgit v1.1 From 53769627b93d5b1d04178fd1fb2558d933ee9e81 Mon Sep 17 00:00:00 2001 From: Namjae Jeon Date: Thu, 21 Feb 2013 16:44:08 -0800 Subject: lib/parser.c: fix up comments for valid return values from match_number match_number() has return values of -ENOMEM, -EINVAL and -ERANGE. So, for all the functions calling match_number, the return value should include these values. Fix up the comments to reflect the correct values. Signed-off-by: Namjae Jeon Signed-off-by: Amit Sahrawat Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- lib/parser.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/parser.c b/lib/parser.c index 52cfa69..807b2aa 100644 --- a/lib/parser.c +++ b/lib/parser.c @@ -157,7 +157,7 @@ static int match_number(substring_t *s, int *result, int base) * * Description: Attempts to parse the &substring_t @s as a decimal integer. On * success, sets @result to the integer represented by the string and returns 0. - * Returns either -ENOMEM or -EINVAL on failure. + * Returns -ENOMEM, -EINVAL, or -ERANGE on failure. */ int match_int(substring_t *s, int *result) { @@ -171,7 +171,7 @@ int match_int(substring_t *s, int *result) * * Description: Attempts to parse the &substring_t @s as an octal integer. On * success, sets @result to the integer represented by the string and returns - * 0. Returns either -ENOMEM or -EINVAL on failure. + * 0. Returns -ENOMEM, -EINVAL, or -ERANGE on failure. */ int match_octal(substring_t *s, int *result) { @@ -185,7 +185,7 @@ int match_octal(substring_t *s, int *result) * * Description: Attempts to parse the &substring_t @s as a hexadecimal integer. * On success, sets @result to the integer represented by the string and - * returns 0. Returns either -ENOMEM or -EINVAL on failure. + * returns 0. Returns -ENOMEM, -EINVAL, or -ERANGE on failure. */ int match_hex(substring_t *s, int *result) { -- cgit v1.1 From 9d7496296590d57e0745286711aa31ed1b828917 Mon Sep 17 00:00:00 2001 From: Florian Fainelli Date: Thu, 21 Feb 2013 16:44:10 -0800 Subject: decompressors: group XZ_DEC_* symbols under an if XZ_BCJ / endif Group all architecture-specific BCJ filter configuration symbols under an if XZ_BCJ / endif statement. Signed-off-by: Florian Fainelli Acked-by: Lasse Collin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- lib/xz/Kconfig | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'lib') diff --git a/lib/xz/Kconfig b/lib/xz/Kconfig index 60a6088..12d2d777 100644 --- a/lib/xz/Kconfig +++ b/lib/xz/Kconfig @@ -6,42 +6,40 @@ config XZ_DEC the .xz file format as the container. For integrity checking, CRC32 is supported. See Documentation/xz.txt for more information. +if XZ_DEC + config XZ_DEC_X86 bool "x86 BCJ filter decoder" if EXPERT default y - depends on XZ_DEC select XZ_DEC_BCJ config XZ_DEC_POWERPC bool "PowerPC BCJ filter decoder" if EXPERT default y - depends on XZ_DEC select XZ_DEC_BCJ config XZ_DEC_IA64 bool "IA-64 BCJ filter decoder" if EXPERT default y - depends on XZ_DEC select XZ_DEC_BCJ config XZ_DEC_ARM bool "ARM BCJ filter decoder" if EXPERT default y - depends on XZ_DEC select XZ_DEC_BCJ config XZ_DEC_ARMTHUMB bool "ARM-Thumb BCJ filter decoder" if EXPERT default y - depends on XZ_DEC select XZ_DEC_BCJ config XZ_DEC_SPARC bool "SPARC BCJ filter decoder" if EXPERT default y - depends on XZ_DEC select XZ_DEC_BCJ +endif + config XZ_DEC_BCJ bool default n -- cgit v1.1 From 64dbfb444c150f5b64979323a197dedc2ec3e02c Mon Sep 17 00:00:00 2001 From: Florian Fainelli Date: Thu, 21 Feb 2013 16:44:11 -0800 Subject: decompressors: drop dependency on CONFIG_EXPERT Remove the XZ_DEC_* depedencey on CONFIG_EXPERT as recommended by Lasse Colin. Signed-off-by: Florian Fainelli Acked-by: Lasse Collin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- lib/xz/Kconfig | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'lib') diff --git a/lib/xz/Kconfig b/lib/xz/Kconfig index 12d2d777..8d46470 100644 --- a/lib/xz/Kconfig +++ b/lib/xz/Kconfig @@ -9,32 +9,32 @@ config XZ_DEC if XZ_DEC config XZ_DEC_X86 - bool "x86 BCJ filter decoder" if EXPERT + bool "x86 BCJ filter decoder" default y select XZ_DEC_BCJ config XZ_DEC_POWERPC - bool "PowerPC BCJ filter decoder" if EXPERT + bool "PowerPC BCJ filter decoder" default y select XZ_DEC_BCJ config XZ_DEC_IA64 - bool "IA-64 BCJ filter decoder" if EXPERT + bool "IA-64 BCJ filter decoder" default y select XZ_DEC_BCJ config XZ_DEC_ARM - bool "ARM BCJ filter decoder" if EXPERT + bool "ARM BCJ filter decoder" default y select XZ_DEC_BCJ config XZ_DEC_ARMTHUMB - bool "ARM-Thumb BCJ filter decoder" if EXPERT + bool "ARM-Thumb BCJ filter decoder" default y select XZ_DEC_BCJ config XZ_DEC_SPARC - bool "SPARC BCJ filter decoder" if EXPERT + bool "SPARC BCJ filter decoder" default y select XZ_DEC_BCJ -- cgit v1.1 From 5dc49c75a26b99e86a18441e0b64c1f7c7c6a500 Mon Sep 17 00:00:00 2001 From: Florian Fainelli Date: Thu, 21 Feb 2013 16:44:12 -0800 Subject: decompressors: make the default XZ_DEC_* config match the selected architecture Change the defautl XZ_DEC_* config symbol to match the configured architecture. It is perfectly legitimate to support multiple XZ BCJ filters for different architectures (e.g.: to mount foreign squashfs/xz compressed filesystems), it is however more natural not to select them all by default, but only the one matching the configured architecture. Signed-off-by: Florian Fainelli Acked-by: Lasse Collin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- lib/xz/Kconfig | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'lib') diff --git a/lib/xz/Kconfig b/lib/xz/Kconfig index 8d46470..82a04d7 100644 --- a/lib/xz/Kconfig +++ b/lib/xz/Kconfig @@ -10,32 +10,32 @@ if XZ_DEC config XZ_DEC_X86 bool "x86 BCJ filter decoder" - default y + default y if X86 select XZ_DEC_BCJ config XZ_DEC_POWERPC bool "PowerPC BCJ filter decoder" - default y + default y if POWERPC select XZ_DEC_BCJ config XZ_DEC_IA64 bool "IA-64 BCJ filter decoder" - default y + default y if IA64 select XZ_DEC_BCJ config XZ_DEC_ARM bool "ARM BCJ filter decoder" - default y + default y if ARM select XZ_DEC_BCJ config XZ_DEC_ARMTHUMB bool "ARM-Thumb BCJ filter decoder" - default y + default y if (ARM && ARM_THUMB) select XZ_DEC_BCJ config XZ_DEC_SPARC bool "SPARC BCJ filter decoder" - default y + default y if SPARC select XZ_DEC_BCJ endif -- cgit v1.1