Unverified Commit 4d4bf2a6 authored by riggy2013's avatar riggy2013 Committed by GitHub

Update xdma_mod.c

build on CentOS 8.3 will generate error:

XDMA/linux-kernel/xdma/xdma_mod.c:301:2: error: implicit declaration of function ??pci_cleanup_aer_uncorrect_error_status?? [-Werror=implicit-function-declaration]
  pci_cleanup_aer_uncorrect_error_status(pdev);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:316: /home/ndam/Downloads/dma_ip_drivers-master/XDMA/linux-kernel/xdma/xdma_mod.o] Error 1

The reason is, name change from pci_cleanup_aer_uncorrect_error_status() to pci_aer_clear_nonfatal_status() at https://github.com/torvalds/linux/commit/894020fdd88c1e9a74c60b67c0f19f1c7696ba2f

CentOS and RedHat 8.3 accepted the patch.
parent 11747e09
......@@ -293,7 +293,8 @@ static void xdma_error_resume(struct pci_dev *pdev)
struct xdma_pci_dev *xpdev = dev_get_drvdata(&pdev->dev);
pr_info("dev 0x%p,0x%p.\n", pdev, xpdev);
#if KERNEL_VERSION(5, 7, 0) <= LINUX_VERSION_CODE
#if KERNEL_VERSION(5, 7, 0) <= LINUX_VERSION_CODE || \
defined(RHEL_MAJOR) && RHEL_RELEASE_VERSION(8, 3) <= RHEL_RELEASE_CODE
pci_aer_clear_nonfatal_status(pdev);
#else
pci_cleanup_aer_uncorrect_error_status(pdev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment