[kbuild] Re: [PATCH 4/4] PCI: add a REBAR size quirk for Sapphire RX 5600 XT Pulse.
Dan Carpenter
dan.carpenter at oracle.com
Tue Jan 5 18:41:15 UTC 2021
Hi Christian,
url: https://github.com/0day-ci/linux/commits/Christian-K-nig/pci-export-pci_rebar_get_possible_sizes/20210105-224446
base: https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git next
config: x86_64-randconfig-m001-20210105 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp at intel.com>
Reported-by: Dan Carpenter <dan.carpenter at oracle.com>
smatch warnings:
drivers/pci/pci.c:3611 pci_rebar_get_possible_sizes() warn: statement has no effect 22
vim +3611 drivers/pci/pci.c
276b738deb5bf85 Christian König 2017-10-24 3596 u32 pci_rebar_get_possible_sizes(struct pci_dev *pdev, int bar)
276b738deb5bf85 Christian König 2017-10-24 3597 {
276b738deb5bf85 Christian König 2017-10-24 3598 int pos;
276b738deb5bf85 Christian König 2017-10-24 3599 u32 cap;
276b738deb5bf85 Christian König 2017-10-24 3600
276b738deb5bf85 Christian König 2017-10-24 3601 pos = pci_rebar_find_pos(pdev, bar);
276b738deb5bf85 Christian König 2017-10-24 3602 if (pos < 0)
276b738deb5bf85 Christian König 2017-10-24 3603 return 0;
276b738deb5bf85 Christian König 2017-10-24 3604
276b738deb5bf85 Christian König 2017-10-24 3605 pci_read_config_dword(pdev, pos + PCI_REBAR_CAP, &cap);
6838a45fc2394ec Christian König 2021-01-05 3606 cap = (cap & PCI_REBAR_CAP_SIZES) >> 4;
6838a45fc2394ec Christian König 2021-01-05 3607
6838a45fc2394ec Christian König 2021-01-05 3608 /* Sapphire RX 5600 XT Pulse has an invalid cap dword for BAR 0 */
6838a45fc2394ec Christian König 2021-01-05 3609 if (pdev->vendor == PCI_VENDOR_ID_ATI && pdev->device == 0x731f &&
6838a45fc2394ec Christian König 2021-01-05 3610 bar == 0 && cap == 0x700)
6838a45fc2394ec Christian König 2021-01-05 @3611 cap == 0x7f00;
== vs =.
6838a45fc2394ec Christian König 2021-01-05 3612
6838a45fc2394ec Christian König 2021-01-05 3613 return cap;
276b738deb5bf85 Christian König 2017-10-24 3614 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 32557 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20210105/de3c4411/attachment-0001.gz>
-------------- next part --------------
_______________________________________________
kbuild mailing list -- kbuild at lists.01.org
To unsubscribe send an email to kbuild-leave at lists.01.org
More information about the amd-gfx
mailing list