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]
Date:   Mon, 13 Jul 2020 15:04:49 +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:1241:22: error: expected ')' before
 ';' token

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git config-endian
head:   df43c8f58f42ec36e91740f91ea7360f63213004
commit: e1e22056bc3641f340ed27012cfd1b8b05f83a0a [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 e1e22056bc3641f340ed27012cfd1b8b05f83a0a
        # 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:70: warning: value computed is not used [-Wunused-value]
    1237 | #define MLXBF_TMFIFO_LITTLE_ENDIAN (virtio_legacy_is_little_endian() || \
         |                                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
    1238 |    (MLXBF_TMFIFO_NET_FEATURES & (1ULL << VIRTIO_F_VERSION_1))
         |    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~         
   drivers/platform/mellanox/mlxbf-tmfifo.c:1240:37: note: in expansion of macro 'MLXBF_TMFIFO_LITTLE_ENDIAN'
    1240 |  net_config.mtu = __cpu_to_virtio16(MLXBF_TMFIFO_LITTLE_ENDIAN,
         |                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/platform/mellanox/mlxbf-tmfifo.c:1241:22: error: expected ')' before ';' token
    1241 |         ETH_DATA_LEN);
         |                      ^
         |                      )
>> drivers/platform/mellanox/mlxbf-tmfifo.c:1240:19: error: too few arguments to function '__cpu_to_virtio16'
    1240 |  net_config.mtu = __cpu_to_virtio16(MLXBF_TMFIFO_LITTLE_ENDIAN,
         |                   ^~~~~~~~~~~~~~~~~
   In file included from include/linux/virtio_config.h:8,
                    from drivers/platform/mellanox/mlxbf-tmfifo.c:18:
   include/linux/virtio_byteorder.h:24:26: note: declared here
      24 | static inline __virtio16 __cpu_to_virtio16(bool little_endian, u16 val)
         |                          ^~~~~~~~~~~~~~~~~
>> drivers/platform/mellanox/mlxbf-tmfifo.c:1290:1: error: expected declaration or statement at end of input
    1290 | MODULE_AUTHOR("Mellanox Technologies");
         | ^~~~~~~~~~~~~
>> drivers/platform/mellanox/mlxbf-tmfifo.c:1232:3: error: label 'fail' used but not defined
    1232 |   goto fail;
         |   ^~~~
   At top level:
   drivers/platform/mellanox/mlxbf-tmfifo.c:1183:12: warning: 'mlxbf_tmfifo_probe' defined but not used [-Wunused-function]
    1183 | static int mlxbf_tmfifo_probe(struct platform_device *pdev)
         |            ^~~~~~~~~~~~~~~~~~
   drivers/platform/mellanox/mlxbf-tmfifo.c:1170:13: warning: 'mlxbf_tmfifo_cleanup' defined but not used [-Wunused-function]
    1170 | static void mlxbf_tmfifo_cleanup(struct mlxbf_tmfifo *fifo)
         |             ^~~~~~~~~~~~~~~~~~~~
   drivers/platform/mellanox/mlxbf-tmfifo.c:1128:13: warning: 'mlxbf_tmfifo_get_cfg_mac' defined but not used [-Wunused-function]
    1128 | static void mlxbf_tmfifo_get_cfg_mac(u8 *mac)
         |             ^~~~~~~~~~~~~~~~~~~~~~~~

vim +1241 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	#define 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	
  1261	/* Device remove function. */
  1262	static int mlxbf_tmfifo_remove(struct platform_device *pdev)
  1263	{
  1264		struct mlxbf_tmfifo *fifo = platform_get_drvdata(pdev);
  1265	
  1266		mlxbf_tmfifo_cleanup(fifo);
  1267	
  1268		return 0;
  1269	}
  1270	
  1271	static const struct acpi_device_id mlxbf_tmfifo_acpi_match[] = {
  1272		{ "MLNXBF01", 0 },
  1273		{}
  1274	};
  1275	MODULE_DEVICE_TABLE(acpi, mlxbf_tmfifo_acpi_match);
  1276	
  1277	static struct platform_driver mlxbf_tmfifo_driver = {
  1278		.probe = mlxbf_tmfifo_probe,
  1279		.remove = mlxbf_tmfifo_remove,
  1280		.driver = {
  1281			.name = "bf-tmfifo",
  1282			.acpi_match_table = mlxbf_tmfifo_acpi_match,
  1283		},
  1284	};
  1285	
  1286	module_platform_driver(mlxbf_tmfifo_driver);
  1287	
  1288	MODULE_DESCRIPTION("Mellanox BlueField SoC TmFifo Driver");
  1289	MODULE_LICENSE("GPL v2");
> 1290	MODULE_AUTHOR("Mellanox Technologies");

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ