Re: [PATCH 8/8] crypto: atmel: Use dmaengine_prep_slave_single_config() API

kernel test robot
2025-12-10T23:39:12Z

Hi Frank,

kernel test robot noticed the following build warnings:

[auto build test WARNING on bc04acf4aeca588496124a6cf54bfce3db327039]

url: https://github.com/intel-lab-lkp/linux/commits/Frank-Li/dmaengine-Add-API-to-combine-configuration-and-preparation-sg-and-single/20251209-011820
base: bc04acf4aeca588496124a6cf54bfce3db327039
patch link: https://lore.kernel.org/r/20251208-dma_prep_config-v1-8-53490c5e1e2a%40nxp.com
patch subject: [PATCH 8/8] crypto: atmel: Use dmaengine_prep_slave_single_config() API
config: i386-allmodconfig (https://download.01.org/0day-ci/archive/20251211/202512110702.EhO0gmFG-lkp@intel.com/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251211/202512110702.EhO0gmFG-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/202512110702.EhO0gmFG-lkp@intel.com/

All warnings (new ones prefixed by >>):

drivers/crypto/atmel-aes.c: In function 'atmel_aes_dma_transfer_start':
>> drivers/crypto/atmel-aes.c:798:13: warning: unused variable 'err' [-Wunused-variable]
798 | int err;
| ^~~

vim +/err +798 drivers/crypto/atmel-aes.c

cadc4ab8f6f737 Nicolas Royer 2013-02-20 788
bbe628ed897d72 Cyrille Pitchen 2015-12-17 789 static int atmel_aes_dma_transfer_start(struct atmel_aes_dev *dd,
bbe628ed897d72 Cyrille Pitchen 2015-12-17 790 enum dma_slave_buswidth addr_width,
bbe628ed897d72 Cyrille Pitchen 2015-12-17 791 enum dma_transfer_direction dir,
bbe628ed897d72 Cyrille Pitchen 2015-12-17 792 u32 maxburst)
bbe628ed897d72 Cyrille Pitchen 2015-12-17 793 {
bbe628ed897d72 Cyrille Pitchen 2015-12-17 794 struct dma_async_tx_descriptor *desc;
bbe628ed897d72 Cyrille Pitchen 2015-12-17 795 struct dma_slave_config config;
bbe628ed897d72 Cyrille Pitchen 2015-12-17 796 dma_async_tx_callback callback;
bbe628ed897d72 Cyrille Pitchen 2015-12-17 797 struct atmel_aes_dma *dma;
bbe628ed897d72 Cyrille Pitchen 2015-12-17 @798 int err;
bbe628ed897d72 Cyrille Pitchen 2015-12-17 799
bbe628ed897d72 Cyrille Pitchen 2015-12-17 800 memset(&config, 0, sizeof(config));
bbe628ed897d72 Cyrille Pitchen 2015-12-17 801 config.src_addr_width = addr_width;
bbe628ed897d72 Cyrille Pitchen 2015-12-17 802 config.dst_addr_width = addr_width;
bbe628ed897d72 Cyrille Pitchen 2015-12-17 803 config.src_maxburst = maxburst;
bbe628ed897d72 Cyrille Pitchen 2015-12-17 804 config.dst_maxburst = maxburst;
bbe628ed897d72 Cyrille Pitchen 2015-12-17 805
bbe628ed897d72 Cyrille Pitchen 2015-12-17 806 switch (dir) {
bbe628ed897d72 Cyrille Pitchen 2015-12-17 807 case DMA_MEM_TO_DEV:
bbe628ed897d72 Cyrille Pitchen 2015-12-17 808 dma = &dd->src;
bbe628ed897d72 Cyrille Pitchen 2015-12-17 809 callback = NULL;
bbe628ed897d72 Cyrille Pitchen 2015-12-17 810 config.dst_addr = dd->phys_base + AES_IDATAR(0);
bbe628ed897d72 Cyrille Pitchen 2015-12-17 811 break;
cadc4ab8f6f737 Nicolas Royer 2013-02-20 812
bbe628ed897d72 Cyrille Pitchen 2015-12-17 813 case DMA_DEV_TO_MEM:
bbe628ed897d72 Cyrille Pitchen 2015-12-17 814 dma = &dd->dst;
bbe628ed897d72 Cyrille Pitchen 2015-12-17 815 callback = atmel_aes_dma_callback;
bbe628ed897d72 Cyrille Pitchen 2015-12-17 816 config.src_addr = dd->phys_base + AES_ODATAR(0);
bbe628ed897d72 Cyrille Pitchen 2015-12-17 817 break;
cadc4ab8f6f737 Nicolas Royer 2013-02-20 818
bbe628ed897d72 Cyrille Pitchen 2015-12-17 819 default:
cadc4ab8f6f737 Nicolas Royer 2013-02-20 820 return -EINVAL;
cadc4ab8f6f737 Nicolas Royer 2013-02-20 821 }
cadc4ab8f6f737 Nicolas Royer 2013-02-20 822
c8695132080931 Frank Li 2025-12-08 823 desc = dmaengine_prep_slave_sg_config(dma->chan, dma->sg, dma->sg_len,
c8695132080931 Frank Li 2025-12-08 824 dir,
c8695132080931 Frank Li 2025-12-08 825 DMA_PREP_INTERRUPT | DMA_CTRL_ACK,
c8695132080931 Frank Li 2025-12-08 826 &config);
bbe628ed897d72 Cyrille Pitchen 2015-12-17 827 if (!desc)
bbe628ed897d72 Cyrille Pitchen 2015-12-17 828 return -ENOMEM;
bbe628ed897d72 Cyrille Pitchen 2015-12-17 829
bbe628ed897d72 Cyrille Pitchen 2015-12-17 830 desc->callback = callback;
bbe628ed897d72 Cyrille Pitchen 2015-12-17 831 desc->callback_param = dd;
bbe628ed897d72 Cyrille Pitchen 2015-12-17 832 dmaengine_submit(desc);
bbe628ed897d72 Cyrille Pitchen 2015-12-17 833 dma_async_issue_pending(dma->chan);
bbe628ed897d72 Cyrille Pitchen 2015-12-17 834
bbe628ed897d72 Cyrille Pitchen 2015-12-17 835 return 0;
cadc4ab8f6f737 Nicolas Royer 2013-02-20 836 }
cadc4ab8f6f737 Nicolas Royer 2013-02-20 837

--
0-DAY CI Kernel Test Service