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: <201910271638.QrkwVkoo%lkp@intel.com>
Date:   Sun, 27 Oct 2019 16:05:43 +0800
From:   kbuild test robot <lkp@...el.com>
To:     Grygorii Strashko <grygorii.strashko@...com>
Cc:     kbuild-all@...ts.01.org, netdev@...r.kernel.org,
        Ilias Apalodimas <ilias.apalodimas@...aro.org>,
        Andrew Lunn <andrew@...n.ch>,
        "David S . Miller" <davem@...emloft.net>,
        Ivan Khoronzhuk <ivan.khoronzhuk@...aro.org>,
        Jiri Pirko <jiri@...nulli.us>,
        Florian Fainelli <f.fainelli@...il.com>,
        Sekhar Nori <nsekhar@...com>, linux-kernel@...r.kernel.org,
        linux-omap@...r.kernel.org, Murali Karicheri <m-karicheri2@...com>,
        Ivan Vecera <ivecera@...hat.com>,
        Rob Herring <robh+dt@...nel.org>, devicetree@...r.kernel.org,
        Grygorii Strashko <grygorii.strashko@...com>
Subject: Re: [PATCH v5 net-next 06/12] net: ethernet: ti: introduce cpsw
  switchdev based driver part 1 - dual-emac

Hi Grygorii,

I love your patch! Yet something to improve:

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

url:    https://github.com/0day-ci/linux/commits/Grygorii-Strashko/net-ethernet-ti-introduce-new-cpsw-switchdev-based-driver/20191027-143414
base:   https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 503a64635d5ef7351657c78ad77f8b5ff658d5fc
config: alpha-allyesconfig (attached as .config)
compiler: alpha-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=alpha 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@...el.com>

All error/warnings (new ones prefixed by >>):

   drivers/net/ethernet/ti/cpsw_priv.c: In function 'cpsw_init_common':
>> drivers/net/ethernet/ti/cpsw_priv.c:520:14: error: implicit declaration of function 'of_get_child_by_name'; did you mean '__dev_get_by_name'? [-Werror=implicit-function-declaration]
     cpts_node = of_get_child_by_name(cpsw->dev->of_node, "cpts");
                 ^~~~~~~~~~~~~~~~~~~~
                 __dev_get_by_name
>> drivers/net/ethernet/ti/cpsw_priv.c:520:12: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
     cpts_node = of_get_child_by_name(cpsw->dev->of_node, "cpts");
               ^
>> drivers/net/ethernet/ti/cpsw_priv.c:529:2: error: implicit declaration of function 'of_node_put'; did you mean '__node_set'? [-Werror=implicit-function-declaration]
     of_node_put(cpts_node);
     ^~~~~~~~~~~
     __node_set
   cc1: some warnings being treated as errors

vim +520 drivers/net/ethernet/ti/cpsw_priv.c

   415	
   416	int cpsw_init_common(struct cpsw_common *cpsw, void __iomem *ss_regs,
   417			     int ale_ageout, phys_addr_t desc_mem_phys,
   418			     int descs_pool_size)
   419	{
   420		u32 slave_offset, sliver_offset, slave_size;
   421		struct cpsw_ale_params ale_params;
   422		struct cpsw_platform_data *data;
   423		struct cpdma_params dma_params;
   424		struct device *dev = cpsw->dev;
   425		struct device_node *cpts_node;
   426		void __iomem *cpts_regs;
   427		int ret = 0, i;
   428	
   429		data = &cpsw->data;
   430		cpsw->rx_ch_num = 1;
   431		cpsw->tx_ch_num = 1;
   432	
   433		cpsw->version = readl(&cpsw->regs->id_ver);
   434	
   435		memset(&dma_params, 0, sizeof(dma_params));
   436		memset(&ale_params, 0, sizeof(ale_params));
   437	
   438		switch (cpsw->version) {
   439		case CPSW_VERSION_1:
   440			cpsw->host_port_regs = ss_regs + CPSW1_HOST_PORT_OFFSET;
   441			cpts_regs	     = ss_regs + CPSW1_CPTS_OFFSET;
   442			cpsw->hw_stats	     = ss_regs + CPSW1_HW_STATS;
   443			dma_params.dmaregs   = ss_regs + CPSW1_CPDMA_OFFSET;
   444			dma_params.txhdp     = ss_regs + CPSW1_STATERAM_OFFSET;
   445			ale_params.ale_regs  = ss_regs + CPSW1_ALE_OFFSET;
   446			slave_offset         = CPSW1_SLAVE_OFFSET;
   447			slave_size           = CPSW1_SLAVE_SIZE;
   448			sliver_offset        = CPSW1_SLIVER_OFFSET;
   449			dma_params.desc_mem_phys = 0;
   450			break;
   451		case CPSW_VERSION_2:
   452		case CPSW_VERSION_3:
   453		case CPSW_VERSION_4:
   454			cpsw->host_port_regs = ss_regs + CPSW2_HOST_PORT_OFFSET;
   455			cpts_regs	     = ss_regs + CPSW2_CPTS_OFFSET;
   456			cpsw->hw_stats	     = ss_regs + CPSW2_HW_STATS;
   457			dma_params.dmaregs   = ss_regs + CPSW2_CPDMA_OFFSET;
   458			dma_params.txhdp     = ss_regs + CPSW2_STATERAM_OFFSET;
   459			ale_params.ale_regs  = ss_regs + CPSW2_ALE_OFFSET;
   460			slave_offset         = CPSW2_SLAVE_OFFSET;
   461			slave_size           = CPSW2_SLAVE_SIZE;
   462			sliver_offset        = CPSW2_SLIVER_OFFSET;
   463			dma_params.desc_mem_phys = desc_mem_phys;
   464			break;
   465		default:
   466			dev_err(dev, "unknown version 0x%08x\n", cpsw->version);
   467			return -ENODEV;
   468		}
   469	
   470		for (i = 0; i < cpsw->data.slaves; i++) {
   471			struct cpsw_slave *slave = &cpsw->slaves[i];
   472			void __iomem		*regs = cpsw->regs;
   473	
   474			slave->slave_num = i;
   475			slave->data	= &cpsw->data.slave_data[i];
   476			slave->regs	= regs + slave_offset;
   477			slave->port_vlan = slave->data->dual_emac_res_vlan;
   478			slave->mac_sl = cpsw_sl_get("cpsw", dev, regs + sliver_offset);
   479			if (IS_ERR(slave->mac_sl))
   480				return PTR_ERR(slave->mac_sl);
   481	
   482			slave_offset  += slave_size;
   483			sliver_offset += SLIVER_SIZE;
   484		}
   485	
   486		ale_params.dev			= dev;
   487		ale_params.ale_ageout		= ale_ageout;
   488		ale_params.ale_entries		= data->ale_entries;
   489		ale_params.ale_ports		= CPSW_ALE_PORTS_NUM;
   490	
   491		cpsw->ale = cpsw_ale_create(&ale_params);
   492		if (!cpsw->ale) {
   493			dev_err(dev, "error initializing ale engine\n");
   494			return -ENODEV;
   495		}
   496	
   497		dma_params.dev		= dev;
   498		dma_params.rxthresh	= dma_params.dmaregs + CPDMA_RXTHRESH;
   499		dma_params.rxfree	= dma_params.dmaregs + CPDMA_RXFREE;
   500		dma_params.rxhdp	= dma_params.txhdp + CPDMA_RXHDP;
   501		dma_params.txcp		= dma_params.txhdp + CPDMA_TXCP;
   502		dma_params.rxcp		= dma_params.txhdp + CPDMA_RXCP;
   503	
   504		dma_params.num_chan		= data->channels;
   505		dma_params.has_soft_reset	= true;
   506		dma_params.min_packet_size	= CPSW_MIN_PACKET_SIZE;
   507		dma_params.desc_mem_size	= data->bd_ram_size;
   508		dma_params.desc_align		= 16;
   509		dma_params.has_ext_regs		= true;
   510		dma_params.desc_hw_addr         = dma_params.desc_mem_phys;
   511		dma_params.bus_freq_mhz		= cpsw->bus_freq_mhz;
   512		dma_params.descs_pool_size	= descs_pool_size;
   513	
   514		cpsw->dma = cpdma_ctlr_create(&dma_params);
   515		if (!cpsw->dma) {
   516			dev_err(dev, "error initializing dma\n");
   517			return -ENOMEM;
   518		}
   519	
 > 520		cpts_node = of_get_child_by_name(cpsw->dev->of_node, "cpts");
   521		if (!cpts_node)
   522			cpts_node = cpsw->dev->of_node;
   523	
   524		cpsw->cpts = cpts_create(cpsw->dev, cpts_regs, cpts_node);
   525		if (IS_ERR(cpsw->cpts)) {
   526			ret = PTR_ERR(cpsw->cpts);
   527			cpdma_ctlr_destroy(cpsw->dma);
   528		}
 > 529		of_node_put(cpts_node);
   530	
   531		return ret;
   532	}
   533	

---
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" (58631 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ