From 7bcae82621df080a35cb5e708ef333a821effd96 Mon Sep 17 00:00:00 2001 From: Randy Dunlap Date: Mon, 27 Feb 2017 14:28:09 -0800 Subject: lib/fonts/Kconfig: keep non-Sparc fonts listed together Keep fonts together and indented (in menu) as much as possible. This moves the Sparc font choices to the end of the menu since they have different dependencies. Link: http://lkml.kernel.org/r/de6d8977-c6d6-a82d-c953-f2a2fefdb8a5@infradead.org Signed-off-by: Randy Dunlap Cc: Geert Uytterhoeven Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- lib/fonts/Kconfig | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'lib') diff --git a/lib/fonts/Kconfig b/lib/fonts/Kconfig index e77dfe00de36..8fa0791e8a1e 100644 --- a/lib/fonts/Kconfig +++ b/lib/fonts/Kconfig @@ -87,6 +87,14 @@ config FONT_6x10 embedded devices with a 320x240 screen, to get a reasonable number of characters (53x24) that are still at a readable size. +config FONT_10x18 + bool "console 10x18 font (not supported by all drivers)" if FONTS + depends on FRAMEBUFFER_CONSOLE + help + This is a high resolution console font for machines with very + big letters. It fits between the sun 12x22 and the normal 8x16 font. + If other fonts are too big or too small for you, say Y, otherwise say N. + config FONT_SUN8x16 bool "Sparc console 8x16 font" depends on FRAMEBUFFER_CONSOLE && (!SPARC && FONTS || SPARC) @@ -101,14 +109,6 @@ config FONT_SUN12x22 big letters (like the letters used in the SPARC PROM). If the standard font is unreadable for you, say Y, otherwise say N. -config FONT_10x18 - bool "console 10x18 font (not supported by all drivers)" if FONTS - depends on FRAMEBUFFER_CONSOLE - help - This is a high resolution console font for machines with very - big letters. It fits between the sun 12x22 and the normal 8x16 font. - If other fonts are too big or too small for you, say Y, otherwise say N. - config FONT_AUTOSELECT def_bool y depends on !FONT_8x8 -- cgit From 1d5210ef706523529d3cc16fd70be0a466253466 Mon Sep 17 00:00:00 2001 From: Gilad Ben-Yossef Date: Mon, 27 Feb 2017 14:28:27 -0800 Subject: scatterlist: reorder compound boolean expression Test the cheaper boolean expression with no side effects first. Link: http://lkml.kernel.org/r/1486040150-14109-2-git-send-email-gilad@benyossef.com Signed-off-by: Gilad Ben-Yossef Cc: Jens Axboe Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- lib/scatterlist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/scatterlist.c b/lib/scatterlist.c index 004fc70fc56a..393920fddcb9 100644 --- a/lib/scatterlist.c +++ b/lib/scatterlist.c @@ -666,7 +666,7 @@ size_t sg_copy_buffer(struct scatterlist *sgl, unsigned int nents, void *buf, local_irq_save(flags); - while (sg_miter_next(&miter) && offset < buflen) { + while ((offset < buflen) && sg_miter_next(&miter)) { unsigned int len; len = min(miter.length, buflen - offset); -- cgit From d31712009709774506e536a3cc1f7c512f550a0c Mon Sep 17 00:00:00 2001 From: Gilad Ben-Yossef Date: Mon, 27 Feb 2017 14:28:29 -0800 Subject: scatterlist: do not disable IRQs in sg_copy_buffer Commit 50bed2e2862a ("sg: disable interrupts inside sg_copy_buffer") introduced disabling interrupts in sg_copy_buffer() since atomic uses of miter required it due to use of kmap_atomic(). However, as commit 8290e2d2dcbf ("scatterlist: atomic sg_mapping_iter() no longer needs disabled IRQs") acknowledges disabling interrupts is no longer needed for calls to kmap_atomic() and therefore unneeded for miter ops either, so remove it from sg_copy_buffer(). Link: http://lkml.kernel.org/r/1486040150-14109-3-git-send-email-gilad@benyossef.com Signed-off-by: Gilad Ben-Yossef Cc: Jens Axboe Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- lib/scatterlist.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'lib') diff --git a/lib/scatterlist.c b/lib/scatterlist.c index 393920fddcb9..c6cf82242d65 100644 --- a/lib/scatterlist.c +++ b/lib/scatterlist.c @@ -651,7 +651,6 @@ size_t sg_copy_buffer(struct scatterlist *sgl, unsigned int nents, void *buf, { unsigned int offset = 0; struct sg_mapping_iter miter; - unsigned long flags; unsigned int sg_flags = SG_MITER_ATOMIC; if (to_buffer) @@ -664,8 +663,6 @@ size_t sg_copy_buffer(struct scatterlist *sgl, unsigned int nents, void *buf, if (!sg_miter_skip(&miter, skip)) return false; - local_irq_save(flags); - while ((offset < buflen) && sg_miter_next(&miter)) { unsigned int len; @@ -681,7 +678,6 @@ size_t sg_copy_buffer(struct scatterlist *sgl, unsigned int nents, void *buf, sg_miter_stop(&miter); - local_irq_restore(flags); return offset; } EXPORT_SYMBOL(sg_copy_buffer); -- cgit From 5b5e0928f742cfa853b2411400a1b19fa379d758 Mon Sep 17 00:00:00 2001 From: Alexey Dobriyan Date: Mon, 27 Feb 2017 14:30:02 -0800 Subject: lib/vsprintf.c: remove %Z support Now that %z is standartised in C99 there is no reason to support %Z. Unlike %L it doesn't even make format strings smaller. Use BUILD_BUG_ON in a couple ATM drivers. In case anyone didn't notice lib/vsprintf.o is about half of SLUB which is in my opinion is quite an achievement. Hopefully this patch inspires someone else to trim vsprintf.c more. Link: http://lkml.kernel.org/r/20170103230126.GA30170@avx2 Signed-off-by: Alexey Dobriyan Cc: Andy Shevchenko Cc: Rasmus Villemoes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- lib/vsprintf.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib') diff --git a/lib/vsprintf.c b/lib/vsprintf.c index 0967771d8f7f..e3bf4e0f10b5 100644 --- a/lib/vsprintf.c +++ b/lib/vsprintf.c @@ -1739,6 +1739,7 @@ char *pointer(const char *fmt, char *buf, char *end, void *ptr, * 'h', 'l', or 'L' for integer fields * 'z' support added 23/7/1999 S.H. * 'z' changed to 'Z' --davidm 1/25/99 + * 'Z' changed to 'z' --adobriyan 2017-01-25 * 't' added for ptrdiff_t * * @fmt: the format string @@ -1838,7 +1839,7 @@ qualifier: /* get the conversion qualifier */ qualifier = 0; if (*fmt == 'h' || _tolower(*fmt) == 'l' || - _tolower(*fmt) == 'z' || *fmt == 't') { + *fmt == 'z' || *fmt == 't') { qualifier = *fmt++; if (unlikely(qualifier == *fmt)) { if (qualifier == 'l') { @@ -1907,7 +1908,7 @@ qualifier: else if (qualifier == 'l') { BUILD_BUG_ON(FORMAT_TYPE_ULONG + SIGN != FORMAT_TYPE_LONG); spec->type = FORMAT_TYPE_ULONG + (spec->flags & SIGN); - } else if (_tolower(qualifier) == 'z') { + } else if (qualifier == 'z') { spec->type = FORMAT_TYPE_SIZE_T; } else if (qualifier == 't') { spec->type = FORMAT_TYPE_PTRDIFF; @@ -2657,7 +2658,7 @@ int vsscanf(const char *buf, const char *fmt, va_list args) /* get conversion qualifier */ qualifier = -1; if (*fmt == 'h' || _tolower(*fmt) == 'l' || - _tolower(*fmt) == 'z') { + *fmt == 'z') { qualifier = *fmt++; if (unlikely(qualifier == *fmt)) { if (qualifier == 'h') { @@ -2851,7 +2852,6 @@ int vsscanf(const char *buf, const char *fmt, va_list args) else *va_arg(args, unsigned long long *) = val.u; break; - case 'Z': case 'z': *va_arg(args, size_t *) = val.u; break; -- cgit