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>] [day] [month] [year] [list]
Message-ID: <202007130458.I0s75CNM%lkp@intel.com>
Date:   Mon, 13 Jul 2020 04:36:02 +0800
From:   kernel test robot <lkp@...el.com>
To:     "Michael S. Tsirkin" <mst@...hat.com>
Cc:     kbuild-all@...ts.01.org, kvm@...r.kernel.org,
        virtualization@...ts.linux-foundation.org, netdev@...r.kernel.org
Subject: [vhost:config-endian 38/39]
 drivers/platform/mellanox/mlxbf-tmfifo.c:1237:2: error: invalid
 preprocessing directive #defined; did you mean

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git config-endian
head:   d8ede9b5e734748613d3e3108a4026244aa8e41f
commit: 392755e77e260e8a173b228e8ecc17917f97d5eb [38/39] fixup! virtio_net: correct tags for config space fields
config: arm64-allyesconfig (attached as .config)
compiler: aarch64-linux-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
        git checkout 392755e77e260e8a173b228e8ecc17917f97d5eb
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm64 

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

All errors (new ones prefixed by >>):

   drivers/platform/mellanox/mlxbf-tmfifo.c: In function 'mlxbf_tmfifo_probe':
>> drivers/platform/mellanox/mlxbf-tmfifo.c:1237:2: error: invalid preprocessing directive #defined; did you mean #define?
    1237 | #defined MLXBF_TMFIFO_LITTLE_ENDIAN (virtio_legacy_is_little_endian() ||
         |  ^~~~~~~
         |  define
   drivers/platform/mellanox/mlxbf-tmfifo.c:1238:4: warning: statement with no effect [-Wunused-value]
    1238 |    (MLXBF_TMFIFO_NET_FEATURES & (1ULL << VIRTIO_F_VERSION_1)))
         |    ^
>> drivers/platform/mellanox/mlxbf-tmfifo.c:1238:62: error: expected ';' before ')' token
    1238 |    (MLXBF_TMFIFO_NET_FEATURES & (1ULL << VIRTIO_F_VERSION_1)))
         |                                                              ^
         |                                                              ;
>> drivers/platform/mellanox/mlxbf-tmfifo.c:1238:62: error: expected statement before ')' token
>> drivers/platform/mellanox/mlxbf-tmfifo.c:1240:37: error: 'MLXBF_TMFIFO_LITTLE_ENDIAN' undeclared (first use in this function); did you mean 'MLXBF_TMFIFO_NET_L2_OVERHEAD'?
    1240 |  net_config.mtu = __cpu_to_virtio16(MLXBF_TMFIFO_LITTLE_ENDIAN,
         |                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~
         |                                     MLXBF_TMFIFO_NET_L2_OVERHEAD
   drivers/platform/mellanox/mlxbf-tmfifo.c:1240:37: note: each undeclared identifier is reported only once for each function it appears in

vim +1237 drivers/platform/mellanox/mlxbf-tmfifo.c

  1181	
  1182	/* Probe the TMFIFO. */
  1183	static int mlxbf_tmfifo_probe(struct platform_device *pdev)
  1184	{
  1185		struct virtio_net_config net_config;
  1186		struct device *dev = &pdev->dev;
  1187		struct mlxbf_tmfifo *fifo;
  1188		int i, rc;
  1189	
  1190		fifo = devm_kzalloc(dev, sizeof(*fifo), GFP_KERNEL);
  1191		if (!fifo)
  1192			return -ENOMEM;
  1193	
  1194		spin_lock_init(&fifo->spin_lock[0]);
  1195		spin_lock_init(&fifo->spin_lock[1]);
  1196		INIT_WORK(&fifo->work, mlxbf_tmfifo_work_handler);
  1197		mutex_init(&fifo->lock);
  1198	
  1199		/* Get the resource of the Rx FIFO. */
  1200		fifo->rx_base = devm_platform_ioremap_resource(pdev, 0);
  1201		if (IS_ERR(fifo->rx_base))
  1202			return PTR_ERR(fifo->rx_base);
  1203	
  1204		/* Get the resource of the Tx FIFO. */
  1205		fifo->tx_base = devm_platform_ioremap_resource(pdev, 1);
  1206		if (IS_ERR(fifo->tx_base))
  1207			return PTR_ERR(fifo->tx_base);
  1208	
  1209		platform_set_drvdata(pdev, fifo);
  1210	
  1211		timer_setup(&fifo->timer, mlxbf_tmfifo_timer, 0);
  1212	
  1213		for (i = 0; i < MLXBF_TM_MAX_IRQ; i++) {
  1214			fifo->irq_info[i].index = i;
  1215			fifo->irq_info[i].fifo = fifo;
  1216			fifo->irq_info[i].irq = platform_get_irq(pdev, i);
  1217			rc = devm_request_irq(dev, fifo->irq_info[i].irq,
  1218					      mlxbf_tmfifo_irq_handler, 0,
  1219					      "tmfifo", &fifo->irq_info[i]);
  1220			if (rc) {
  1221				dev_err(dev, "devm_request_irq failed\n");
  1222				fifo->irq_info[i].irq = 0;
  1223				return rc;
  1224			}
  1225		}
  1226	
  1227		mlxbf_tmfifo_set_threshold(fifo);
  1228	
  1229		/* Create the console vdev. */
  1230		rc = mlxbf_tmfifo_create_vdev(dev, fifo, VIRTIO_ID_CONSOLE, 0, NULL, 0);
  1231		if (rc)
  1232			goto fail;
  1233	
  1234		/* Create the network vdev. */
  1235		memset(&net_config, 0, sizeof(net_config));
  1236	
> 1237	#defined MLXBF_TMFIFO_LITTLE_ENDIAN (virtio_legacy_is_little_endian() ||
> 1238				(MLXBF_TMFIFO_NET_FEATURES & (1ULL << VIRTIO_F_VERSION_1)))
  1239	
> 1240		net_config.mtu = __cpu_to_virtio16(MLXBF_TMFIFO_LITTLE_ENDIAN,
  1241						   ETH_DATA_LEN);
  1242		net_config.status = __cpu_to_virtio16(MLXBF_TMFIFO_LITTLE_ENDIAN,
  1243						      VIRTIO_NET_S_LINK_UP);
  1244		mlxbf_tmfifo_get_cfg_mac(net_config.mac);
  1245		rc = mlxbf_tmfifo_create_vdev(dev, fifo, VIRTIO_ID_NET,
  1246					      MLXBF_TMFIFO_NET_FEATURES, &net_config,
  1247					      sizeof(net_config));
  1248		if (rc)
  1249			goto fail;
  1250	
  1251		mod_timer(&fifo->timer, jiffies + MLXBF_TMFIFO_TIMER_INTERVAL);
  1252	
  1253		fifo->is_ready = true;
  1254		return 0;
  1255	
  1256	fail:
  1257		mlxbf_tmfifo_cleanup(fifo);
  1258		return rc;
  1259	}
  1260	

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

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ