aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-10-04 12:30:50 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2017-10-04 12:30:50 -0400
commitb7e14164417865e24b6a1b09110b63c01158fc8e (patch)
treecc178532e1fb17249f6ed71dda6764a5c489a804 /lib
parent6c795b30f46ff7efec0039095045c2012416670e (diff)
parent32e57c29e3c038ac802b7cc214a8795a4234055f (diff)
Merge branch 'akpm' (patches from Andrew)
Merge misc fixes from Andrew Morton: "A lot of stuff, sorry about that. A week on a beach, then a bunch of time catching up then more time letting it bake in -next. Shan't do that again!" * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (51 commits) include/linux/fs.h: fix comment about struct address_space checkpatch: fix ignoring cover-letter logic m32r: fix build failure lib/ratelimit.c: use deferred printk() version kernel/params.c: improve STANDARD_PARAM_DEF readability kernel/params.c: fix an overflow in param_attr_show kernel/params.c: fix the maximum length in param_get_string mm/memory_hotplug: define find_{smallest|biggest}_section_pfn as unsigned long mm/memory_hotplug: change pfn_to_section_nr/section_nr_to_pfn macro to inline function kernel/kcmp.c: drop branch leftover typo memremap: add scheduling point to devm_memremap_pages mm, page_alloc: add scheduling point to memmap_init_zone mm, memory_hotplug: add scheduling point to __add_pages lib/idr.c: fix comment for idr_replace() mm: memcontrol: use vmalloc fallback for large kmem memcg arrays kernel/sysctl.c: remove duplicate UINT_MAX check on do_proc_douintvec_conv() include/linux/bitfield.h: remove 32bit from FIELD_GET comment block lib/lz4: make arrays static const, reduces object code size exec: binfmt_misc: kill the onstack iname[BINPRM_BUF_SIZE] array exec: binfmt_misc: fix race between load_misc_binary() and kill_node() ...
Diffstat (limited to 'lib')
-rw-r--r--lib/idr.c4
-rw-r--r--lib/lz4/lz4_decompress.c4
-rw-r--r--lib/ratelimit.c4
3 files changed, 7 insertions, 5 deletions
diff --git a/lib/idr.c b/lib/idr.c
index f9adf4805fd7..edd9b2be1651 100644
--- a/lib/idr.c
+++ b/lib/idr.c
@@ -146,8 +146,8 @@ EXPORT_SYMBOL(idr_get_next_ext);
146 * idr_alloc() and idr_remove() (as long as the ID being removed is not 146 * idr_alloc() and idr_remove() (as long as the ID being removed is not
147 * the one being replaced!). 147 * the one being replaced!).
148 * 148 *
149 * Returns: 0 on success. %-ENOENT indicates that @id was not found. 149 * Returns: the old value on success. %-ENOENT indicates that @id was not
150 * %-EINVAL indicates that @id or @ptr were not valid. 150 * found. %-EINVAL indicates that @id or @ptr were not valid.
151 */ 151 */
152void *idr_replace(struct idr *idr, void *ptr, int id) 152void *idr_replace(struct idr *idr, void *ptr, int id)
153{ 153{
diff --git a/lib/lz4/lz4_decompress.c b/lib/lz4/lz4_decompress.c
index bd3574312b82..141734d255e4 100644
--- a/lib/lz4/lz4_decompress.c
+++ b/lib/lz4/lz4_decompress.c
@@ -85,8 +85,8 @@ static FORCE_INLINE int LZ4_decompress_generic(
85 const BYTE * const lowLimit = lowPrefix - dictSize; 85 const BYTE * const lowLimit = lowPrefix - dictSize;
86 86
87 const BYTE * const dictEnd = (const BYTE *)dictStart + dictSize; 87 const BYTE * const dictEnd = (const BYTE *)dictStart + dictSize;
88 const unsigned int dec32table[] = { 0, 1, 2, 1, 4, 4, 4, 4 }; 88 static const unsigned int dec32table[] = { 0, 1, 2, 1, 4, 4, 4, 4 };
89 const int dec64table[] = { 0, 0, 0, -1, 0, 1, 2, 3 }; 89 static const int dec64table[] = { 0, 0, 0, -1, 0, 1, 2, 3 };
90 90
91 const int safeDecode = (endOnInput == endOnInputSize); 91 const int safeDecode = (endOnInput == endOnInputSize);
92 const int checkOffset = ((safeDecode) && (dictSize < (int)(64 * KB))); 92 const int checkOffset = ((safeDecode) && (dictSize < (int)(64 * KB)));
diff --git a/lib/ratelimit.c b/lib/ratelimit.c
index 08f8043cac61..d01f47135239 100644
--- a/lib/ratelimit.c
+++ b/lib/ratelimit.c
@@ -48,7 +48,9 @@ int ___ratelimit(struct ratelimit_state *rs, const char *func)
48 if (time_is_before_jiffies(rs->begin + rs->interval)) { 48 if (time_is_before_jiffies(rs->begin + rs->interval)) {
49 if (rs->missed) { 49 if (rs->missed) {
50 if (!(rs->flags & RATELIMIT_MSG_ON_RELEASE)) { 50 if (!(rs->flags & RATELIMIT_MSG_ON_RELEASE)) {
51 pr_warn("%s: %d callbacks suppressed\n", func, rs->missed); 51 printk_deferred(KERN_WARNING
52 "%s: %d callbacks suppressed\n",
53 func, rs->missed);
52 rs->missed = 0; 54 rs->missed = 0;
53 } 55 }
54 } 56 }