summaryrefslogtreecommitdiffstats
path: root/drivers/firmware/efi
diff options
context:
space:
mode:
authorArvind Sankar <nivedita@alum.mit.edu>2020-05-18 15:06:58 -0400
committerArd Biesheuvel <ardb@kernel.org>2020-05-19 10:30:52 +0200
commit29a2806653360f1ba0f7608ef64d65d441a575f7 (patch)
treef94e788c33e226e93e0b9bdf98f5f30ab7de63ce /drivers/firmware/efi
parentbbf8e8b0fe0401e1952c77088692fd273a9635a1 (diff)
downloadlinux-29a2806653360f1ba0f7608ef64d65d441a575f7.tar.bz2
efi/printf: Drop %n format and L qualifier
%n is unused and deprecated. The L qualifer is parsed but not actually implemented. Signed-off-by: Arvind Sankar <nivedita@alum.mit.edu> Link: https://lore.kernel.org/r/20200518190716.751506-7-nivedita@alum.mit.edu Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Diffstat (limited to 'drivers/firmware/efi')
-rw-r--r--drivers/firmware/efi/libstub/vsprintf.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/drivers/firmware/efi/libstub/vsprintf.c b/drivers/firmware/efi/libstub/vsprintf.c
index bb62d3726c65..52cf22d0b6e5 100644
--- a/drivers/firmware/efi/libstub/vsprintf.c
+++ b/drivers/firmware/efi/libstub/vsprintf.c
@@ -127,7 +127,7 @@ int vsprintf(char *buf, const char *fmt, va_list args)
int field_width; /* width of output field */
int precision; /* min. # of digits for integers; max
number of chars for from string */
- int qualifier; /* 'h', 'l', or 'L' for integer fields */
+ int qualifier; /* 'h' or 'l' for integer fields */
for (str = buf; *fmt; ++fmt) {
if (*fmt != '%') {
@@ -188,7 +188,7 @@ int vsprintf(char *buf, const char *fmt, va_list args)
/* get the conversion qualifier */
qualifier = -1;
- if (*fmt == 'h' || *fmt == 'l' || *fmt == 'L') {
+ if (*fmt == 'h' || *fmt == 'l') {
qualifier = *fmt;
++fmt;
}
@@ -229,16 +229,6 @@ int vsprintf(char *buf, const char *fmt, va_list args)
field_width, precision, flags);
continue;
- case 'n':
- if (qualifier == 'l') {
- long *ip = va_arg(args, long *);
- *ip = (str - buf);
- } else {
- int *ip = va_arg(args, int *);
- *ip = (str - buf);
- }
- continue;
-
case '%':
*str++ = '%';
continue;