lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <201805171021.69VvsDaP%fengguang.wu@intel.com>
Date:   Thu, 17 May 2018 11:02:51 +0800
From:   kbuild test robot <lkp@...el.com>
To:     Florian Fainelli <f.fainelli@...il.com>
Cc:     kbuild-all@...org, netdev@...r.kernel.org,
        Florian Fainelli <f.fainelli@...il.com>,
        "David S. Miller" <davem@...emloft.net>,
        Andrew Lunn <andrew@...n.ch>,
        open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH net-next 1/3] net: ethernet: ti: Allow most drivers with
 COMPILE_TEST

Hi Florian,

I love your patch! Perhaps something to improve:

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

url:    https://github.com/0day-ci/linux/commits/Florian-Fainelli/net-Allow-more-drivers-with-COMPILE_TEST/20180517-092807
config: i386-allmodconfig (attached as .config)
compiler: gcc-7 (Debian 7.3.0-16) 7.3.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All warnings (new ones prefixed by >>):

   In file included from arch/x86/include/asm/realmode.h:15:0,
                    from arch/x86/include/asm/acpi.h:33,
                    from arch/x86/include/asm/fixmap.h:19,
                    from arch/x86/include/asm/apic.h:10,
                    from arch/x86/include/asm/smp.h:13,
                    from include/linux/smp.h:64,
                    from include/linux/topology.h:33,
                    from include/linux/gfp.h:9,
                    from include/linux/idr.h:16,
                    from include/linux/kernfs.h:14,
                    from include/linux/sysfs.h:16,
                    from include/linux/kobject.h:20,
                    from include/linux/device.h:16,
                    from drivers/net/ethernet/ti/davinci_cpdma.c:17:
   drivers/net/ethernet/ti/davinci_cpdma.c: In function 'cpdma_chan_submit':
>> drivers/net/ethernet/ti/davinci_cpdma.c:1083:17: warning: passing argument 1 of '__writel' makes integer from pointer without a cast [-Wint-conversion]
     writel_relaxed(token, &desc->sw_token);
                    ^
   arch/x86/include/asm/io.h:88:39: note: in definition of macro 'writel_relaxed'
    #define writel_relaxed(v, a) __writel(v, a)
                                          ^
   arch/x86/include/asm/io.h:71:18: note: expected 'unsigned int' but argument is of type 'void *'
    build_mmio_write(__writel, "l", unsigned int, "r", )
                     ^
   arch/x86/include/asm/io.h:53:20: note: in definition of macro 'build_mmio_write'
    static inline void name(type val, volatile void __iomem *addr) \
                       ^~~~

vim +/__writel +1083 drivers/net/ethernet/ti/davinci_cpdma.c

ef8c2dab drivers/net/davinci_cpdma.c             Cyril Chemparathy 2010-09-15  1029  
ef8c2dab drivers/net/davinci_cpdma.c             Cyril Chemparathy 2010-09-15  1030  int cpdma_chan_submit(struct cpdma_chan *chan, void *token, void *data,
aef614e1 drivers/net/ethernet/ti/davinci_cpdma.c Sebastian Siewior 2013-04-23  1031  		      int len, int directed)
ef8c2dab drivers/net/davinci_cpdma.c             Cyril Chemparathy 2010-09-15  1032  {
ef8c2dab drivers/net/davinci_cpdma.c             Cyril Chemparathy 2010-09-15  1033  	struct cpdma_ctlr		*ctlr = chan->ctlr;
ef8c2dab drivers/net/davinci_cpdma.c             Cyril Chemparathy 2010-09-15  1034  	struct cpdma_desc __iomem	*desc;
ef8c2dab drivers/net/davinci_cpdma.c             Cyril Chemparathy 2010-09-15  1035  	dma_addr_t			buffer;
ef8c2dab drivers/net/davinci_cpdma.c             Cyril Chemparathy 2010-09-15  1036  	unsigned long			flags;
ef8c2dab drivers/net/davinci_cpdma.c             Cyril Chemparathy 2010-09-15  1037  	u32				mode;
ef8c2dab drivers/net/davinci_cpdma.c             Cyril Chemparathy 2010-09-15  1038  	int				ret = 0;
ef8c2dab drivers/net/davinci_cpdma.c             Cyril Chemparathy 2010-09-15  1039  
ef8c2dab drivers/net/davinci_cpdma.c             Cyril Chemparathy 2010-09-15  1040  	spin_lock_irqsave(&chan->lock, flags);
ef8c2dab drivers/net/davinci_cpdma.c             Cyril Chemparathy 2010-09-15  1041  
ef8c2dab drivers/net/davinci_cpdma.c             Cyril Chemparathy 2010-09-15  1042  	if (chan->state == CPDMA_STATE_TEARDOWN) {
ef8c2dab drivers/net/davinci_cpdma.c             Cyril Chemparathy 2010-09-15  1043  		ret = -EINVAL;
ef8c2dab drivers/net/davinci_cpdma.c             Cyril Chemparathy 2010-09-15  1044  		goto unlock_ret;
ef8c2dab drivers/net/davinci_cpdma.c             Cyril Chemparathy 2010-09-15  1045  	}
ef8c2dab drivers/net/davinci_cpdma.c             Cyril Chemparathy 2010-09-15  1046  
742fb20f drivers/net/ethernet/ti/davinci_cpdma.c Grygorii Strashko 2016-06-27  1047  	if (chan->count >= chan->desc_num)	{
742fb20f drivers/net/ethernet/ti/davinci_cpdma.c Grygorii Strashko 2016-06-27  1048  		chan->stats.desc_alloc_fail++;
742fb20f drivers/net/ethernet/ti/davinci_cpdma.c Grygorii Strashko 2016-06-27  1049  		ret = -ENOMEM;
742fb20f drivers/net/ethernet/ti/davinci_cpdma.c Grygorii Strashko 2016-06-27  1050  		goto unlock_ret;
742fb20f drivers/net/ethernet/ti/davinci_cpdma.c Grygorii Strashko 2016-06-27  1051  	}
742fb20f drivers/net/ethernet/ti/davinci_cpdma.c Grygorii Strashko 2016-06-27  1052  
742fb20f drivers/net/ethernet/ti/davinci_cpdma.c Grygorii Strashko 2016-06-27  1053  	desc = cpdma_desc_alloc(ctlr->pool);
ef8c2dab drivers/net/davinci_cpdma.c             Cyril Chemparathy 2010-09-15  1054  	if (!desc) {
ef8c2dab drivers/net/davinci_cpdma.c             Cyril Chemparathy 2010-09-15  1055  		chan->stats.desc_alloc_fail++;
ef8c2dab drivers/net/davinci_cpdma.c             Cyril Chemparathy 2010-09-15  1056  		ret = -ENOMEM;
ef8c2dab drivers/net/davinci_cpdma.c             Cyril Chemparathy 2010-09-15  1057  		goto unlock_ret;
ef8c2dab drivers/net/davinci_cpdma.c             Cyril Chemparathy 2010-09-15  1058  	}
ef8c2dab drivers/net/davinci_cpdma.c             Cyril Chemparathy 2010-09-15  1059  
ef8c2dab drivers/net/davinci_cpdma.c             Cyril Chemparathy 2010-09-15  1060  	if (len < ctlr->params.min_packet_size) {
ef8c2dab drivers/net/davinci_cpdma.c             Cyril Chemparathy 2010-09-15  1061  		len = ctlr->params.min_packet_size;
ef8c2dab drivers/net/davinci_cpdma.c             Cyril Chemparathy 2010-09-15  1062  		chan->stats.runt_transmit_buff++;
ef8c2dab drivers/net/davinci_cpdma.c             Cyril Chemparathy 2010-09-15  1063  	}
ef8c2dab drivers/net/davinci_cpdma.c             Cyril Chemparathy 2010-09-15  1064  
ef8c2dab drivers/net/davinci_cpdma.c             Cyril Chemparathy 2010-09-15  1065  	buffer = dma_map_single(ctlr->dev, data, len, chan->dir);
14bd0769 drivers/net/ethernet/ti/davinci_cpdma.c Sebastian Siewior 2013-06-20  1066  	ret = dma_mapping_error(ctlr->dev, buffer);
14bd0769 drivers/net/ethernet/ti/davinci_cpdma.c Sebastian Siewior 2013-06-20  1067  	if (ret) {
14bd0769 drivers/net/ethernet/ti/davinci_cpdma.c Sebastian Siewior 2013-06-20  1068  		cpdma_desc_free(ctlr->pool, desc, 1);
14bd0769 drivers/net/ethernet/ti/davinci_cpdma.c Sebastian Siewior 2013-06-20  1069  		ret = -EINVAL;
14bd0769 drivers/net/ethernet/ti/davinci_cpdma.c Sebastian Siewior 2013-06-20  1070  		goto unlock_ret;
14bd0769 drivers/net/ethernet/ti/davinci_cpdma.c Sebastian Siewior 2013-06-20  1071  	}
14bd0769 drivers/net/ethernet/ti/davinci_cpdma.c Sebastian Siewior 2013-06-20  1072  
ef8c2dab drivers/net/davinci_cpdma.c             Cyril Chemparathy 2010-09-15  1073  	mode = CPDMA_DESC_OWNER | CPDMA_DESC_SOP | CPDMA_DESC_EOP;
f6e135c8 drivers/net/ethernet/ti/davinci_cpdma.c Mugunthan V N     2013-02-11  1074  	cpdma_desc_to_port(chan, mode, directed);
ef8c2dab drivers/net/davinci_cpdma.c             Cyril Chemparathy 2010-09-15  1075  
a6c83ccf drivers/net/ethernet/ti/davinci_cpdma.c Grygorii Strashko 2017-01-06  1076  	/* Relaxed IO accessors can be used here as there is read barrier
a6c83ccf drivers/net/ethernet/ti/davinci_cpdma.c Grygorii Strashko 2017-01-06  1077  	 * at the end of write sequence.
a6c83ccf drivers/net/ethernet/ti/davinci_cpdma.c Grygorii Strashko 2017-01-06  1078  	 */
a6c83ccf drivers/net/ethernet/ti/davinci_cpdma.c Grygorii Strashko 2017-01-06  1079  	writel_relaxed(0, &desc->hw_next);
a6c83ccf drivers/net/ethernet/ti/davinci_cpdma.c Grygorii Strashko 2017-01-06  1080  	writel_relaxed(buffer, &desc->hw_buffer);
a6c83ccf drivers/net/ethernet/ti/davinci_cpdma.c Grygorii Strashko 2017-01-06  1081  	writel_relaxed(len, &desc->hw_len);
a6c83ccf drivers/net/ethernet/ti/davinci_cpdma.c Grygorii Strashko 2017-01-06  1082  	writel_relaxed(mode | len, &desc->hw_mode);
a6c83ccf drivers/net/ethernet/ti/davinci_cpdma.c Grygorii Strashko 2017-01-06 @1083  	writel_relaxed(token, &desc->sw_token);
a6c83ccf drivers/net/ethernet/ti/davinci_cpdma.c Grygorii Strashko 2017-01-06  1084  	writel_relaxed(buffer, &desc->sw_buffer);
a6c83ccf drivers/net/ethernet/ti/davinci_cpdma.c Grygorii Strashko 2017-01-06  1085  	writel_relaxed(len, &desc->sw_len);
a6c83ccf drivers/net/ethernet/ti/davinci_cpdma.c Grygorii Strashko 2017-01-06  1086  	desc_read(desc, sw_len);
ef8c2dab drivers/net/davinci_cpdma.c             Cyril Chemparathy 2010-09-15  1087  
ef8c2dab drivers/net/davinci_cpdma.c             Cyril Chemparathy 2010-09-15  1088  	__cpdma_chan_submit(chan, desc);
ef8c2dab drivers/net/davinci_cpdma.c             Cyril Chemparathy 2010-09-15  1089  
ef8c2dab drivers/net/davinci_cpdma.c             Cyril Chemparathy 2010-09-15  1090  	if (chan->state == CPDMA_STATE_ACTIVE && chan->rxfree)
ef8c2dab drivers/net/davinci_cpdma.c             Cyril Chemparathy 2010-09-15  1091  		chan_write(chan, rxfree, 1);
ef8c2dab drivers/net/davinci_cpdma.c             Cyril Chemparathy 2010-09-15  1092  
ef8c2dab drivers/net/davinci_cpdma.c             Cyril Chemparathy 2010-09-15  1093  	chan->count++;
ef8c2dab drivers/net/davinci_cpdma.c             Cyril Chemparathy 2010-09-15  1094  
ef8c2dab drivers/net/davinci_cpdma.c             Cyril Chemparathy 2010-09-15  1095  unlock_ret:
ef8c2dab drivers/net/davinci_cpdma.c             Cyril Chemparathy 2010-09-15  1096  	spin_unlock_irqrestore(&chan->lock, flags);
ef8c2dab drivers/net/davinci_cpdma.c             Cyril Chemparathy 2010-09-15  1097  	return ret;
ef8c2dab drivers/net/davinci_cpdma.c             Cyril Chemparathy 2010-09-15  1098  }
32a6d90b drivers/net/ethernet/ti/davinci_cpdma.c Arnd Bergmann     2012-04-20  1099  EXPORT_SYMBOL_GPL(cpdma_chan_submit);
ef8c2dab drivers/net/davinci_cpdma.c             Cyril Chemparathy 2010-09-15  1100  

:::::: The code at line 1083 was first introduced by commit
:::::: a6c83ccf3c534214e0aeb167a70391864da9b1fc net: ethernet: ti: cpdma: am437x: allow descs to be plased in ddr

:::::: TO: Grygorii Strashko <grygorii.strashko@...com>
:::::: CC: David S. Miller <davem@...emloft.net>

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

Download attachment ".config.gz" of type "application/gzip" (63048 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ