Hi Alexey, kernel test robot noticed the following build warnings: [auto build test WARNING on herbert-cryptodev-2.6/master] [also build test WARNING on next-20241108] [cannot apply to herbert-crypto-2.6/master robh/for-next linus/master v6.12-rc6] [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#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Alexey-Romanov/crypto-amlogic-Don-t-hardcode-IRQ-count/20241108-183503 base: https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master patch link: https://lore.kernel.org/r/20241108102907.1788584-10-avromanov%40salutedevices.com patch subject: [PATCH v10 09/22] crypto: amlogic - Process more than MAXDESCS descriptors config: x86_64-buildonly-randconfig-002-20241109 (https://download.01.org/0day-ci/archive/20241109/202411090235.a7vEgZQo-lkp@xxxxxxxxx/config) compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241109/202411090235.a7vEgZQo-lkp@xxxxxxxxx/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@xxxxxxxxx> | Closes: https://lore.kernel.org/oe-kbuild-all/202411090235.a7vEgZQo-lkp@xxxxxxxxx/ All warnings (new ones prefixed by >>): In file included from drivers/crypto/amlogic/amlogic-gxl-cipher.c:14: In file included from include/crypto/scatterwalk.h:16: In file included from include/linux/highmem.h:8: In file included from include/linux/cacheflush.h:5: In file included from arch/x86/include/asm/cacheflush.h:5: In file included from include/linux/mm.h:2213: include/linux/vmstat.h:518:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion] 518 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_" | ~~~~~~~~~~~ ^ ~~~ >> drivers/crypto/amlogic/amlogic-gxl-cipher.c:235:13: warning: variable 'new_iv_phys' set but not used [-Wunused-but-set-variable] 235 | dma_addr_t new_iv_phys; | ^ 2 warnings generated. vim +/new_iv_phys +235 drivers/crypto/amlogic/amlogic-gxl-cipher.c 220 221 static int meson_kick_hardware(struct cipher_ctx *ctx) 222 { 223 struct meson_cipher_req_ctx *rctx = skcipher_request_ctx(ctx->areq); 224 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(ctx->areq); 225 struct meson_cipher_tfm_ctx *op = crypto_skcipher_ctx(tfm); 226 struct skcipher_alg *alg = crypto_skcipher_alg(tfm); 227 struct meson_alg_template *algt = container_of(alg, 228 struct meson_alg_template, 229 alg.skcipher.base); 230 struct meson_dev *mc = op->mc; 231 unsigned int ivsize = crypto_skcipher_ivsize(tfm); 232 unsigned int blockmode = algt->blockmode; 233 enum dma_data_direction new_iv_dir; 234 struct scatterlist *sg_head; > 235 dma_addr_t new_iv_phys; 236 void *new_iv; 237 int err; 238 239 if (blockmode == DESC_OPMODE_CBC) { 240 struct scatterlist *sg_current; 241 unsigned int offset; 242 243 if (rctx->op_dir == MESON_ENCRYPT) { 244 sg_current = ctx->dst_sg; 245 sg_head = ctx->areq->dst; 246 offset = ctx->dst_offset; 247 new_iv_dir = DMA_FROM_DEVICE; 248 } else { 249 sg_current = ctx->src_sg; 250 sg_head = ctx->areq->src; 251 offset = ctx->src_offset; 252 new_iv_dir = DMA_TO_DEVICE; 253 } 254 255 if (ctx->areq->src == ctx->areq->dst) 256 new_iv_dir = DMA_BIDIRECTIONAL; 257 258 offset -= ivsize; 259 new_iv = sg_virt(sg_current) + offset; 260 new_iv_phys = sg_dma_address(sg_current) + offset; 261 } 262 263 if (blockmode == DESC_OPMODE_CBC && 264 rctx->op_dir == MESON_DECRYPT) { 265 dma_sync_sg_for_cpu(mc->dev, sg_head, 266 sg_nents(sg_head), new_iv_dir); 267 memcpy(ctx->areq->iv, new_iv, ivsize); 268 } 269 270 reinit_completion(&mc->chanlist[rctx->flow].complete); 271 meson_dma_start(mc, rctx->flow); 272 err = wait_for_completion_interruptible_timeout(&mc->chanlist[rctx->flow].complete, 273 msecs_to_jiffies(500)); 274 if (err == 0) { 275 dev_err(mc->dev, "DMA timeout for flow %d\n", rctx->flow); 276 return -EINVAL; 277 } else if (err < 0) { 278 dev_err(mc->dev, "Waiting for DMA completion is failed (%d)\n", err); 279 return err; 280 } 281 282 if (blockmode == DESC_OPMODE_CBC && 283 rctx->op_dir == MESON_ENCRYPT) { 284 dma_sync_sg_for_cpu(mc->dev, sg_head, 285 sg_nents(sg_head), new_iv_dir); 286 memcpy(ctx->areq->iv, new_iv, ivsize); 287 } 288 289 ctx->tloffset = 0; 290 291 return 0; 292 } 293 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki