[PATCH 2/3] Revert "lib: Revert use of fallthrough pseudo-keyword in lib/"

kernel test robot lkp at intel.com
Mon Nov 16 22:49:38 AEDT 2020


Hi Nick,

I love your patch! Perhaps something to improve:

[auto build test WARNING on powerpc/next]
[also build test WARNING on linus/master v5.10-rc4 next-20201116]
[cannot apply to pmladek/for-next]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Nick-Desaulniers/PPC-Fix-Wimplicit-fallthrough-for-clang/20201116-123803
base:   https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next
config: x86_64-randconfig-m001-20201115 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp at intel.com>

smatch warnings:
lib/zstd/huf_compress.c:559 HUF_compress1X_usingCTable() warn: inconsistent indenting

vim +559 lib/zstd/huf_compress.c

   529	
   530	#define HUF_FLUSHBITS_1(stream)                                            \
   531		if (sizeof((stream)->bitContainer) * 8 < HUF_TABLELOG_MAX * 2 + 7) \
   532		HUF_FLUSHBITS(stream)
   533	
   534	#define HUF_FLUSHBITS_2(stream)                                            \
   535		if (sizeof((stream)->bitContainer) * 8 < HUF_TABLELOG_MAX * 4 + 7) \
   536		HUF_FLUSHBITS(stream)
   537	
   538	size_t HUF_compress1X_usingCTable(void *dst, size_t dstSize, const void *src, size_t srcSize, const HUF_CElt *CTable)
   539	{
   540		const BYTE *ip = (const BYTE *)src;
   541		BYTE *const ostart = (BYTE *)dst;
   542		BYTE *const oend = ostart + dstSize;
   543		BYTE *op = ostart;
   544		size_t n;
   545		BIT_CStream_t bitC;
   546	
   547		/* init */
   548		if (dstSize < 8)
   549			return 0; /* not enough space to compress */
   550		{
   551			size_t const initErr = BIT_initCStream(&bitC, op, oend - op);
   552			if (HUF_isError(initErr))
   553				return 0;
   554		}
   555	
   556		n = srcSize & ~3; /* join to mod 4 */
   557		switch (srcSize & 3) {
   558		case 3: HUF_encodeSymbol(&bitC, ip[n + 2], CTable); HUF_FLUSHBITS_2(&bitC);
 > 559			fallthrough;
   560		case 2: HUF_encodeSymbol(&bitC, ip[n + 1], CTable); HUF_FLUSHBITS_1(&bitC);
   561			fallthrough;
   562		case 1: HUF_encodeSymbol(&bitC, ip[n + 0], CTable); HUF_FLUSHBITS(&bitC);
   563		case 0:
   564		default:;
   565		}
   566	
   567		for (; n > 0; n -= 4) { /* note : n&3==0 at this stage */
   568			HUF_encodeSymbol(&bitC, ip[n - 1], CTable);
   569			HUF_FLUSHBITS_1(&bitC);
   570			HUF_encodeSymbol(&bitC, ip[n - 2], CTable);
   571			HUF_FLUSHBITS_2(&bitC);
   572			HUF_encodeSymbol(&bitC, ip[n - 3], CTable);
   573			HUF_FLUSHBITS_1(&bitC);
   574			HUF_encodeSymbol(&bitC, ip[n - 4], CTable);
   575			HUF_FLUSHBITS(&bitC);
   576		}
   577	
   578		return BIT_closeCStream(&bitC);
   579	}
   580	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 31321 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20201116/b88e0080/attachment-0001.gz>


More information about the Linuxppc-dev mailing list