diff options
author | Alexey Dobriyan <adobriyan@gmail.com> | 2017-02-27 17:30:02 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-02-27 21:43:47 -0500 |
commit | 5b5e0928f742cfa853b2411400a1b19fa379d758 (patch) | |
tree | 44ef4dd9cfd9587c81f4183638648b340a3d3b7e /fs/afs/dir.c | |
parent | d7f6724366c5ccb52b9b2e403b0a9383803bd47a (diff) |
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 <adobriyan@gmail.com>
Cc: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/afs/dir.c')
-rw-r--r-- | fs/afs/dir.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/fs/afs/dir.c b/fs/afs/dir.c index 51a241e09fbb..949f960337f5 100644 --- a/fs/afs/dir.c +++ b/fs/afs/dir.c | |||
@@ -252,7 +252,7 @@ static int afs_dir_iterate_block(struct dir_context *ctx, | |||
252 | /* skip entries marked unused in the bitmap */ | 252 | /* skip entries marked unused in the bitmap */ |
253 | if (!(block->pagehdr.bitmap[offset / 8] & | 253 | if (!(block->pagehdr.bitmap[offset / 8] & |
254 | (1 << (offset % 8)))) { | 254 | (1 << (offset % 8)))) { |
255 | _debug("ENT[%Zu.%u]: unused", | 255 | _debug("ENT[%zu.%u]: unused", |
256 | blkoff / sizeof(union afs_dir_block), offset); | 256 | blkoff / sizeof(union afs_dir_block), offset); |
257 | if (offset >= curr) | 257 | if (offset >= curr) |
258 | ctx->pos = blkoff + | 258 | ctx->pos = blkoff + |
@@ -266,7 +266,7 @@ static int afs_dir_iterate_block(struct dir_context *ctx, | |||
266 | sizeof(*block) - | 266 | sizeof(*block) - |
267 | offset * sizeof(union afs_dirent)); | 267 | offset * sizeof(union afs_dirent)); |
268 | 268 | ||
269 | _debug("ENT[%Zu.%u]: %s %Zu \"%s\"", | 269 | _debug("ENT[%zu.%u]: %s %zu \"%s\"", |
270 | blkoff / sizeof(union afs_dir_block), offset, | 270 | blkoff / sizeof(union afs_dir_block), offset, |
271 | (offset < curr ? "skip" : "fill"), | 271 | (offset < curr ? "skip" : "fill"), |
272 | nlen, dire->u.name); | 272 | nlen, dire->u.name); |
@@ -274,23 +274,23 @@ static int afs_dir_iterate_block(struct dir_context *ctx, | |||
274 | /* work out where the next possible entry is */ | 274 | /* work out where the next possible entry is */ |
275 | for (tmp = nlen; tmp > 15; tmp -= sizeof(union afs_dirent)) { | 275 | for (tmp = nlen; tmp > 15; tmp -= sizeof(union afs_dirent)) { |
276 | if (next >= AFS_DIRENT_PER_BLOCK) { | 276 | if (next >= AFS_DIRENT_PER_BLOCK) { |
277 | _debug("ENT[%Zu.%u]:" | 277 | _debug("ENT[%zu.%u]:" |
278 | " %u travelled beyond end dir block" | 278 | " %u travelled beyond end dir block" |
279 | " (len %u/%Zu)", | 279 | " (len %u/%zu)", |
280 | blkoff / sizeof(union afs_dir_block), | 280 | blkoff / sizeof(union afs_dir_block), |
281 | offset, next, tmp, nlen); | 281 | offset, next, tmp, nlen); |
282 | return -EIO; | 282 | return -EIO; |
283 | } | 283 | } |
284 | if (!(block->pagehdr.bitmap[next / 8] & | 284 | if (!(block->pagehdr.bitmap[next / 8] & |
285 | (1 << (next % 8)))) { | 285 | (1 << (next % 8)))) { |
286 | _debug("ENT[%Zu.%u]:" | 286 | _debug("ENT[%zu.%u]:" |
287 | " %u unmarked extension (len %u/%Zu)", | 287 | " %u unmarked extension (len %u/%zu)", |
288 | blkoff / sizeof(union afs_dir_block), | 288 | blkoff / sizeof(union afs_dir_block), |
289 | offset, next, tmp, nlen); | 289 | offset, next, tmp, nlen); |
290 | return -EIO; | 290 | return -EIO; |
291 | } | 291 | } |
292 | 292 | ||
293 | _debug("ENT[%Zu.%u]: ext %u/%Zu", | 293 | _debug("ENT[%zu.%u]: ext %u/%zu", |
294 | blkoff / sizeof(union afs_dir_block), | 294 | blkoff / sizeof(union afs_dir_block), |
295 | next, tmp, nlen); | 295 | next, tmp, nlen); |
296 | next++; | 296 | next++; |