diff options
author | Takashi Iwai <tiwai@suse.de> | 2014-11-17 16:16:03 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2014-11-17 16:16:03 -0500 |
commit | 39ae97ea4b773be81bae9eec08ed1e5c53606c1a (patch) | |
tree | 4d55635fb46a86b970c1491cc529eb2770bf3076 /lib | |
parent | a358a0ef861dae6f8330fb034aaa43adae71ebc1 (diff) | |
parent | cf9a7f7823c67243da44da2ac47ca944a3108282 (diff) |
Merge tag 'asoc-v3.18-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Fixes for v3.18
As well as the usual driver fixes there's a few other things here:
One is a fix for a race in DPCM which is unfortuantely a rather large
diffstat, this is the result of growing usage of the mainline code and
hence more detailed testing so I'm relatively happy.
The other is a fix for non-DT machine driver matching following some of
the componentization work which is much more focused.
Both have had a while to cook in -next.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/bitmap.c | 8 | ||||
-rw-r--r-- | lib/rhashtable.c | 10 | ||||
-rw-r--r-- | lib/scatterlist.c | 6 |
3 files changed, 14 insertions, 10 deletions
diff --git a/lib/bitmap.c b/lib/bitmap.c index cd250a2e14cb..b499ab6ada29 100644 --- a/lib/bitmap.c +++ b/lib/bitmap.c | |||
@@ -131,7 +131,9 @@ void __bitmap_shift_right(unsigned long *dst, | |||
131 | lower = src[off + k]; | 131 | lower = src[off + k]; |
132 | if (left && off + k == lim - 1) | 132 | if (left && off + k == lim - 1) |
133 | lower &= mask; | 133 | lower &= mask; |
134 | dst[k] = upper << (BITS_PER_LONG - rem) | lower >> rem; | 134 | dst[k] = lower >> rem; |
135 | if (rem) | ||
136 | dst[k] |= upper << (BITS_PER_LONG - rem); | ||
135 | if (left && k == lim - 1) | 137 | if (left && k == lim - 1) |
136 | dst[k] &= mask; | 138 | dst[k] &= mask; |
137 | } | 139 | } |
@@ -172,7 +174,9 @@ void __bitmap_shift_left(unsigned long *dst, | |||
172 | upper = src[k]; | 174 | upper = src[k]; |
173 | if (left && k == lim - 1) | 175 | if (left && k == lim - 1) |
174 | upper &= (1UL << left) - 1; | 176 | upper &= (1UL << left) - 1; |
175 | dst[k + off] = lower >> (BITS_PER_LONG - rem) | upper << rem; | 177 | dst[k + off] = upper << rem; |
178 | if (rem) | ||
179 | dst[k + off] |= lower >> (BITS_PER_LONG - rem); | ||
176 | if (left && k + off == lim - 1) | 180 | if (left && k + off == lim - 1) |
177 | dst[k + off] &= (1UL << left) - 1; | 181 | dst[k + off] &= (1UL << left) - 1; |
178 | } | 182 | } |
diff --git a/lib/rhashtable.c b/lib/rhashtable.c index 081be3ba9ea8..624a0b7c05ef 100644 --- a/lib/rhashtable.c +++ b/lib/rhashtable.c | |||
@@ -230,7 +230,7 @@ int rhashtable_expand(struct rhashtable *ht, gfp_t flags) | |||
230 | ht->shift++; | 230 | ht->shift++; |
231 | 231 | ||
232 | /* For each new bucket, search the corresponding old bucket | 232 | /* For each new bucket, search the corresponding old bucket |
233 | * for the first entry that hashes to the new bucket, and | 233 | * for the first entry that hashes to the new bucket, and |
234 | * link the new bucket to that entry. Since all the entries | 234 | * link the new bucket to that entry. Since all the entries |
235 | * which will end up in the new bucket appear in the same | 235 | * which will end up in the new bucket appear in the same |
236 | * old bucket, this constructs an entirely valid new hash | 236 | * old bucket, this constructs an entirely valid new hash |
@@ -248,8 +248,8 @@ int rhashtable_expand(struct rhashtable *ht, gfp_t flags) | |||
248 | } | 248 | } |
249 | 249 | ||
250 | /* Publish the new table pointer. Lookups may now traverse | 250 | /* Publish the new table pointer. Lookups may now traverse |
251 | * the new table, but they will not benefit from any | 251 | * the new table, but they will not benefit from any |
252 | * additional efficiency until later steps unzip the buckets. | 252 | * additional efficiency until later steps unzip the buckets. |
253 | */ | 253 | */ |
254 | rcu_assign_pointer(ht->tbl, new_tbl); | 254 | rcu_assign_pointer(ht->tbl, new_tbl); |
255 | 255 | ||
@@ -306,14 +306,14 @@ int rhashtable_shrink(struct rhashtable *ht, gfp_t flags) | |||
306 | 306 | ||
307 | ht->shift--; | 307 | ht->shift--; |
308 | 308 | ||
309 | /* Link each bucket in the new table to the first bucket | 309 | /* Link each bucket in the new table to the first bucket |
310 | * in the old table that contains entries which will hash | 310 | * in the old table that contains entries which will hash |
311 | * to the new bucket. | 311 | * to the new bucket. |
312 | */ | 312 | */ |
313 | for (i = 0; i < ntbl->size; i++) { | 313 | for (i = 0; i < ntbl->size; i++) { |
314 | ntbl->buckets[i] = tbl->buckets[i]; | 314 | ntbl->buckets[i] = tbl->buckets[i]; |
315 | 315 | ||
316 | /* Link each bucket in the new table to the first bucket | 316 | /* Link each bucket in the new table to the first bucket |
317 | * in the old table that contains entries which will hash | 317 | * in the old table that contains entries which will hash |
318 | * to the new bucket. | 318 | * to the new bucket. |
319 | */ | 319 | */ |
diff --git a/lib/scatterlist.c b/lib/scatterlist.c index 9cdf62f8accd..c9f2e8c6ccc9 100644 --- a/lib/scatterlist.c +++ b/lib/scatterlist.c | |||
@@ -203,10 +203,10 @@ void __sg_free_table(struct sg_table *table, unsigned int max_ents, | |||
203 | } | 203 | } |
204 | 204 | ||
205 | table->orig_nents -= sg_size; | 205 | table->orig_nents -= sg_size; |
206 | if (!skip_first_chunk) { | 206 | if (skip_first_chunk) |
207 | free_fn(sgl, alloc_size); | ||
208 | skip_first_chunk = false; | 207 | skip_first_chunk = false; |
209 | } | 208 | else |
209 | free_fn(sgl, alloc_size); | ||
210 | sgl = next; | 210 | sgl = next; |
211 | } | 211 | } |
212 | 212 | ||