[gabbayo:habanalabs-next 5/21] drivers/misc/habanalabs/firmware_if.c:58:3: error: implicit declaration of function 'writeq'

kbuild test robot lkp at intel.com
Sun Mar 31 11:17:01 UTC 2019


tree:   git://people.freedesktop.org/~gabbayo/linux habanalabs-next
head:   fd467452d554d95e0294e6e34781028f6d3f69f5
commit: 6c57cab11132dcddb91af2ff98bcb8c5f3d2da89 [5/21] habanalabs: Move device CPU code into common file
config: i386-randconfig-a0-201913 (attached as .config)
compiler: gcc-4.9 (Debian 4.9.4-2) 4.9.4
reproduce:
        git checkout 6c57cab11132dcddb91af2ff98bcb8c5f3d2da89
        # save the attached .config to linux build tree
        make ARCH=i386 

All errors (new ones prefixed by >>):

   drivers/misc/habanalabs/firmware_if.c: In function 'hl_fw_push_fw_to_device':
>> drivers/misc/habanalabs/firmware_if.c:58:3: error: implicit declaration of function 'writeq' [-Werror=implicit-function-declaration]
      writeq(*fw_data, dst);
      ^
   cc1: some warnings being treated as errors

vim +/writeq +58 drivers/misc/habanalabs/firmware_if.c

    12	
    13	/**
    14	 * hl_fw_push_fw_to_device() - Push FW code to device.
    15	 * @hdev: pointer to hl_device structure.
    16	 *
    17	 * Copy fw code from firmware file to device memory.
    18	 *
    19	 * Return: 0 on success, non-zero for failure.
    20	 */
    21	int hl_fw_push_fw_to_device(struct hl_device *hdev, const char *fw_name,
    22					void __iomem *dst)
    23	{
    24		const struct firmware *fw;
    25		const u64 *fw_data;
    26		size_t fw_size, i;
    27		int rc;
    28	
    29		rc = request_firmware(&fw, fw_name, hdev->dev);
    30		if (rc) {
    31			dev_err(hdev->dev, "Failed to request %s\n", fw_name);
    32			goto out;
    33		}
    34	
    35		fw_size = fw->size;
    36		if ((fw_size % 4) != 0) {
    37			dev_err(hdev->dev, "illegal %s firmware size %zu\n",
    38				fw_name, fw_size);
    39			rc = -EINVAL;
    40			goto out;
    41		}
    42	
    43		dev_dbg(hdev->dev, "%s firmware size == %zu\n", fw_name, fw_size);
    44	
    45		fw_data = (const u64 *) fw->data;
    46	
    47		if ((fw->size % 8) != 0)
    48			fw_size -= 8;
    49	
    50		for (i = 0 ; i < fw_size ; i += 8, fw_data++, dst += 8) {
    51			if (!(i & (0x80000 - 1))) {
    52				dev_dbg(hdev->dev,
    53					"copied so far %zu out of %zu for %s firmware",
    54					i, fw_size, fw_name);
    55				usleep_range(20, 100);
    56			}
    57	
  > 58			writeq(*fw_data, dst);
    59		}
    60	
    61		if ((fw->size % 8) != 0)
    62			writel(*(const u32 *) fw_data, dst);
    63	
    64	out:
    65		release_firmware(fw);
    66		return rc;
    67	}
    68	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 26473 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20190331/ebfba3ac/attachment-0001.gz>


More information about the dri-devel mailing list