From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CE501C4167B for ; Sun, 3 Dec 2023 06:33:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233149AbjLCGdR (ORCPT ); Sun, 3 Dec 2023 01:33:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41390 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229450AbjLCGdO (ORCPT ); Sun, 3 Dec 2023 01:33:14 -0500 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.7]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0F20AF9 for ; Sat, 2 Dec 2023 22:32:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1701585169; x=1733121169; h=date:from:to:cc:subject:message-id:mime-version; bh=FP6Hmp20MLji0zPxH522/4vPbS35Bc3va1axl1ZS4Xo=; b=UBib/u+Q1xrtRaIFl5e0We1UU6tvwLZRagVCapYpaHmFuJP3kDPDu2iq us79tNQG42C5AikhC16exjYAF1NAS1KmjtpwDpwn8LQXgbP5NgYS74M4y PY3jdNr+tLDB6qu6qO3XnB2KtWNSchfJViUcfSH2NRCrhCY4jHEVaMrcj p2gOxUYXeZN+bT89SZEXdULsoqFnbrn5dS+taiBtE66AVIhVJdrbe2pog M6CC8Nr2U/OVjPZCYZXdehqjV+2m1j2EoyYnlQHQvLniKKXe5y5NRb4v6 RhjsPO2gnr7TRl/QQVcaFntTDjPXpn57AHR5xK+7ZFkckfpLGgdnLt6mV Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10912"; a="15180412" X-IronPort-AV: E=Sophos;i="6.04,246,1695711600"; d="scan'208";a="15180412" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmvoesa101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Dec 2023 22:32:49 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10912"; a="914081648" X-IronPort-AV: E=Sophos;i="6.04,246,1695711600"; d="scan'208";a="914081648" Received: from lkp-server02.sh.intel.com (HELO b07ab15da5fe) ([10.239.97.151]) by fmsmga001.fm.intel.com with ESMTP; 02 Dec 2023 22:32:46 -0800 Received: from kbuild by b07ab15da5fe with local (Exim 4.96) (envelope-from ) id 1r9g20-0006Lo-2E; Sun, 03 Dec 2023 06:32:44 +0000 Date: Sun, 3 Dec 2023 14:31:53 +0800 From: kernel test robot To: Lukas Wunner Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org, Bjorn Helgaas Subject: drivers/pci/hotplug/../pci.h:325:17: sparse: sparse: cast from restricted pci_channel_state_t Message-ID: <202312030751.RxiMfTfm-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 815fb87b753055df2d9e50f6cd80eb10235fe3e9 commit: 74ff8864cc842be994853095dba6db48e716400a PCI: hotplug: Allow marking devices as disconnected during bind/unbind date: 10 months ago config: s390-randconfig-r121-20231106 (https://download.01.org/0day-ci/archive/20231203/202312030751.RxiMfTfm-lkp@intel.com/config) compiler: s390-linux-gcc (GCC) 13.2.0 reproduce: (https://download.01.org/0day-ci/archive/20231203/202312030751.RxiMfTfm-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 | Closes: https://lore.kernel.org/oe-kbuild-all/202312030751.RxiMfTfm-lkp@intel.com/ sparse warnings: (new ones prefixed by >>) drivers/pci/hotplug/pciehp_pci.c: note: in included file (through include/linux/mmzone.h, include/linux/gfp.h, include/linux/xarray.h, ...): include/linux/page-flags.h:246:46: sparse: sparse: self-comparison always evaluates to false drivers/pci/hotplug/pciehp_pci.c: note: in included file: >> drivers/pci/hotplug/../pci.h:325:17: sparse: sparse: cast from restricted pci_channel_state_t >> drivers/pci/hotplug/../pci.h:325:17: sparse: sparse: cast to restricted pci_channel_state_t drivers/pci/hotplug/../pci.h:328:23: sparse: sparse: cast from restricted pci_channel_state_t drivers/pci/hotplug/../pci.h:328:23: sparse: sparse: cast from restricted pci_channel_state_t drivers/pci/hotplug/../pci.h:328:23: sparse: sparse: cast to restricted pci_channel_state_t drivers/pci/hotplug/../pci.h:332:23: sparse: sparse: cast from restricted pci_channel_state_t drivers/pci/hotplug/../pci.h:332:23: sparse: sparse: cast from restricted pci_channel_state_t drivers/pci/hotplug/../pci.h:332:23: sparse: sparse: cast to restricted pci_channel_state_t vim +325 drivers/pci/hotplug/../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