From: kernel test robot <lkp@intel.com>
To: Gao Xiang <hsiangkao@linux.alibaba.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
Xiang Gao <xiang@kernel.org>
Subject: [xiang:lz4-macros 1/1] lib/lz4/lz4hc_compress.c:86:15: error: use of undeclared identifier 'LZ4_MAX_DISTANCE'
Date: Tue, 14 Jan 2025 20:36:39 +0800 [thread overview]
Message-ID: <202501142005.DqdNQGKc-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/xiang/linux.git lz4-macros
head: cc151de616805bc027b30cfc99853989274e2a2d
commit: cc151de616805bc027b30cfc99853989274e2a2d [1/1] include/linux/lz4.h: add some missing macros
config: arm-randconfig-002-20250114 (https://download.01.org/0day-ci/archive/20250114/202501142005.DqdNQGKc-lkp@intel.com/config)
compiler: clang version 20.0.0git (https://github.com/llvm/llvm-project f5cd181ffbb7cb61d582fe130d46580d5969d47a)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250114/202501142005.DqdNQGKc-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202501142005.DqdNQGKc-lkp@intel.com/
All errors (new ones prefixed by >>):
>> lib/lz4/lz4hc_compress.c:86:15: error: use of undeclared identifier 'LZ4_MAX_DISTANCE'
86 | if (delta > MAX_DISTANCE)
| ^
lib/lz4/lz4defs.h:96:22: note: expanded from macro 'MAX_DISTANCE'
96 | #define MAX_DISTANCE LZ4_MAX_DISTANCE
| ^
lib/lz4/lz4hc_compress.c:87:12: error: use of undeclared identifier 'LZ4_MAX_DISTANCE'
87 | delta = MAX_DISTANCE;
| ^
lib/lz4/lz4defs.h:96:22: note: expanded from macro 'MAX_DISTANCE'
96 | #define MAX_DISTANCE LZ4_MAX_DISTANCE
| ^
2 errors generated.
--
>> lib/lz4/lz4_compress.c:287:17: error: use of undeclared identifier 'LZ4_MAX_DISTANCE'
287 | : (match + MAX_DISTANCE < ip))
| ^
lib/lz4/lz4defs.h:96:22: note: expanded from macro 'MAX_DISTANCE'
96 | #define MAX_DISTANCE LZ4_MAX_DISTANCE
| ^
lib/lz4/lz4_compress.c:416:16: error: use of undeclared identifier 'LZ4_MAX_DISTANCE'
416 | && (match + MAX_DISTANCE >= ip)
| ^
lib/lz4/lz4defs.h:96:22: note: expanded from macro 'MAX_DISTANCE'
96 | #define MAX_DISTANCE LZ4_MAX_DISTANCE
| ^
lib/lz4/lz4_compress.c:597:16: error: use of undeclared identifier 'LZ4_MAX_DISTANCE'
597 | : (match + MAX_DISTANCE < ip))
| ^
lib/lz4/lz4defs.h:96:22: note: expanded from macro 'MAX_DISTANCE'
96 | #define MAX_DISTANCE LZ4_MAX_DISTANCE
| ^
lib/lz4/lz4_compress.c:676:16: error: use of undeclared identifier 'LZ4_MAX_DISTANCE'
676 | if ((match + MAX_DISTANCE >= ip)
| ^
lib/lz4/lz4defs.h:96:22: note: expanded from macro 'MAX_DISTANCE'
96 | #define MAX_DISTANCE LZ4_MAX_DISTANCE
| ^
4 errors generated.
vim +/LZ4_MAX_DISTANCE +86 lib/lz4/lz4hc_compress.c
c72ac7a1a926db Chanho Min 2013-07-08 71
c72ac7a1a926db Chanho Min 2013-07-08 72 /* Update chains up to ip (excluded) */
4e1a33b105ddf2 Sven Schmidt 2017-02-24 73 static FORCE_INLINE void LZ4HC_Insert(LZ4HC_CCtx_internal *hc4,
4e1a33b105ddf2 Sven Schmidt 2017-02-24 74 const BYTE *ip)
c72ac7a1a926db Chanho Min 2013-07-08 75 {
4e1a33b105ddf2 Sven Schmidt 2017-02-24 76 U16 * const chainTable = hc4->chainTable;
4e1a33b105ddf2 Sven Schmidt 2017-02-24 77 U32 * const hashTable = hc4->hashTable;
c72ac7a1a926db Chanho Min 2013-07-08 78 const BYTE * const base = hc4->base;
4e1a33b105ddf2 Sven Schmidt 2017-02-24 79 U32 const target = (U32)(ip - base);
4e1a33b105ddf2 Sven Schmidt 2017-02-24 80 U32 idx = hc4->nextToUpdate;
4e1a33b105ddf2 Sven Schmidt 2017-02-24 81
4e1a33b105ddf2 Sven Schmidt 2017-02-24 82 while (idx < target) {
4e1a33b105ddf2 Sven Schmidt 2017-02-24 83 U32 const h = LZ4HC_hashPtr(base + idx);
4e1a33b105ddf2 Sven Schmidt 2017-02-24 84 size_t delta = idx - hashTable[h];
c72ac7a1a926db Chanho Min 2013-07-08 85
c72ac7a1a926db Chanho Min 2013-07-08 @86 if (delta > MAX_DISTANCE)
c72ac7a1a926db Chanho Min 2013-07-08 87 delta = MAX_DISTANCE;
c72ac7a1a926db Chanho Min 2013-07-08 88
4e1a33b105ddf2 Sven Schmidt 2017-02-24 89 DELTANEXTU16(idx) = (U16)delta;
c72ac7a1a926db Chanho Min 2013-07-08 90
4e1a33b105ddf2 Sven Schmidt 2017-02-24 91 hashTable[h] = idx;
4e1a33b105ddf2 Sven Schmidt 2017-02-24 92 idx++;
c72ac7a1a926db Chanho Min 2013-07-08 93 }
4e1a33b105ddf2 Sven Schmidt 2017-02-24 94
4e1a33b105ddf2 Sven Schmidt 2017-02-24 95 hc4->nextToUpdate = target;
c72ac7a1a926db Chanho Min 2013-07-08 96 }
c72ac7a1a926db Chanho Min 2013-07-08 97
:::::: The code at line 86 was first introduced by commit
:::::: c72ac7a1a926dbffb59daf0f275450e5eecce16f lib: add lz4 compressor module
:::::: TO: Chanho Min <chanho.min@lge.com>
:::::: CC: Linus Torvalds <torvalds@linux-foundation.org>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2025-01-14 12:37 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202501142005.DqdNQGKc-lkp@intel.com \
--to=lkp@intel.com \
--cc=hsiangkao@linux.alibaba.com \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=xiang@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.