Hi Gilad,
I love your patch! Perhaps something to improve:
[auto build test WARNING on cryptodev/master]
[also build test WARNING on crypto/master robh/for-next v5.9-rc5 next-20200916]
[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/Gilad-Ben-Yossef/add-optional-ca...
base:
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master
config: arm64-randconfig-r015-20200916 (attached as .config)
compiler: clang version 12.0.0 (
https://github.com/llvm/llvm-project
9e3842d60351f986d77dfe0a94f76e4fd895f188)
reproduce (this is a W=1 build):
wget
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
~/bin/make.cross
chmod +x ~/bin/make.cross
# install arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
> drivers/crypto/ccree/cc_driver.c:120:18: warning: result of
comparison of constant 18446744073709551615 with expression of type 'u32' (aka
'unsigned int') is always false [-Wtautological-constant-out-of-range-compare]
cache_params |= FIELD_PREP(mask, val);
^~~~~~~~~~~~~~~~~~~~~
include/linux/bitfield.h:94:3: note: expanded from macro 'FIELD_PREP'
__BF_FIELD_CHECK(_mask, 0ULL, _val, "FIELD_PREP: "); \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/bitfield.h:52:28: note: expanded from macro '__BF_FIELD_CHECK'
BUILD_BUG_ON_MSG((_mask) > (typeof(_reg))~0ull, \
~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:58: note: expanded from macro 'BUILD_BUG_ON_MSG'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
include/linux/compiler_types.h:319:22: note: expanded from macro
'compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler_types.h:307:23: note: expanded from macro
'_compiletime_assert'
__compiletime_assert(condition, msg, prefix, suffix)
~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler_types.h:299:9: note: expanded from macro
'__compiletime_assert'
if (!(condition)) \
^~~~~~~~~
drivers/crypto/ccree/cc_driver.c:125:18: warning: result of comparison of constant
18446744073709551615 with expression of type 'u32' (aka 'unsigned int') is
always false [-Wtautological-constant-out-of-range-compare]
cache_params |= FIELD_PREP(mask, val);
^~~~~~~~~~~~~~~~~~~~~
include/linux/bitfield.h:94:3: note: expanded from macro 'FIELD_PREP'
__BF_FIELD_CHECK(_mask, 0ULL, _val, "FIELD_PREP: "); \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/bitfield.h:52:28: note: expanded from macro '__BF_FIELD_CHECK'
BUILD_BUG_ON_MSG((_mask) > (typeof(_reg))~0ull, \
~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:58: note: expanded from macro 'BUILD_BUG_ON_MSG'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
include/linux/compiler_types.h:319:22: note: expanded from macro
'compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler_types.h:307:23: note: expanded from macro
'_compiletime_assert'
__compiletime_assert(condition, msg, prefix, suffix)
~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler_types.h:299:9: note: expanded from macro
'__compiletime_assert'
if (!(condition)) \
^~~~~~~~~
drivers/crypto/ccree/cc_driver.c:133:18: warning: result of comparison of constant
18446744073709551615 with expression of type 'u32' (aka 'unsigned int') is
always false [-Wtautological-constant-out-of-range-compare]
cache_params |= FIELD_PREP(mask, val);
^~~~~~~~~~~~~~~~~~~~~
include/linux/bitfield.h:94:3: note: expanded from macro 'FIELD_PREP'
__BF_FIELD_CHECK(_mask, 0ULL, _val, "FIELD_PREP: "); \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/bitfield.h:52:28: note: expanded from macro '__BF_FIELD_CHECK'
BUILD_BUG_ON_MSG((_mask) > (typeof(_reg))~0ull, \
~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:58: note: expanded from macro 'BUILD_BUG_ON_MSG'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
include/linux/compiler_types.h:319:22: note: expanded from macro
'compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler_types.h:307:23: note: expanded from macro
'_compiletime_assert'
__compiletime_assert(condition, msg, prefix, suffix)
~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler_types.h:299:9: note: expanded from macro
'__compiletime_assert'
if (!(condition)) \
^~~~~~~~~
drivers/crypto/ccree/cc_driver.c:153:15: warning: result of comparison of constant
18446744073709551615 with expression of type 'u32' (aka 'unsigned int') is
always false [-Wtautological-constant-out-of-range-compare]
ace_const |= FIELD_PREP(mask, val);
^~~~~~~~~~~~~~~~~~~~~
include/linux/bitfield.h:94:3: note: expanded from macro 'FIELD_PREP'
__BF_FIELD_CHECK(_mask, 0ULL, _val, "FIELD_PREP: "); \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/bitfield.h:52:28: note: expanded from macro '__BF_FIELD_CHECK'
BUILD_BUG_ON_MSG((_mask) > (typeof(_reg))~0ull, \
~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:58: note: expanded from macro 'BUILD_BUG_ON_MSG'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
include/linux/compiler_types.h:319:22: note: expanded from macro
'compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler_types.h:307:23: note: expanded from macro
'_compiletime_assert'
__compiletime_assert(condition, msg, prefix, suffix)
~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler_types.h:299:9: note: expanded from macro
'__compiletime_assert'
if (!(condition)) \
^~~~~~~~~
drivers/crypto/ccree/cc_driver.c:161:15: warning: result of comparison of constant
18446744073709551615 with expression of type 'u32' (aka 'unsigned int') is
always false [-Wtautological-constant-out-of-range-compare]
ace_const |= FIELD_PREP(mask, val);
^~~~~~~~~~~~~~~~~~~~~
include/linux/bitfield.h:94:3: note: expanded from macro 'FIELD_PREP'
__BF_FIELD_CHECK(_mask, 0ULL, _val, "FIELD_PREP: "); \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/bitfield.h:52:28: note: expanded from macro '__BF_FIELD_CHECK'
BUILD_BUG_ON_MSG((_mask) > (typeof(_reg))~0ull, \
~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:58: note: expanded from macro 'BUILD_BUG_ON_MSG'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
include/linux/compiler_types.h:319:22: note: expanded from macro
'compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler_types.h:307:23: note: expanded from macro
'_compiletime_assert'
__compiletime_assert(condition, msg, prefix, suffix)
#
https://github.com/0day-ci/linux/commit/3c84102e6f9ba61d7efbadd1ed836eab9...
git remote add linux-review
https://github.com/0day-ci/linux
git fetch --no-tags linux-review
Gilad-Ben-Yossef/add-optional-cache-params-from-DT/20200916-152151
git checkout 3c84102e6f9ba61d7efbadd1ed836eab947106c1
vim +120 drivers/crypto/ccree/cc_driver.c
102
103 static void init_cc_dt_params(struct cc_drvdata *drvdata)
104 {
105 struct device *dev = drvdata_to_dev(drvdata);
106 struct device_node *np = dev->of_node;
107 u32 cache_params, ace_const, val, mask;
108 int rc;
109
110 /* register CC_AXIM_CACHE_PARAMS */
111 cache_params = cc_ioread(drvdata, CC_REG(AXIM_CACHE_PARAMS));
112 dev_dbg(dev, "Cache params previous: 0x%08X\n", cache_params);
113
114 rc = of_property_read_u32(np, "awcache", &val);
115 if (rc)
116 val = (drvdata->coherent ? 0xb : 0x2);
117
118 mask = CC_GENMASK(CC_AXIM_CACHE_PARAMS_AWCACHE);
119 cache_params &= ~mask;
120 cache_params |= FIELD_PREP(mask, val);
121
122 /* write AWCACHE also to AWCACHE_LAST */
123 mask = CC_GENMASK(CC_AXIM_CACHE_PARAMS_AWCACHE_LAST);
124 cache_params &= ~mask;
125 cache_params |= FIELD_PREP(mask, val);
126
127 rc = of_property_read_u32(np, "arcache", &val);
128 if (rc)
129 val = (drvdata->coherent ? 0xb : 0x2);
130
131 mask = CC_GENMASK(CC_AXIM_CACHE_PARAMS_ARCACHE);
132 cache_params &= ~mask;
133 cache_params |= FIELD_PREP(mask, val);
134
135 drvdata->cache_params = cache_params;
136
137 dev_dbg(dev, "Cache params current: 0x%08X\n", cache_params);
138
139 if (drvdata->hw_rev <= CC_HW_REV_710)
140 return;
141
142 /* register CC_AXIM_ACE_CONST */
143 ace_const = cc_ioread(drvdata, CC_REG(AXIM_ACE_CONST));
144 dev_dbg(dev, "ACE-const previous: 0x%08X\n", ace_const);
145
146 rc = of_property_read_u32(np, "ardomain", &val);
147 ace_const = cc_ioread(drvdata, CC_REG(AXIM_ACE_CONST));
148 if (rc)
149 val = (drvdata->coherent ? 0x2 : 0x3);
150
151 mask = CC_GENMASK(CC_AXIM_ACE_CONST_ARDOMAIN);
152 ace_const &= ~mask;
153 ace_const |= FIELD_PREP(mask, val);
154
155 rc = of_property_read_u32(np, "awdomain", &val);
156 if (rc)
157 val = (drvdata->coherent ? 0x2 : 0x3);
158
159 mask = CC_GENMASK(CC_AXIM_ACE_CONST_AWDOMAIN);
160 ace_const &= ~mask;
161 ace_const |= FIELD_PREP(mask, val);
162
163 dev_dbg(dev, "ACE-const current: 0x%08X\n", ace_const);
164
165 drvdata->ace_const = ace_const;
166 }
167
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org