Skip to contentSkip to conversation

drivers/hwtracing/coresight/coresight-etm4x-core.c:1183:24: warning: result of comparison of constant 256 with expression of type 'u8' (aka 'unsigned char') is always false

PATCH kernel test robot 1 participant 1 message Oct 30, 2023 Memory management

lore
Share & tools
lore

kernel test robot

author build bot
#0 lore raw
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   c503e3eec382ac708ee7adf874add37b77c5d312
commit: 0f55b43dedcdae2b871f0fec59d8c672e62ff5de [9417/16121] coresight: etm: Override TRCIDR3.CCITMIN on errata affected cpus
config: arm64-allmodconfig (https://download.01.org/0day-ci/archive/20231030/[email protected]/config)
compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project.git 4a5ac14ee968ff0ad5d2cc1ffa0299048db4c88a)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231030/[email protected]/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 <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

All warnings (new ones prefixed by >>):

>> drivers/hwtracing/coresight/coresight-etm4x-core.c:1183:24: warning: result of comparison of constant 256 with expression of type 'u8' (aka 'unsigned char') is always false [-Wtautological-constant-out-of-range-compare]
    1183 |                 if (drvdata->ccitmin == 256)
         |                     ~~~~~~~~~~~~~~~~ ^  ~~~

1 warning generated.

vim +1183 drivers/hwtracing/coresight/coresight-etm4x-core.c

1172
1173 static void etm4_fixup_wrong_ccitmin(struct etmv4_drvdata *drvdata)
1174 {
1175 /*
1176 * Erratum affected cpus will read 256 as the minimum
1177 * instruction trace cycle counting threshold whereas
1178 * the correct value should be 4 instead. Override the
1179 * recorded value for 'drvdata->ccitmin' to workaround
1180 * this problem.
1181 */
1182 if (is_midr_in_range_list(read_cpuid_id(), etm_wrong_ccitmin_cpus)) {

> 1183			if (drvdata->ccitmin == 256)

1184 drvdata->ccitmin = 4;
1185 }
1186 }
1187

Signature · 2 lines
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki