[kbuild] Re: [PATCH 4/4] PCI: add a REBAR size quirk for Sapphire RX 5600 XT Pulse.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
Reported-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>

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@xxxxxxxxxxxx 

Attachment: .config.gz
Description: application/gzip

_______________________________________________
kbuild mailing list -- kbuild@xxxxxxxxxxxx
To unsubscribe send an email to kbuild-leave@xxxxxxxxxxxx

[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux