From: kernel test robot <lkp@intel.com>
To: Lukas Wunner <lukas@wunner.de>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
Bjorn Helgaas <helgaas@kernel.org>
Subject: drivers/pci/pcie/../pci.h:325:17: sparse: sparse: cast from restricted pci_channel_state_t
Date: Fri, 1 Dec 2023 03:39:35 +0800 [thread overview]
Message-ID: <202312010320.jjetWPe9-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 3b47bc037bd44f142ac09848e8d3ecccc726be99
commit: 74ff8864cc842be994853095dba6db48e716400a PCI: hotplug: Allow marking devices as disconnected during bind/unbind
date: 10 months ago
config: alpha-randconfig-r034-20230903 (https://download.01.org/0day-ci/archive/20231201/202312010320.jjetWPe9-lkp@intel.com/config)
compiler: alpha-linux-gcc (GCC) 12.3.0
reproduce: (https://download.01.org/0day-ci/archive/20231201/202312010320.jjetWPe9-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/202312010320.jjetWPe9-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
drivers/pci/pcie/err.c: note: in included file:
>> drivers/pci/pcie/../pci.h:325:17: sparse: sparse: cast from restricted pci_channel_state_t
>> drivers/pci/pcie/../pci.h:325:17: sparse: sparse: cast to restricted pci_channel_state_t
drivers/pci/pcie/../pci.h:328:23: sparse: sparse: cast from restricted pci_channel_state_t
drivers/pci/pcie/../pci.h:328:23: sparse: sparse: cast from restricted pci_channel_state_t
drivers/pci/pcie/../pci.h:328:23: sparse: sparse: cast to restricted pci_channel_state_t
drivers/pci/pcie/../pci.h:332:23: sparse: sparse: cast from restricted pci_channel_state_t
drivers/pci/pcie/../pci.h:332:23: sparse: sparse: cast from restricted pci_channel_state_t
drivers/pci/pcie/../pci.h:332:23: sparse: sparse: cast to restricted pci_channel_state_t
>> drivers/pci/pcie/../pci.h:325:17: sparse: sparse: cast from restricted pci_channel_state_t
>> drivers/pci/pcie/../pci.h:325:17: sparse: sparse: cast to restricted pci_channel_state_t
drivers/pci/pcie/../pci.h:328:23: sparse: sparse: cast from restricted pci_channel_state_t
drivers/pci/pcie/../pci.h:328:23: sparse: sparse: cast from restricted pci_channel_state_t
drivers/pci/pcie/../pci.h:328:23: sparse: sparse: cast to restricted pci_channel_state_t
drivers/pci/pcie/../pci.h:332:23: sparse: sparse: cast from restricted pci_channel_state_t
drivers/pci/pcie/../pci.h:332:23: sparse: sparse: cast from restricted pci_channel_state_t
drivers/pci/pcie/../pci.h:332:23: sparse: sparse: cast to restricted pci_channel_state_t
vim +325 drivers/pci/pcie/../pci.h
306
307 /**
308 * pci_dev_set_io_state - Set the new error state if possible.
309 *
310 * @dev: PCI device to set new error_state
311 * @new: the state we want dev to be in
312 *
313 * If the device is experiencing perm_failure, it has to remain in that state.
314 * Any other transition is allowed.
315 *
316 * Returns true if state has been changed to the requested state.
317 */
318 static inline bool pci_dev_set_io_state(struct pci_dev *dev,
319 pci_channel_state_t new)
320 {
321 pci_channel_state_t old;
322
323 switch (new) {
324 case pci_channel_io_perm_failure:
> 325 xchg(&dev->error_state, pci_channel_io_perm_failure);
326 return true;
327 case pci_channel_io_frozen:
328 old = cmpxchg(&dev->error_state, pci_channel_io_normal,
329 pci_channel_io_frozen);
330 return old != pci_channel_io_perm_failure;
331 case pci_channel_io_normal:
332 old = cmpxchg(&dev->error_state, pci_channel_io_frozen,
333 pci_channel_io_normal);
334 return old != pci_channel_io_perm_failure;
335 default:
336 return false;
337 }
338 }
339
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next reply other threads:[~2023-11-30 19:46 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-30 19:39 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-01-04 9:46 drivers/pci/pcie/../pci.h:325:17: sparse: sparse: cast from restricted pci_channel_state_t kernel test robot
2023-02-28 20:39 kernel test robot
2023-02-28 21:33 ` Lukas Wunner
2023-03-01 4:44 ` Dan Carpenter
2023-03-01 4:51 ` Dan Carpenter
2023-12-03 16:59 ` Lukas Wunner
2023-12-04 14:09 ` Luc Van Oostenryck
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=202312010320.jjetWPe9-lkp@intel.com \
--to=lkp@intel.com \
--cc=helgaas@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lukas@wunner.de \
--cc=oe-kbuild-all@lists.linux.dev \
/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