linux-snps-arc.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: "Paul E. McKenney" <paulmck@kernel.org>
Cc: oe-kbuild-all@lists.linux.dev,
	Linux Memory Management List <linux-mm@kvack.org>,
	linux-snps-arc@lists.infradead.org
Subject: [linux-next:master 5890/8170] drivers/pci/pci.h:359:23: sparse: sparse: incorrect type in argument 2 (different base types)
Date: Wed, 24 Apr 2024 21:57:13 +0800	[thread overview]
Message-ID: <202404242144.8931hnhx-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   5e4f84f18c4ee9b0ccdc19e39b7de41df21699dd
commit: 99ce03b849f89ae2a00addf5b5475d2bb81972f6 [5890/8170] ARC: Emulate one-byte cmpxchg
config: arc-randconfig-r122-20240424 (https://download.01.org/0day-ci/archive/20240424/202404242144.8931hnhx-lkp@intel.com/config)
compiler: arc-elf-gcc (GCC) 13.2.0
reproduce: (https://download.01.org/0day-ci/archive/20240424/202404242144.8931hnhx-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202404242144.8931hnhx-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
   drivers/pci/pci-driver.c:520:42: sparse: sparse: restricted pci_power_t degrades to integer
   drivers/pci/pci-driver.c:520:61: sparse: sparse: restricted pci_power_t degrades to integer
   drivers/pci/pci-driver.c: note: in included file (through include/linux/pci.h):
   include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates to true
   drivers/pci/pci-driver.c:389:19: sparse: sparse: self-comparison always evaluates to false
   drivers/pci/pci-driver.c: note: in included file:
>> drivers/pci/pci.h:359:23: sparse: sparse: incorrect type in argument 2 (different base types) @@     expected unsigned long [usertype] old @@     got restricted pci_channel_state_t _o_ @@
   drivers/pci/pci.h:359:23: sparse:     expected unsigned long [usertype] old
   drivers/pci/pci.h:359:23: sparse:     got restricted pci_channel_state_t _o_
>> drivers/pci/pci.h:359:23: sparse: sparse: incorrect type in argument 3 (different base types) @@     expected unsigned long [usertype] new @@     got restricted pci_channel_state_t _n_ @@
   drivers/pci/pci.h:359:23: sparse:     expected unsigned long [usertype] new
   drivers/pci/pci.h:359:23: sparse:     got restricted pci_channel_state_t _n_
   drivers/pci/pci.h:359:23: sparse: sparse: cast to restricted pci_channel_state_t
   drivers/pci/pci.h:363:23: sparse: sparse: incorrect type in argument 2 (different base types) @@     expected unsigned long [usertype] old @@     got restricted pci_channel_state_t _o_ @@
   drivers/pci/pci.h:363:23: sparse:     expected unsigned long [usertype] old
   drivers/pci/pci.h:363:23: sparse:     got restricted pci_channel_state_t _o_
   drivers/pci/pci.h:363:23: sparse: sparse: incorrect type in argument 3 (different base types) @@     expected unsigned long [usertype] new @@     got restricted pci_channel_state_t _n_ @@
   drivers/pci/pci.h:363:23: sparse:     expected unsigned long [usertype] new
   drivers/pci/pci.h:363:23: sparse:     got restricted pci_channel_state_t _n_
   drivers/pci/pci.h:363:23: sparse: sparse: cast to restricted pci_channel_state_t

vim +359 drivers/pci/pci.h

ac04840350e2c2 Lukas Wunner         2023-03-11  337  
a6bd101b8f84f9 Keith Busch          2018-09-20  338  /**
a6bd101b8f84f9 Keith Busch          2018-09-20  339   * pci_dev_set_io_state - Set the new error state if possible.
a6bd101b8f84f9 Keith Busch          2018-09-20  340   *
347269c113f10f Krzysztof Wilczyński 2021-07-03  341   * @dev: PCI device to set new error_state
347269c113f10f Krzysztof Wilczyński 2021-07-03  342   * @new: the state we want dev to be in
a6bd101b8f84f9 Keith Busch          2018-09-20  343   *
74ff8864cc842b Lukas Wunner         2023-01-20  344   * If the device is experiencing perm_failure, it has to remain in that state.
74ff8864cc842b Lukas Wunner         2023-01-20  345   * Any other transition is allowed.
a6bd101b8f84f9 Keith Busch          2018-09-20  346   *
a6bd101b8f84f9 Keith Busch          2018-09-20  347   * Returns true if state has been changed to the requested state.
a6bd101b8f84f9 Keith Busch          2018-09-20  348   */
a6bd101b8f84f9 Keith Busch          2018-09-20  349  static inline bool pci_dev_set_io_state(struct pci_dev *dev,
a6bd101b8f84f9 Keith Busch          2018-09-20  350  					pci_channel_state_t new)
a6bd101b8f84f9 Keith Busch          2018-09-20  351  {
74ff8864cc842b Lukas Wunner         2023-01-20  352  	pci_channel_state_t old;
a6bd101b8f84f9 Keith Busch          2018-09-20  353  
a6bd101b8f84f9 Keith Busch          2018-09-20  354  	switch (new) {
a6bd101b8f84f9 Keith Busch          2018-09-20  355  	case pci_channel_io_perm_failure:
74ff8864cc842b Lukas Wunner         2023-01-20  356  		xchg(&dev->error_state, pci_channel_io_perm_failure);
74ff8864cc842b Lukas Wunner         2023-01-20  357  		return true;
a6bd101b8f84f9 Keith Busch          2018-09-20  358  	case pci_channel_io_frozen:
74ff8864cc842b Lukas Wunner         2023-01-20 @359  		old = cmpxchg(&dev->error_state, pci_channel_io_normal,
74ff8864cc842b Lukas Wunner         2023-01-20  360  			      pci_channel_io_frozen);
74ff8864cc842b Lukas Wunner         2023-01-20  361  		return old != pci_channel_io_perm_failure;
a6bd101b8f84f9 Keith Busch          2018-09-20  362  	case pci_channel_io_normal:
74ff8864cc842b Lukas Wunner         2023-01-20  363  		old = cmpxchg(&dev->error_state, pci_channel_io_frozen,
74ff8864cc842b Lukas Wunner         2023-01-20  364  			      pci_channel_io_normal);
74ff8864cc842b Lukas Wunner         2023-01-20  365  		return old != pci_channel_io_perm_failure;
74ff8864cc842b Lukas Wunner         2023-01-20  366  	default:
74ff8864cc842b Lukas Wunner         2023-01-20  367  		return false;
a6bd101b8f84f9 Keith Busch          2018-09-20  368  	}
a6bd101b8f84f9 Keith Busch          2018-09-20  369  }
89ee9f7680031d Keith Busch          2017-03-29  370  

:::::: The code at line 359 was first introduced by commit
:::::: 74ff8864cc842be994853095dba6db48e716400a PCI: hotplug: Allow marking devices as disconnected during bind/unbind

:::::: TO: Lukas Wunner <lukas@wunner.de>
:::::: CC: Bjorn Helgaas <bhelgaas@google.com>

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

_______________________________________________
linux-snps-arc mailing list
linux-snps-arc@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-snps-arc

                 reply	other threads:[~2024-04-24 13:58 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=202404242144.8931hnhx-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=linux-mm@kvack.org \
    --cc=linux-snps-arc@lists.infradead.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=paulmck@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).