diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-04-13 20:17:32 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-04-13 20:17:32 -0400 |
commit | c4be50eee2bd4d50e0f0ca58776f685c08de69c3 (patch) | |
tree | 819da448b2916a293e5c600c95d72db83ec77017 /lib | |
parent | 42e3a58b028e0e51746f596a11abfec01cd1c5c4 (diff) | |
parent | c9e15f25f514a76d906be01e621f400cdee94558 (diff) |
Merge tag 'driver-core-4.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core
Pull driver core updates from Greg KH:
"Here's the driver-core / kobject / lz4 tree update for 4.1-rc1.
Everything here has been in linux-next for a while with no reported
issues. It's mostly just coding style cleanups, with other minor
changes in here as well, nothing big"
* tag 'driver-core-4.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (32 commits)
debugfs: allow bad parent pointers to be passed in
stable_kernel_rules: Add clause about specification of kernel versions to patch.
kobject: WARN as tip when call kobject_get() to a kobject not initialized
lib/lz4: Pull out constant tables
drivers: platform: parse IRQ flags from resources
driver core: Make probe deferral more quiet
drivers/core/of: Add symlink to device-tree from devices with an OF node
device: Add dev_of_node() accessor
drivers: base: fw: fix ret value when loading fw
firmware: Avoid manual device_create_file() calls
drivers/base: cacheinfo: validate device node for all the caches
drivers/base: use tabs where possible in code indentation
driver core: add missing blank line after declaration
drivers: base: node: Delete space after pointer declaration
drivers: base: memory: Use tabs instead of spaces
firmware_class: Fix whitespace and indentation
drivers: base: dma-mapping: Erase blank space after pointer
drivers: base: class: Add a blank line after declarations
attribute_container: fix missing blank lines after declarations
drivers: base: memory: Fix switch indent
...
Diffstat (limited to 'lib')
-rw-r--r-- | lib/kobject.c | 7 | ||||
-rw-r--r-- | lib/lz4/lz4_decompress.c | 18 |
2 files changed, 13 insertions, 12 deletions
diff --git a/lib/kobject.c b/lib/kobject.c index 03d4ab349fa7..3b841b97fccd 100644 --- a/lib/kobject.c +++ b/lib/kobject.c | |||
@@ -576,8 +576,13 @@ void kobject_del(struct kobject *kobj) | |||
576 | */ | 576 | */ |
577 | struct kobject *kobject_get(struct kobject *kobj) | 577 | struct kobject *kobject_get(struct kobject *kobj) |
578 | { | 578 | { |
579 | if (kobj) | 579 | if (kobj) { |
580 | if (!kobj->state_initialized) | ||
581 | WARN(1, KERN_WARNING "kobject: '%s' (%p): is not " | ||
582 | "initialized, yet kobject_get() is being " | ||
583 | "called.\n", kobject_name(kobj), kobj); | ||
580 | kref_get(&kobj->kref); | 584 | kref_get(&kobj->kref); |
585 | } | ||
581 | return kobj; | 586 | return kobj; |
582 | } | 587 | } |
583 | 588 | ||
diff --git a/lib/lz4/lz4_decompress.c b/lib/lz4/lz4_decompress.c index f0f5c5c3de12..26cc6029b280 100644 --- a/lib/lz4/lz4_decompress.c +++ b/lib/lz4/lz4_decompress.c | |||
@@ -47,6 +47,11 @@ | |||
47 | 47 | ||
48 | #include "lz4defs.h" | 48 | #include "lz4defs.h" |
49 | 49 | ||
50 | static const int dec32table[] = {0, 3, 2, 3, 0, 0, 0, 0}; | ||
51 | #if LZ4_ARCH64 | ||
52 | static const int dec64table[] = {0, 0, 0, -1, 0, 1, 2, 3}; | ||
53 | #endif | ||
54 | |||
50 | static int lz4_uncompress(const char *source, char *dest, int osize) | 55 | static int lz4_uncompress(const char *source, char *dest, int osize) |
51 | { | 56 | { |
52 | const BYTE *ip = (const BYTE *) source; | 57 | const BYTE *ip = (const BYTE *) source; |
@@ -56,10 +61,6 @@ static int lz4_uncompress(const char *source, char *dest, int osize) | |||
56 | BYTE *cpy; | 61 | BYTE *cpy; |
57 | unsigned token; | 62 | unsigned token; |
58 | size_t length; | 63 | size_t length; |
59 | size_t dec32table[] = {0, 3, 2, 3, 0, 0, 0, 0}; | ||
60 | #if LZ4_ARCH64 | ||
61 | size_t dec64table[] = {0, 0, 0, -1, 0, 1, 2, 3}; | ||
62 | #endif | ||
63 | 64 | ||
64 | while (1) { | 65 | while (1) { |
65 | 66 | ||
@@ -116,7 +117,7 @@ static int lz4_uncompress(const char *source, char *dest, int osize) | |||
116 | /* copy repeated sequence */ | 117 | /* copy repeated sequence */ |
117 | if (unlikely((op - ref) < STEPSIZE)) { | 118 | if (unlikely((op - ref) < STEPSIZE)) { |
118 | #if LZ4_ARCH64 | 119 | #if LZ4_ARCH64 |
119 | size_t dec64 = dec64table[op - ref]; | 120 | int dec64 = dec64table[op - ref]; |
120 | #else | 121 | #else |
121 | const int dec64 = 0; | 122 | const int dec64 = 0; |
122 | #endif | 123 | #endif |
@@ -177,11 +178,6 @@ static int lz4_uncompress_unknownoutputsize(const char *source, char *dest, | |||
177 | BYTE * const oend = op + maxoutputsize; | 178 | BYTE * const oend = op + maxoutputsize; |
178 | BYTE *cpy; | 179 | BYTE *cpy; |
179 | 180 | ||
180 | size_t dec32table[] = {0, 3, 2, 3, 0, 0, 0, 0}; | ||
181 | #if LZ4_ARCH64 | ||
182 | size_t dec64table[] = {0, 0, 0, -1, 0, 1, 2, 3}; | ||
183 | #endif | ||
184 | |||
185 | /* Main Loop */ | 181 | /* Main Loop */ |
186 | while (ip < iend) { | 182 | while (ip < iend) { |
187 | 183 | ||
@@ -249,7 +245,7 @@ static int lz4_uncompress_unknownoutputsize(const char *source, char *dest, | |||
249 | /* copy repeated sequence */ | 245 | /* copy repeated sequence */ |
250 | if (unlikely((op - ref) < STEPSIZE)) { | 246 | if (unlikely((op - ref) < STEPSIZE)) { |
251 | #if LZ4_ARCH64 | 247 | #if LZ4_ARCH64 |
252 | size_t dec64 = dec64table[op - ref]; | 248 | int dec64 = dec64table[op - ref]; |
253 | #else | 249 | #else |
254 | const int dec64 = 0; | 250 | const int dec64 = 0; |
255 | #endif | 251 | #endif |