Hi Allen,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on cryptodev/master]
[also build test ERROR on crypto/master rockchip/for-next v5.9-rc1 
next-20200817]
[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/Allen-Pais/crypto-convert-tasklets-to-use-new-tasklet_setup/20200817-161307
base:   
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master
config: arm-allyesconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.0
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
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <l...@intel.com>

All errors (new ones prefixed by >>):

   drivers/crypto/caam/jr.c: In function 'caam_jr_dequeue':
   drivers/crypto/caam/jr.c:207:36: error: implicit declaration of function 
'from_tasklet' [-Werror=implicit-function-declaration]
     207 |  struct caam_drv_private_jr *jrp = from_tasklet(jrp, t, irqtask);
         |                                    ^~~~~~~~~~~~
   drivers/crypto/caam/jr.c:207:57: error: 'irqtask' undeclared (first use in 
this function); did you mean 'in_task'?
     207 |  struct caam_drv_private_jr *jrp = from_tasklet(jrp, t, irqtask);
         |                                                         ^~~~~~~
         |                                                         in_task
   drivers/crypto/caam/jr.c:207:57: note: each undeclared identifier is 
reported only once for each function it appears in
   In file included from drivers/crypto/caam/compat.h:18,
                    from drivers/crypto/caam/jr.c:13:
>> drivers/crypto/caam/jr.c:232:20: error: 'dev' undeclared (first use in this 
>> function); did you mean 'cdev'?
     232 |   dma_unmap_single(dev,
         |                    ^~~
   include/linux/dma-mapping.h:693:61: note: in definition of macro 
'dma_unmap_single'
     693 | #define dma_unmap_single(d, a, s, r) dma_unmap_single_attrs(d, a, s, 
r, 0)
         |                                                             ^
   drivers/crypto/caam/jr.c: In function 'caam_jr_init':
   drivers/crypto/caam/jr.c:485:2: error: implicit declaration of function 
'tasklet_setup' [-Werror=implicit-function-declaration]
     485 |  tasklet_setup(&jrp->irqtask, caam_jr_dequeue);
         |  ^~~~~~~~~~~~~
   In file included from include/linux/huge_mm.h:8,
                    from include/linux/mm.h:675,
                    from include/linux/scatterlist.h:8,
                    from include/linux/dma-mapping.h:11,
                    from drivers/crypto/caam/compat.h:18,
                    from drivers/crypto/caam/jr.c:13:
   At top level:
   drivers/crypto/caam/intern.h:212:25: warning: 'caam_fops_u64_ro' defined but 
not used [-Wunused-const-variable=]
     212 | DEFINE_SIMPLE_ATTRIBUTE(caam_fops_u64_ro, caam_debugfs_u64_get, 
NULL, "%llu\n");
         |                         ^~~~~~~~~~~~~~~~
   include/linux/fs.h:3519:37: note: in definition of macro 
'DEFINE_SIMPLE_ATTRIBUTE'
    3519 | static const struct file_operations __fops = {    \
         |                                     ^~~~~~
   drivers/crypto/caam/intern.h:211:25: warning: 'caam_fops_u32_ro' defined but 
not used [-Wunused-const-variable=]
     211 | DEFINE_SIMPLE_ATTRIBUTE(caam_fops_u32_ro, caam_debugfs_u32_get, 
NULL, "%llu\n");
         |                         ^~~~~~~~~~~~~~~~
   include/linux/fs.h:3519:37: note: in definition of macro 
'DEFINE_SIMPLE_ATTRIBUTE'
    3519 | static const struct file_operations __fops = {    \
         |                                     ^~~~~~
   cc1: some warnings being treated as errors

# 
https://github.com/0day-ci/linux/commit/788de4253aaa43e2340446894f0c6ecd67fa6a49
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review 
Allen-Pais/crypto-convert-tasklets-to-use-new-tasklet_setup/20200817-161307
git checkout 788de4253aaa43e2340446894f0c6ecd67fa6a49
vim +232 drivers/crypto/caam/jr.c

8e8ec596e6c0144 Kim Phillips     2011-03-13  202  
2b163b5bce04546 Horia Geantă     2016-11-09  203  /* Deferred service handler, 
run as interrupt-fired tasklet */
788de4253aaa43e Allen Pais       2020-08-17  204  static void 
caam_jr_dequeue(struct tasklet_struct *t)
8e8ec596e6c0144 Kim Phillips     2011-03-13  205  {
8e8ec596e6c0144 Kim Phillips     2011-03-13  206        int hw_idx, sw_idx, i, 
head, tail;
788de4253aaa43e Allen Pais       2020-08-17  207        struct 
caam_drv_private_jr *jrp = from_tasklet(jrp, t, irqtask);
8e8ec596e6c0144 Kim Phillips     2011-03-13  208        void (*usercall)(struct 
device *dev, u32 *desc, u32 status, void *arg);
8e8ec596e6c0144 Kim Phillips     2011-03-13  209        u32 *userdesc, 
userstatus;
8e8ec596e6c0144 Kim Phillips     2011-03-13  210        void *userarg;
16c4dd83a1b2a23 Vakul Garg       2019-03-05  211        u32 outring_used = 0;
8e8ec596e6c0144 Kim Phillips     2011-03-13  212  
16c4dd83a1b2a23 Vakul Garg       2019-03-05  213        while (outring_used ||
16c4dd83a1b2a23 Vakul Garg       2019-03-05  214               (outring_used = 
rd_reg32(&jrp->rregs->outring_used))) {
8e8ec596e6c0144 Kim Phillips     2011-03-13  215  
6aa7de059173a98 Mark Rutland     2017-10-23  216                head = 
READ_ONCE(jrp->head);
8e8ec596e6c0144 Kim Phillips     2011-03-13  217  
a8ea07c21d40cf1 Kim Phillips     2012-06-22  218                sw_idx = tail = 
jrp->tail;
8e8ec596e6c0144 Kim Phillips     2011-03-13  219                hw_idx = 
jrp->out_ring_read_index;
a8ea07c21d40cf1 Kim Phillips     2012-06-22  220  
8e8ec596e6c0144 Kim Phillips     2011-03-13  221                for (i = 0; 
CIRC_CNT(head, tail + i, JOBR_DEPTH) >= 1; i++) {
8e8ec596e6c0144 Kim Phillips     2011-03-13  222                        sw_idx 
= (tail + i) & (JOBR_DEPTH - 1);
8e8ec596e6c0144 Kim Phillips     2011-03-13  223  
6c5f898f12a3d65 Andrey Smirnov   2019-08-20  224                        if 
(jr_outentry_desc(jrp->outring, hw_idx) ==
261ea058f016bc0 Horia Geantă     2016-05-19  225                            
caam_dma_to_cpu(jrp->entinfo[sw_idx].desc_addr_dma))
8e8ec596e6c0144 Kim Phillips     2011-03-13  226                                
break; /* found */
8e8ec596e6c0144 Kim Phillips     2011-03-13  227                }
8e8ec596e6c0144 Kim Phillips     2011-03-13  228                /* we should 
never fail to find a matching descriptor */
8e8ec596e6c0144 Kim Phillips     2011-03-13  229                
BUG_ON(CIRC_CNT(head, tail + i, JOBR_DEPTH) <= 0);
8e8ec596e6c0144 Kim Phillips     2011-03-13  230  
8e8ec596e6c0144 Kim Phillips     2011-03-13  231                /* Unmap 
just-run descriptor so we can post-process */
cc98963dbaaea93 Horia Geantă     2018-08-06 @232                
dma_unmap_single(dev,
6c5f898f12a3d65 Andrey Smirnov   2019-08-20  233                                
 caam_dma_to_cpu(jr_outentry_desc(jrp->outring,
6c5f898f12a3d65 Andrey Smirnov   2019-08-20  234                                
                                  hw_idx)),
8e8ec596e6c0144 Kim Phillips     2011-03-13  235                                
 jrp->entinfo[sw_idx].desc_size,
8e8ec596e6c0144 Kim Phillips     2011-03-13  236                                
 DMA_TO_DEVICE);
8e8ec596e6c0144 Kim Phillips     2011-03-13  237  
8e8ec596e6c0144 Kim Phillips     2011-03-13  238                /* mark 
completed, avoid matching on a recycled desc addr */
8e8ec596e6c0144 Kim Phillips     2011-03-13  239                
jrp->entinfo[sw_idx].desc_addr_dma = 0;
8e8ec596e6c0144 Kim Phillips     2011-03-13  240  
a118dfa0dbfcc8e Vakul Garg       2019-03-22  241                /* Stash 
callback params */
8e8ec596e6c0144 Kim Phillips     2011-03-13  242                usercall = 
jrp->entinfo[sw_idx].callbk;
8e8ec596e6c0144 Kim Phillips     2011-03-13  243                userarg = 
jrp->entinfo[sw_idx].cbkarg;
8e8ec596e6c0144 Kim Phillips     2011-03-13  244                userdesc = 
jrp->entinfo[sw_idx].desc_addr_virt;
6c5f898f12a3d65 Andrey Smirnov   2019-08-20  245                userstatus = 
caam32_to_cpu(jr_outentry_jrstatus(jrp->outring,
6c5f898f12a3d65 Andrey Smirnov   2019-08-20  246                                
                                hw_idx));
8e8ec596e6c0144 Kim Phillips     2011-03-13  247  
e7472422392461f Victoria Milhoan 2015-08-05  248                /*
e7472422392461f Victoria Milhoan 2015-08-05  249                 * Make sure 
all information from the job has been obtained
e7472422392461f Victoria Milhoan 2015-08-05  250                 * before 
telling CAAM that the job has been removed from the
e7472422392461f Victoria Milhoan 2015-08-05  251                 * output ring.
e7472422392461f Victoria Milhoan 2015-08-05  252                 */
e7472422392461f Victoria Milhoan 2015-08-05  253                mb();
e7472422392461f Victoria Milhoan 2015-08-05  254  
14a8e29cc201239 Kim Phillips     2012-06-22  255                /* set done */
cbc22b062106993 Herbert Xu       2019-05-09  256                
wr_reg32(&jrp->rregs->outring_rmvd, 1);
8e8ec596e6c0144 Kim Phillips     2011-03-13  257  
8e8ec596e6c0144 Kim Phillips     2011-03-13  258                
jrp->out_ring_read_index = (jrp->out_ring_read_index + 1) &
8e8ec596e6c0144 Kim Phillips     2011-03-13  259                                
           (JOBR_DEPTH - 1);
8e8ec596e6c0144 Kim Phillips     2011-03-13  260  
8e8ec596e6c0144 Kim Phillips     2011-03-13  261                /*
8e8ec596e6c0144 Kim Phillips     2011-03-13  262                 * if this job 
completed out-of-order, do not increment
8e8ec596e6c0144 Kim Phillips     2011-03-13  263                 * the tail.  
Otherwise, increment tail by 1 plus the
8e8ec596e6c0144 Kim Phillips     2011-03-13  264                 * number of 
subsequent jobs already completed out-of-order
8e8ec596e6c0144 Kim Phillips     2011-03-13  265                 */
8e8ec596e6c0144 Kim Phillips     2011-03-13  266                if (sw_idx == 
tail) {
8e8ec596e6c0144 Kim Phillips     2011-03-13  267                        do {
8e8ec596e6c0144 Kim Phillips     2011-03-13  268                                
tail = (tail + 1) & (JOBR_DEPTH - 1);
8e8ec596e6c0144 Kim Phillips     2011-03-13  269                        } while 
(CIRC_CNT(head, tail, JOBR_DEPTH) >= 1 &&
8e8ec596e6c0144 Kim Phillips     2011-03-13  270                                
 jrp->entinfo[tail].desc_addr_dma == 0);
8e8ec596e6c0144 Kim Phillips     2011-03-13  271  
8e8ec596e6c0144 Kim Phillips     2011-03-13  272                        
jrp->tail = tail;
8e8ec596e6c0144 Kim Phillips     2011-03-13  273                }
8e8ec596e6c0144 Kim Phillips     2011-03-13  274  
8e8ec596e6c0144 Kim Phillips     2011-03-13  275                /* Finally, 
execute user's callback */
8e8ec596e6c0144 Kim Phillips     2011-03-13  276                usercall(dev, 
userdesc, userstatus, userarg);
16c4dd83a1b2a23 Vakul Garg       2019-03-05  277                outring_used--;
8e8ec596e6c0144 Kim Phillips     2011-03-13  278        }
8e8ec596e6c0144 Kim Phillips     2011-03-13  279  
8e8ec596e6c0144 Kim Phillips     2011-03-13  280        /* reenable / unmask 
IRQs */
261ea058f016bc0 Horia Geantă     2016-05-19  281        
clrsetbits_32(&jrp->rregs->rconfig_lo, JRCFG_IMSK, 0);
8e8ec596e6c0144 Kim Phillips     2011-03-13  282  }
8e8ec596e6c0144 Kim Phillips     2011-03-13  283  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org

Attachment: .config.gz
Description: application/gzip

Reply via email to