diff options
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/debugobjects.c | 14 | ||||
| -rw-r--r-- | lib/dynamic_queue_limits.c | 1 | ||||
| -rw-r--r-- | lib/vsprintf.c | 12 |
3 files changed, 13 insertions, 14 deletions
diff --git a/lib/debugobjects.c b/lib/debugobjects.c index 77cb245f8e7b..0ab9ae8057f0 100644 --- a/lib/debugobjects.c +++ b/lib/debugobjects.c | |||
| @@ -818,17 +818,9 @@ static int __init fixup_activate(void *addr, enum debug_obj_state state) | |||
| 818 | if (obj->static_init == 1) { | 818 | if (obj->static_init == 1) { |
| 819 | debug_object_init(obj, &descr_type_test); | 819 | debug_object_init(obj, &descr_type_test); |
| 820 | debug_object_activate(obj, &descr_type_test); | 820 | debug_object_activate(obj, &descr_type_test); |
| 821 | /* | 821 | return 0; |
| 822 | * Real code should return 0 here ! This is | ||
| 823 | * not a fixup of some bad behaviour. We | ||
| 824 | * merily call the debug_init function to keep | ||
| 825 | * track of the object. | ||
| 826 | */ | ||
| 827 | return 1; | ||
| 828 | } else { | ||
| 829 | /* Real code needs to emit a warning here */ | ||
| 830 | } | 822 | } |
| 831 | return 0; | 823 | return 1; |
| 832 | 824 | ||
| 833 | case ODEBUG_STATE_ACTIVE: | 825 | case ODEBUG_STATE_ACTIVE: |
| 834 | debug_object_deactivate(obj, &descr_type_test); | 826 | debug_object_deactivate(obj, &descr_type_test); |
| @@ -967,7 +959,7 @@ static void __init debug_objects_selftest(void) | |||
| 967 | 959 | ||
| 968 | obj.static_init = 1; | 960 | obj.static_init = 1; |
| 969 | debug_object_activate(&obj, &descr_type_test); | 961 | debug_object_activate(&obj, &descr_type_test); |
| 970 | if (check_results(&obj, ODEBUG_STATE_ACTIVE, ++fixups, warnings)) | 962 | if (check_results(&obj, ODEBUG_STATE_ACTIVE, fixups, warnings)) |
| 971 | goto out; | 963 | goto out; |
| 972 | debug_object_init(&obj, &descr_type_test); | 964 | debug_object_init(&obj, &descr_type_test); |
| 973 | if (check_results(&obj, ODEBUG_STATE_INIT, ++fixups, ++warnings)) | 965 | if (check_results(&obj, ODEBUG_STATE_INIT, ++fixups, ++warnings)) |
diff --git a/lib/dynamic_queue_limits.c b/lib/dynamic_queue_limits.c index 3d1bdcdd7db4..6ab4587d052b 100644 --- a/lib/dynamic_queue_limits.c +++ b/lib/dynamic_queue_limits.c | |||
| @@ -7,6 +7,7 @@ | |||
| 7 | #include <linux/types.h> | 7 | #include <linux/types.h> |
| 8 | #include <linux/ctype.h> | 8 | #include <linux/ctype.h> |
| 9 | #include <linux/kernel.h> | 9 | #include <linux/kernel.h> |
| 10 | #include <linux/jiffies.h> | ||
| 10 | #include <linux/dynamic_queue_limits.h> | 11 | #include <linux/dynamic_queue_limits.h> |
| 11 | 12 | ||
| 12 | #define POSDIFF(A, B) ((A) > (B) ? (A) - (B) : 0) | 13 | #define POSDIFF(A, B) ((A) > (B) ? (A) - (B) : 0) |
diff --git a/lib/vsprintf.c b/lib/vsprintf.c index 8e75003d62f6..38e612e66da5 100644 --- a/lib/vsprintf.c +++ b/lib/vsprintf.c | |||
| @@ -891,9 +891,15 @@ char *pointer(const char *fmt, char *buf, char *end, void *ptr, | |||
| 891 | case 'U': | 891 | case 'U': |
| 892 | return uuid_string(buf, end, ptr, spec, fmt); | 892 | return uuid_string(buf, end, ptr, spec, fmt); |
| 893 | case 'V': | 893 | case 'V': |
| 894 | return buf + vsnprintf(buf, end > buf ? end - buf : 0, | 894 | { |
| 895 | ((struct va_format *)ptr)->fmt, | 895 | va_list va; |
| 896 | *(((struct va_format *)ptr)->va)); | 896 | |
| 897 | va_copy(va, *((struct va_format *)ptr)->va); | ||
| 898 | buf += vsnprintf(buf, end > buf ? end - buf : 0, | ||
| 899 | ((struct va_format *)ptr)->fmt, va); | ||
| 900 | va_end(va); | ||
| 901 | return buf; | ||
| 902 | } | ||
| 897 | case 'K': | 903 | case 'K': |
| 898 | /* | 904 | /* |
| 899 | * %pK cannot be used in IRQ context because its test | 905 | * %pK cannot be used in IRQ context because its test |
