Subject: Re: [PATCH net-next 06/18] ionic: Add basic adminq support

From: kbuild test robot <[email-masked]>
Date: Fri, 21 Jun 2019 14:03:46 +0800

Hi Shannon,

I love your patch! Yet something to improve:

[auto build test ERROR on net-next/master]

url:    https://github.com/0day-ci/linux/commits/Shannon-Nelson/ionic-Add-basic-framework-for-IONIC-Network-device-driver/20190621-110046
config: mips-allmodconfig (attached as .config)
compiler: mips-linux-gcc (GCC) 7.4.0
reproduce:
        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
        GCC_VERSION=7.4.0 make.cross ARCH=mips 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <[email-masked]>

All errors (new ones prefixed by >>):

   drivers/net/ethernet/pensando/ionic/ionic_debugfs.c: In function 'ionic_debugfs_add_qcq':
>> drivers/net/ethernet/pensando/ionic/ionic_debugfs.c:310:50: error: passing argument 4 of 'debugfs_create_x64' from incompatible pointer type [-Werror=incompatible-pointer-types]
     debugfs_create_x64("base_pa", 0400, qcq_dentry, &qcq->base_pa);
                                                     ^
   In file included from drivers/net/ethernet/pensando/ionic/ionic_debugfs.h:7:0,
                    from drivers/net/ethernet/pensando/ionic/ionic_debugfs.c:10:
   include/linux/debugfs.h:116:16: note: expected 'u64 * {aka long long unsigned int *}' but argument is of type 'dma_addr_t * {aka unsigned int *}'
    struct dentry *debugfs_create_x64(const char *name, umode_t mode,
                   ^~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/pensando/ionic/ionic_debugfs.c:317:48: error: passing argument 4 of 'debugfs_create_x64' from incompatible pointer type [-Werror=incompatible-pointer-types]
     debugfs_create_x64("base_pa", 0400, q_dentry, &q->base_pa);
                                                   ^
   In file included from drivers/net/ethernet/pensando/ionic/ionic_debugfs.h:7:0,
                    from drivers/net/ethernet/pensando/ionic/ionic_debugfs.c:10:
   include/linux/debugfs.h:116:16: note: expected 'u64 * {aka long long unsigned int *}' but argument is of type 'dma_addr_t * {aka unsigned int *}'
    struct dentry *debugfs_create_x64(const char *name, umode_t mode,
                   ^~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/pensando/ionic/ionic_debugfs.c:320:8: error: passing argument 4 of 'debugfs_create_x64' from incompatible pointer type [-Werror=incompatible-pointer-types]
           &q->sg_base_pa);
           ^
   In file included from drivers/net/ethernet/pensando/ionic/ionic_debugfs.h:7:0,
                    from drivers/net/ethernet/pensando/ionic/ionic_debugfs.c:10:
   include/linux/debugfs.h:116:16: note: expected 'u64 * {aka long long unsigned int *}' but argument is of type 'dma_addr_t * {aka unsigned int *}'
    struct dentry *debugfs_create_x64(const char *name, umode_t mode,
                   ^~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/pensando/ionic/ionic_debugfs.c:357:49: error: passing argument 4 of 'debugfs_create_x64' from incompatible pointer type [-Werror=incompatible-pointer-types]
     debugfs_create_x64("base_pa", 0400, cq_dentry, &cq->base_pa);
                                                    ^
   In file included from drivers/net/ethernet/pensando/ionic/ionic_debugfs.h:7:0,
                    from drivers/net/ethernet/pensando/ionic/ionic_debugfs.c:10:
   include/linux/debugfs.h:116:16: note: expected 'u64 * {aka long long unsigned int *}' but argument is of type 'dma_addr_t * {aka unsigned int *}'
    struct dentry *debugfs_create_x64(const char *name, umode_t mode,
                   ^~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors

vim +/debugfs_create_x64 +310 drivers/net/ethernet/pensando/ionic/ionic_debugfs.c

   292	
   293	int ionic_debugfs_add_qcq(struct lif *lif, struct qcq *qcq)
   294	{
   295		struct dentry *qcq_dentry, *q_dentry, *cq_dentry, *intr_dentry;
   296		struct ionic_dev *idev = &lif->ionic->idev;
   297		struct debugfs_regset32 *intr_ctrl_regset;
   298		struct debugfs_blob_wrapper *desc_blob;
   299		struct device *dev = lif->ionic->dev;
   300		struct intr *intr = &qcq->intr;
   301		struct queue *q = &qcq->q;
   302		struct cq *cq = &qcq->cq;
   303	
   304		qcq_dentry = debugfs_create_dir(q->name, lif->dentry);
   305		if (IS_ERR_OR_NULL(qcq_dentry))
   306			return PTR_ERR(qcq_dentry);
   307		qcq->dentry = qcq_dentry;
   308	
   309		debugfs_create_x32("total_size", 0400, qcq_dentry, &qcq->total_size);
 > 310		debugfs_create_x64("base_pa", 0400, qcq_dentry, &qcq->base_pa);
   311	
   312		q_dentry = debugfs_create_dir("q", qcq_dentry);
   313		if (IS_ERR_OR_NULL(q_dentry))
   314			return PTR_ERR(q_dentry);
   315	
   316		debugfs_create_u32("index", 0400, q_dentry, &q->index);
   317		debugfs_create_x64("base_pa", 0400, q_dentry, &q->base_pa);
   318		if (qcq->flags & QCQ_F_SG) {
   319			debugfs_create_x64("sg_base_pa", 0400, q_dentry,
   320					   &q->sg_base_pa);
   321			debugfs_create_u32("sg_desc_size", 0400, q_dentry,
   322					   &q->sg_desc_size);
   323		}
   324		debugfs_create_u32("num_descs", 0400, q_dentry, &q->num_descs);
   325		debugfs_create_u32("desc_size", 0400, q_dentry, &q->desc_size);
   326		debugfs_create_u32("pid", 0400, q_dentry, &q->pid);
   327		debugfs_create_u32("qid", 0400, q_dentry, &q->hw_index);
   328		debugfs_create_u32("qtype", 0400, q_dentry, &q->hw_type);
   329		debugfs_create_u64("drop", 0400, q_dentry, &q->drop);
   330		debugfs_create_u64("stop", 0400, q_dentry, &q->stop);
   331		debugfs_create_u64("wake", 0400, q_dentry, &q->wake);
   332	
   333		debugfs_create_file("tail", 0400, q_dentry, q, &q_tail_fops);
   334		debugfs_create_file("head", 0400, q_dentry, q, &q_head_fops);
   335	
   336		desc_blob = devm_kzalloc(dev, sizeof(*desc_blob), GFP_KERNEL);
   337		if (!desc_blob)
   338			return -ENOMEM;
   339		desc_blob->data = q->base;
   340		desc_blob->size = (unsigned long)q->num_descs * q->desc_size;
   341		debugfs_create_blob("desc_blob", 0400, q_dentry, desc_blob);
   342	
   343		if (qcq->flags & QCQ_F_SG) {
   344			desc_blob = devm_kzalloc(dev, sizeof(*desc_blob), GFP_KERNEL);
   345			if (!desc_blob)
   346				return -ENOMEM;
   347			desc_blob->data = q->sg_base;
   348			desc_blob->size = (unsigned long)q->num_descs * q->sg_desc_size;
   349			debugfs_create_blob("sg_desc_blob", 0400, q_dentry,
   350					    desc_blob);
   351		}
   352	
   353		cq_dentry = debugfs_create_dir("cq", qcq_dentry);
   354		if (IS_ERR_OR_NULL(cq_dentry))
   355			return PTR_ERR(cq_dentry);
   356	
   357		debugfs_create_x64("base_pa", 0400, cq_dentry, &cq->base_pa);
   358		debugfs_create_u32("num_descs", 0400, cq_dentry, &cq->num_descs);
   359		debugfs_create_u32("desc_size", 0400, cq_dentry, &cq->desc_size);
   360		debugfs_create_u8("done_color", 0400, cq_dentry,
   361				  (u8 *)&cq->done_color);
   362	
   363		debugfs_create_file("tail", 0400, cq_dentry, cq, &cq_tail_fops);
   364	
   365		desc_blob = devm_kzalloc(dev, sizeof(*desc_blob), GFP_KERNEL);
   366		if (!desc_blob)
   367			return -ENOMEM;
   368		desc_blob->data = cq->base;
   369		desc_blob->size = (unsigned long)cq->num_descs * cq->desc_size;
   370		debugfs_create_blob("desc_blob", 0400, cq_dentry, desc_blob);
   371	
   372		if (qcq->flags & QCQ_F_INTR) {
   373			intr_dentry = debugfs_create_dir("intr", qcq_dentry);
   374			if (IS_ERR_OR_NULL(intr_dentry))
   375				return PTR_ERR(intr_dentry);
   376	
   377			debugfs_create_u32("index", 0400, intr_dentry,
   378					   &intr->index);
   379			debugfs_create_u32("vector", 0400, intr_dentry,
   380					   &intr->vector);
   381	
   382			intr_ctrl_regset = devm_kzalloc(dev, sizeof(*intr_ctrl_regset),
   383							GFP_KERNEL);
   384			if (!intr_ctrl_regset)
   385				return -ENOMEM;
   386			intr_ctrl_regset->regs = intr_ctrl_regs;
   387			intr_ctrl_regset->nregs = ARRAY_SIZE(intr_ctrl_regs);
   388			intr_ctrl_regset->base = &idev->intr_ctrl[intr->index];
   389	
   390			debugfs_create_regset32("intr_ctrl", 0400, intr_dentry,
   391						intr_ctrl_regset);
   392		}
   393	
   394		return 0;
   395	}
   396	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation