linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Bjorn Helgaas <helgaas@kernel.org>
Cc: kbuild-all@lists.01.org, clang-built-linux@googlegroups.com,
	linux-pci@vger.kernel.org
Subject: [pci:pci/error 2/8] drivers/pci/controller/../pci.h:348:20: warning: equality comparison result unused
Date: Wed, 10 Feb 2021 14:35:41 +0800	[thread overview]
Message-ID: <202102101438.UDt0kMOO-lkp@intel.com> (raw)

[-- 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 --]

                 reply	other threads:[~2021-02-10  6:37 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202102101438.UDt0kMOO-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=clang-built-linux@googlegroups.com \
    --cc=helgaas@kernel.org \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-pci@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 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).