linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [pci:pci/error 2/8] drivers/pci/controller/../pci.h:348:20: warning: equality comparison result unused
@ 2021-02-10  6:35 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-02-10  6:35 UTC (permalink / raw)
  To: Bjorn Helgaas; +Cc: kbuild-all, clang-built-linux, linux-pci

[-- Attachment #1: Type: text/plain, Size: 4233 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git pci/error
head:   5692817fc88f347328e35cd7b19bd04f4400652e
commit: 8fae7d8809b8151488969d6cfad2f6dd2c69d311 [2/8] PCI/ERR: Simplify pci_dev_set_io_state()
config: arm64-randconfig-r025-20210209 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project c9439ca36342fb6013187d0a69aef92736951476)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install arm64 cross compiling tool for clang build
        # apt-get install binutils-aarch64-linux-gnu
        # https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git/commit/?id=8fae7d8809b8151488969d6cfad2f6dd2c69d311
        git remote add pci https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git
        git fetch --no-tags pci pci/error
        git checkout 8fae7d8809b8151488969d6cfad2f6dd2c69d311
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   In file included from drivers/pci/controller/pci-ftpci100.c:31:
>> drivers/pci/controller/../pci.h:348:20: warning: equality comparison result unused [-Wunused-comparison]
                   dev->error_state == pci_channel_io_perm_failure;
                   ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/pci/controller/../pci.h:348:20: note: use '=' to turn this equality comparison into an assignment
                   dev->error_state == pci_channel_io_perm_failure;
                                    ^~
                                    =
   1 warning generated.
--
   In file included from drivers/pci/pcie/aspm.c:21:
>> drivers/pci/pcie/../pci.h:348:20: warning: equality comparison result unused [-Wunused-comparison]
                   dev->error_state == pci_channel_io_perm_failure;
                   ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/pci/pcie/../pci.h:348:20: note: use '=' to turn this equality comparison into an assignment
                   dev->error_state == pci_channel_io_perm_failure;
                                    ^~
                                    =
   1 warning generated.
--
   In file included from drivers/pci/controller/dwc/pcie-designware.c:16:
>> drivers/pci/controller/dwc/../../pci.h:348:20: warning: equality comparison result unused [-Wunused-comparison]
                   dev->error_state == pci_channel_io_perm_failure;
                   ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/pci/controller/dwc/../../pci.h:348:20: note: use '=' to turn this equality comparison into an assignment
                   dev->error_state == pci_channel_io_perm_failure;
                                    ^~
                                    =
   1 warning generated.


vim +348 drivers/pci/controller/../pci.h

   330	
   331	/**
   332	 * pci_dev_set_io_state - Set the new error state if possible.
   333	 *
   334	 * @dev - pci device to set new error_state
   335	 * @new - the state we want dev to be in
   336	 *
   337	 * Must be called with device_lock held.
   338	 *
   339	 * Returns true if state has been changed to the requested state.
   340	 */
   341	static inline bool pci_dev_set_io_state(struct pci_dev *dev,
   342						pci_channel_state_t new)
   343	{
   344		device_lock_assert(&dev->dev);
   345	
   346		/* Can always put a device in perm_failure state */
   347		if (new == pci_channel_io_perm_failure) {
 > 348			dev->error_state == pci_channel_io_perm_failure;
   349			return true;
   350		}
   351	
   352		/* If already in perm_failure, can't set to normal or frozen */
   353		if (dev->error_state == pci_channel_io_perm_failure)
   354			return false;
   355	
   356		/* Can always change normal to frozen or vice versa */
   357		dev->error_state = new;
   358		return true;
   359	}
   360	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 28785 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-02-10  6:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-10  6:35 [pci:pci/error 2/8] drivers/pci/controller/../pci.h:348:20: warning: equality comparison result unused kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).