From: kbuild test robot <lkp@intel.com>
To: Hannes Reinecke <hare@suse.de>
Cc: kbuild-all@01.org, Christoph Hellwig <hch@lst.de>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
James Bottomley <james.bottomley@hansenpartnership.com>,
linux-scsi@vger.kernel.org, Ewan Milne <emilne@redhat.com>,
Hannes Reinecke <hare@suse.de>,
stable@vger.kernel.org, Hannes Reinecke <hare@suse.com>
Subject: Re: [PATCH 3/4] bfa: fix calls to dma_set_mask_and_coherent()
Date: Thu, 14 Feb 2019 05:35:24 +0800 [thread overview]
Message-ID: <201902140542.L1zBKjBc%fengguang.wu@intel.com> (raw)
In-Reply-To: <20190213114234.67275-4-hare@suse.de>
[-- Attachment #1: Type: text/plain, Size: 4140 bytes --]
Hi Hannes,
I love your patch! Perhaps something to improve:
[auto build test WARNING on mkp-scsi/for-next]
[also build test WARNING on v5.0-rc4 next-20190212]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Hannes-Reinecke/scsi-fixup-dma_set_mask_and_coherent-calls/20190214-044535
base: https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next
config: xtensa-allyesconfig (attached as .config)
compiler: xtensa-linux-gcc (GCC) 8.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=8.2.0 make.cross ARCH=xtensa
Note: it may well be a FALSE warning. FWIW you are at least aware of it now.
http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings
All warnings (new ones prefixed by >>):
drivers/scsi/bfa/bfad.c: In function 'bfad_pci_init':
>> drivers/scsi/bfa/bfad.c:730:6: warning: 'rc' may be used uninitialized in this function [-Wmaybe-uninitialized]
int rc;
^~
vim +/rc +730 drivers/scsi/bfa/bfad.c
726
727 int
728 bfad_pci_init(struct pci_dev *pdev, struct bfad_s *bfad)
729 {
> 730 int rc;
731
732 if (pci_enable_device(pdev)) {
733 printk(KERN_ERR "pci_enable_device fail %p\n", pdev);
734 goto out;
735 }
736
737 if (pci_request_regions(pdev, BFAD_DRIVER_NAME))
738 goto out_disable_device;
739
740 pci_set_master(pdev);
741
742 rc = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64));
743 if (rc)
744 rc = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
745
746 if (rc) {
747 printk(KERN_ERR "dma_set_mask_and_coherent fail %p\n", pdev);
748 goto out_release_region;
749 }
750 rc = -ENODEV;
751
752 /* Enable PCIE Advanced Error Recovery (AER) if kernel supports */
753 pci_enable_pcie_error_reporting(pdev);
754
755 bfad->pci_bar0_kva = pci_iomap(pdev, 0, pci_resource_len(pdev, 0));
756 bfad->pci_bar2_kva = pci_iomap(pdev, 2, pci_resource_len(pdev, 2));
757
758 if (bfad->pci_bar0_kva == NULL) {
759 printk(KERN_ERR "Fail to map bar0\n");
760 goto out_release_region;
761 }
762
763 bfad->hal_pcidev.pci_slot = PCI_SLOT(pdev->devfn);
764 bfad->hal_pcidev.pci_func = PCI_FUNC(pdev->devfn);
765 bfad->hal_pcidev.pci_bar_kva = bfad->pci_bar0_kva;
766 bfad->hal_pcidev.device_id = pdev->device;
767 bfad->hal_pcidev.ssid = pdev->subsystem_device;
768 bfad->pci_name = pci_name(pdev);
769
770 bfad->pci_attr.vendor_id = pdev->vendor;
771 bfad->pci_attr.device_id = pdev->device;
772 bfad->pci_attr.ssid = pdev->subsystem_device;
773 bfad->pci_attr.ssvid = pdev->subsystem_vendor;
774 bfad->pci_attr.pcifn = PCI_FUNC(pdev->devfn);
775
776 bfad->pcidev = pdev;
777
778 /* Adjust PCIe Maximum Read Request Size */
779 if (pci_is_pcie(pdev) && pcie_max_read_reqsz) {
780 if (pcie_max_read_reqsz >= 128 &&
781 pcie_max_read_reqsz <= 4096 &&
782 is_power_of_2(pcie_max_read_reqsz)) {
783 int max_rq = pcie_get_readrq(pdev);
784 printk(KERN_WARNING "BFA[%s]: "
785 "pcie_max_read_request_size is %d, "
786 "reset to %d\n", bfad->pci_name, max_rq,
787 pcie_max_read_reqsz);
788 pcie_set_readrq(pdev, pcie_max_read_reqsz);
789 } else {
790 printk(KERN_WARNING "BFA[%s]: invalid "
791 "pcie_max_read_request_size %d ignored\n",
792 bfad->pci_name, pcie_max_read_reqsz);
793 }
794 }
795
796 pci_save_state(pdev);
797
798 return 0;
799
800 out_release_region:
801 pci_release_regions(pdev);
802 out_disable_device:
803 pci_disable_device(pdev);
804 out:
805 return rc;
806 }
807
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 56291 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: kbuild test robot <lkp@intel.com>
Cc: kbuild-all@01.org, Christoph Hellwig <hch@lst.de>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
James Bottomley <james.bottomley@hansenpartnership.com>,
linux-scsi@vger.kernel.org, Ewan Milne <emilne@redhat.com>,
Hannes Reinecke <hare@suse.de>,
stable@vger.kernel.org, Hannes Reinecke <hare@suse.com>
Subject: Re: [PATCH 3/4] bfa: fix calls to dma_set_mask_and_coherent()
Date: Thu, 14 Feb 2019 05:35:24 +0800 [thread overview]
Message-ID: <201902140542.L1zBKjBc%fengguang.wu@intel.com> (raw)
In-Reply-To: <20190213114234.67275-4-hare@suse.de>
[-- Attachment #1: Type: text/plain, Size: 4140 bytes --]
Hi Hannes,
I love your patch! Perhaps something to improve:
[auto build test WARNING on mkp-scsi/for-next]
[also build test WARNING on v5.0-rc4 next-20190212]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Hannes-Reinecke/scsi-fixup-dma_set_mask_and_coherent-calls/20190214-044535
base: https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next
config: xtensa-allyesconfig (attached as .config)
compiler: xtensa-linux-gcc (GCC) 8.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=8.2.0 make.cross ARCH=xtensa
Note: it may well be a FALSE warning. FWIW you are at least aware of it now.
http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings
All warnings (new ones prefixed by >>):
drivers/scsi/bfa/bfad.c: In function 'bfad_pci_init':
>> drivers/scsi/bfa/bfad.c:730:6: warning: 'rc' may be used uninitialized in this function [-Wmaybe-uninitialized]
int rc;
^~
vim +/rc +730 drivers/scsi/bfa/bfad.c
726
727 int
728 bfad_pci_init(struct pci_dev *pdev, struct bfad_s *bfad)
729 {
> 730 int rc;
731
732 if (pci_enable_device(pdev)) {
733 printk(KERN_ERR "pci_enable_device fail %p\n", pdev);
734 goto out;
735 }
736
737 if (pci_request_regions(pdev, BFAD_DRIVER_NAME))
738 goto out_disable_device;
739
740 pci_set_master(pdev);
741
742 rc = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64));
743 if (rc)
744 rc = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
745
746 if (rc) {
747 printk(KERN_ERR "dma_set_mask_and_coherent fail %p\n", pdev);
748 goto out_release_region;
749 }
750 rc = -ENODEV;
751
752 /* Enable PCIE Advanced Error Recovery (AER) if kernel supports */
753 pci_enable_pcie_error_reporting(pdev);
754
755 bfad->pci_bar0_kva = pci_iomap(pdev, 0, pci_resource_len(pdev, 0));
756 bfad->pci_bar2_kva = pci_iomap(pdev, 2, pci_resource_len(pdev, 2));
757
758 if (bfad->pci_bar0_kva == NULL) {
759 printk(KERN_ERR "Fail to map bar0\n");
760 goto out_release_region;
761 }
762
763 bfad->hal_pcidev.pci_slot = PCI_SLOT(pdev->devfn);
764 bfad->hal_pcidev.pci_func = PCI_FUNC(pdev->devfn);
765 bfad->hal_pcidev.pci_bar_kva = bfad->pci_bar0_kva;
766 bfad->hal_pcidev.device_id = pdev->device;
767 bfad->hal_pcidev.ssid = pdev->subsystem_device;
768 bfad->pci_name = pci_name(pdev);
769
770 bfad->pci_attr.vendor_id = pdev->vendor;
771 bfad->pci_attr.device_id = pdev->device;
772 bfad->pci_attr.ssid = pdev->subsystem_device;
773 bfad->pci_attr.ssvid = pdev->subsystem_vendor;
774 bfad->pci_attr.pcifn = PCI_FUNC(pdev->devfn);
775
776 bfad->pcidev = pdev;
777
778 /* Adjust PCIe Maximum Read Request Size */
779 if (pci_is_pcie(pdev) && pcie_max_read_reqsz) {
780 if (pcie_max_read_reqsz >= 128 &&
781 pcie_max_read_reqsz <= 4096 &&
782 is_power_of_2(pcie_max_read_reqsz)) {
783 int max_rq = pcie_get_readrq(pdev);
784 printk(KERN_WARNING "BFA[%s]: "
785 "pcie_max_read_request_size is %d, "
786 "reset to %d\n", bfad->pci_name, max_rq,
787 pcie_max_read_reqsz);
788 pcie_set_readrq(pdev, pcie_max_read_reqsz);
789 } else {
790 printk(KERN_WARNING "BFA[%s]: invalid "
791 "pcie_max_read_request_size %d ignored\n",
792 bfad->pci_name, pcie_max_read_reqsz);
793 }
794 }
795
796 pci_save_state(pdev);
797
798 return 0;
799
800 out_release_region:
801 pci_release_regions(pdev);
802 out_disable_device:
803 pci_disable_device(pdev);
804 out:
805 return rc;
806 }
807
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 56291 bytes --]
next prev parent reply other threads:[~2019-02-13 21:38 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20190213114234.67275-1-hare@suse.de>
2019-02-13 11:42 ` [PATCH 1/4] lpfc: fix calls to dma_set_mask_and_coherent() Hannes Reinecke
2019-02-13 18:52 ` Ewan D. Milne
2019-02-13 11:42 ` [PATCH 2/4] hptiop: " Hannes Reinecke
2019-02-13 18:52 ` Ewan D. Milne
2019-02-13 11:42 ` [PATCH 3/4] bfa: " Hannes Reinecke
2019-02-13 18:52 ` Ewan D. Milne
2019-02-13 21:35 ` kbuild test robot [this message]
2019-02-13 21:35 ` kbuild test robot
2019-02-18 6:23 ` Dan Carpenter
2019-02-18 6:23 ` Dan Carpenter
2019-02-13 11:42 ` [PATCH 4/4] hisi_sas: " Hannes Reinecke
2019-02-13 11:51 ` John Garry
2019-02-13 11:51 ` John Garry
2019-02-13 18:52 ` Ewan D. Milne
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201902140542.L1zBKjBc%fengguang.wu@intel.com \
--to=lkp@intel.com \
--cc=emilne@redhat.com \
--cc=hare@suse.com \
--cc=hare@suse.de \
--cc=hch@lst.de \
--cc=james.bottomley@hansenpartnership.com \
--cc=kbuild-all@01.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.