aboutsummaryrefslogtreecommitdiffstats
path: root/lib/zstd/compress.c
diff options
context:
space:
mode:
authorGustavo A. R. Silva <[email protected]>2020-08-24 20:36:14 +0000
committerLinus Torvalds <[email protected]>2020-08-24 21:17:44 +0000
commit6a9dc5fd6170d0a41c8a14eb19e63d94bea5705a (patch)
tree7d33b5d3fa40ab47f2a5d711fc034a008cc9e83f /lib/zstd/compress.c
parentMerge tag 'for-5.9-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/... (diff)
downloadkernel-6a9dc5fd6170d0a41c8a14eb19e63d94bea5705a.tar.gz
kernel-6a9dc5fd6170d0a41c8a14eb19e63d94bea5705a.zip
lib: Revert use of fallthrough pseudo-keyword in lib/
The following build error for powerpc64 was reported by Nathan Chancellor: "$ scripts/config --file arch/powerpc/configs/powernv_defconfig -e KERNEL_XZ $ make -skj"$(nproc)" ARCH=powerpc CROSS_COMPILE=powerpc64le-linux- distclean powernv_defconfig zImage ... In file included from arch/powerpc/boot/../../../lib/decompress_unxz.c:234, from arch/powerpc/boot/decompress.c:38: arch/powerpc/boot/../../../lib/xz/xz_dec_stream.c: In function 'dec_main': arch/powerpc/boot/../../../lib/xz/xz_dec_stream.c:586:4: error: 'fallthrough' undeclared (first use in this function) 586 | fallthrough; | ^~~~~~~~~~~ This will end up affecting distribution configurations such as Debian and OpenSUSE according to my testing. I am not sure what the solution is, the PowerPC wrapper does not set -D__KERNEL__ so I am not sure that compiler_attributes.h can be safely included." In order to avoid these sort of problems, it seems that the best solution is to use /* fall through */ comments instead of the fallthrough pseudo-keyword macro in lib/, for now. Reported-by: Nathan Chancellor <[email protected]> Fixes: df561f6688fe ("treewide: Use fallthrough pseudo-keyword") Signed-off-by: Gustavo A. R. Silva <[email protected]> Reviewed-and-tested-by: Nathan Chancellor <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'lib/zstd/compress.c')
-rw-r--r--lib/zstd/compress.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/zstd/compress.c b/lib/zstd/compress.c
index b080264ed3ad..5e0b67003e55 100644
--- a/lib/zstd/compress.c
+++ b/lib/zstd/compress.c
@@ -3182,7 +3182,7 @@ static size_t ZSTD_compressStream_generic(ZSTD_CStream *zcs, void *dst, size_t *
zcs->outBuffFlushedSize = 0;
zcs->stage = zcss_flush; /* pass-through to flush stage */
}
- fallthrough;
+ /* fall through */
case zcss_flush: {
size_t const toFlush = zcs->outBuffContentSize - zcs->outBuffFlushedSize;