Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.14]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 334663D648A for ; Tue, 25 Aug 2026 20:55:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.14 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787691358; cv=none; b=eknUvcv1Ca6fd+hXw2M88pdaeXHlXJgkVvAFyPOn41yELqVWIonYDwnCkowCnfxZROoNgk2y3YZsGHiSm9oBNgia2CfEArVMxgUbVy4/baIIf0xq1Pa5EQtQQ4fGwAd4J3pzl7nDAyEtksocJvAbJl4N+dAa7/Px/WjzlRcFHCM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787691358; c=relaxed/simple; bh=2t6skBuCwBjE7k1okuP72Aj/s6XOHla0OtllMp6Ss9Y=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition; b=oME1mfdHbsOrKqYD5fabzgKC2XFRfpuKCbSJhWeRL6610HmlkR+uS9udPV1pcGnxnGE6AXYcNg9P4Z3x20isOKcN2s46Q4S3yxwhNbH8bnECUT7hPhcTQfnc7tA1GiYecEoq7nxRtceC7BldI/mT8rM/fLGPDYaWgveqUgzwZNo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=FkB5mV7O; arc=none smtp.client-ip=192.198.163.14 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="FkB5mV7O" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1787691355; x=1819227355; h=date:from:to:cc:subject:message-id:mime-version: content-transfer-encoding; bh=2t6skBuCwBjE7k1okuP72Aj/s6XOHla0OtllMp6Ss9Y=; b=FkB5mV7OI1sfxIiAztdixw5wcOmwtn20IxbfWpgJszS6PfTkEw6cm2gI LJ+laVfXl99erCbdv/jul+e7DSnBaI9hvk7YMFLQNy4bE4fPU9Jr7odis P2/EuE58QtoE5JYYCpMd5WvmLQzisQtCIXR7oREdpaRELJIwJEsvU+gAh EEjYIiR/oqJAiG4LNAazCJUtTZX9KJhUkvzei5VjMqP0s4xb2SbdsUEI0 zIsx8rkySnbdULyeTpFaqG5kgJaFd1D3corbG8RxdD3a9h1byM5wvI3Sn sbQdG3+doyn4iaAMgs6ZnRj40WZUsRrcSRjdpgVldz3/5HvnT6BNZCzbe A==; X-CSE-ConnectionGUID: FJtIjZwERaqvyp+GD9iklA== X-CSE-MsgGUID: r0iHh0a2TmeEDDNvAMnImg== X-IronPort-AV: E=McAfee;i="6800,10657,11886"; a="88185606" X-IronPort-AV: E=Sophos;i="6.25,243,1779174000"; d="scan'208";a="88185606" Received: from fmviesa009.fm.intel.com ([10.60.135.149]) by fmvoesa108.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Aug 2026 13:55:55 -0700 X-CSE-ConnectionGUID: NXaqlveMR1ie72tdji8w3Q== X-CSE-MsgGUID: juN/guIxQNaPsIIfYjrzgg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.25,243,1779174000"; d="scan'208";a="261250798" Received: from lkp-server01.sh.intel.com (HELO 3532383e6126) ([10.239.97.150]) by fmviesa009.fm.intel.com with ESMTP; 25 Aug 2026 13:55:53 -0700 Received: from kbuild by 3532383e6126 with local (Exim 4.98.2) (envelope-from ) id 1wyyBT-000000006MR-0kCQ; Tue, 25 Aug 2026 20:55:51 +0000 Date: Wed, 26 Aug 2026 04:55:44 +0800 From: kernel test robot To: oe-kbuild@lists.linux.dev Cc: lkp@intel.com, Dan Carpenter Subject: Re: [PATCH v6] PCI/pcie: Add PCIe Lane Margining at Receiver (LMR) support Message-ID: <202608260405.gHL6gOJf-lkp@intel.com> Precedence: bulk X-Mailing-List: oe-kbuild@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit BCC: lkp@intel.com CC: oe-kbuild-all@lists.linux.dev In-Reply-To: <20260824-pcie-lmt-v6-1-bab4ce233fa5@google.com> References: <20260824-pcie-lmt-v6-1-bab4ce233fa5@google.com> TO: Priyank Rathod TO: Bjorn Helgaas TO: Priyank Rathod TO: Shuah Khan TO: Kees Cook TO: "Gustavo A. R. Silva" TO: Jonathan Corbet CC: linux-kernel@vger.kernel.org CC: linux-pci@vger.kernel.org CC: linux-kselftest@vger.kernel.org CC: linux-hardening@vger.kernel.org CC: linux-doc@vger.kernel.org CC: "Ilpo Järvinen" Hi Priyank, kernel test robot noticed the following build warnings: [auto build test WARNING on 0f23d56f17fdfc7db69d51f64c8b91bbab947aa9] url: https://github.com/intel-lab-lkp/linux/commits/Priyank-Rathod/PCI-pcie-Add-PCIe-Lane-Margining-at-Receiver-LMR-support/20260824-223812 base: 0f23d56f17fdfc7db69d51f64c8b91bbab947aa9 patch link: https://lore.kernel.org/r/20260824-pcie-lmt-v6-1-bab4ce233fa5%40google.com patch subject: [PATCH v6] PCI/pcie: Add PCIe Lane Margining at Receiver (LMR) support :::::: branch date: 20 hours ago :::::: commit date: 20 hours ago config: powerpc64-randconfig-r073-20260826 (https://download.01.org/0day-ci/archive/20260826/202608260405.gHL6gOJf-lkp@intel.com/config) compiler: powerpc64-linux-gcc (GCC) 15.2.0 smatch: v0.5.0-9187-g5189e3fb 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 | Reported-by: Dan Carpenter | Closes: https://lore.kernel.org/r/202608260405.gHL6gOJf-lkp@intel.com/ smatch warnings: drivers/pci/pcie/margin.c:1005 pci_lmr_exit() warn: variable dereferenced before check 'dev' (see line 1003) drivers/pci/pcie/margin.c:1020 pci_suspend_lmr() warn: variable dereferenced before check 'dev' (see line 1018) drivers/pci/pcie/margin.c:1056 pci_reset_lmr() warn: variable dereferenced before check 'dev' (see line 1054) vim +/dev +1005 drivers/pci/pcie/margin.c ecb76f560cf217 Priyank Rathod 2026-08-24 1000 ecb76f560cf217 Priyank Rathod 2026-08-24 1001 void pci_lmr_exit(struct pci_dev *dev) ecb76f560cf217 Priyank Rathod 2026-08-24 1002 { ecb76f560cf217 Priyank Rathod 2026-08-24 @1003 struct pci_margin_dev *mdev = dev->lmr; ecb76f560cf217 Priyank Rathod 2026-08-24 1004 ecb76f560cf217 Priyank Rathod 2026-08-24 @1005 if (!dev || !mdev) ecb76f560cf217 Priyank Rathod 2026-08-24 1006 return; ecb76f560cf217 Priyank Rathod 2026-08-24 1007 ecb76f560cf217 Priyank Rathod 2026-08-24 1008 pci_suspend_lmr(dev); ecb76f560cf217 Priyank Rathod 2026-08-24 1009 ecb76f560cf217 Priyank Rathod 2026-08-24 1010 pci_margin_debugfs_remove(mdev); ecb76f560cf217 Priyank Rathod 2026-08-24 1011 mutex_destroy(&mdev->lock); ecb76f560cf217 Priyank Rathod 2026-08-24 1012 kfree(mdev); ecb76f560cf217 Priyank Rathod 2026-08-24 1013 dev->lmr = NULL; ecb76f560cf217 Priyank Rathod 2026-08-24 1014 } ecb76f560cf217 Priyank Rathod 2026-08-24 1015 ecb76f560cf217 Priyank Rathod 2026-08-24 1016 void pci_suspend_lmr(struct pci_dev *dev) ecb76f560cf217 Priyank Rathod 2026-08-24 1017 { ecb76f560cf217 Priyank Rathod 2026-08-24 @1018 struct pci_margin_dev *mdev = dev->lmr; ecb76f560cf217 Priyank Rathod 2026-08-24 1019 ecb76f560cf217 Priyank Rathod 2026-08-24 @1020 if (!dev || !mdev) ecb76f560cf217 Priyank Rathod 2026-08-24 1021 return; ecb76f560cf217 Priyank Rathod 2026-08-24 1022 ecb76f560cf217 Priyank Rathod 2026-08-24 1023 guard(mutex)(&mdev->lock); ecb76f560cf217 Priyank Rathod 2026-08-24 1024 pci_lmr_disable_locked(mdev); ecb76f560cf217 Priyank Rathod 2026-08-24 1025 } ecb76f560cf217 Priyank Rathod 2026-08-24 1026 ecb76f560cf217 Priyank Rathod 2026-08-24 1027 static void pci_lmr_reset_software_state_locked(struct pci_margin_dev *mdev) ecb76f560cf217 Priyank Rathod 2026-08-24 1028 { ecb76f560cf217 Priyank Rathod 2026-08-24 1029 struct pci_dev *dev; ecb76f560cf217 Priyank Rathod 2026-08-24 1030 int i; ecb76f560cf217 Priyank Rathod 2026-08-24 1031 ecb76f560cf217 Priyank Rathod 2026-08-24 1032 if (!mdev) ecb76f560cf217 Priyank Rathod 2026-08-24 1033 return; ecb76f560cf217 Priyank Rathod 2026-08-24 1034 ecb76f560cf217 Priyank Rathod 2026-08-24 1035 lockdep_assert_held(&mdev->lock); ecb76f560cf217 Priyank Rathod 2026-08-24 1036 ecb76f560cf217 Priyank Rathod 2026-08-24 1037 if (!mdev->enabled) ecb76f560cf217 Priyank Rathod 2026-08-24 1038 return; ecb76f560cf217 Priyank Rathod 2026-08-24 1039 ecb76f560cf217 Priyank Rathod 2026-08-24 1040 dev = mdev->dev; ecb76f560cf217 Priyank Rathod 2026-08-24 1041 ecb76f560cf217 Priyank Rathod 2026-08-24 1042 for (i = 0; i < mdev->num_lanes; i++) { ecb76f560cf217 Priyank Rathod 2026-08-24 1043 mdev->lanes[i].timing_val = 0; ecb76f560cf217 Priyank Rathod 2026-08-24 1044 mdev->lanes[i].voltage_val = 0; ecb76f560cf217 Priyank Rathod 2026-08-24 1045 } ecb76f560cf217 Priyank Rathod 2026-08-24 1046 ecb76f560cf217 Priyank Rathod 2026-08-24 1047 pci_lmr_restore_aspm(mdev); ecb76f560cf217 Priyank Rathod 2026-08-24 1048 pm_runtime_put_sync(&dev->dev); ecb76f560cf217 Priyank Rathod 2026-08-24 1049 mdev->enabled = false; ecb76f560cf217 Priyank Rathod 2026-08-24 1050 } ecb76f560cf217 Priyank Rathod 2026-08-24 1051 ecb76f560cf217 Priyank Rathod 2026-08-24 1052 void pci_reset_lmr(struct pci_dev *dev) ecb76f560cf217 Priyank Rathod 2026-08-24 1053 { ecb76f560cf217 Priyank Rathod 2026-08-24 @1054 struct pci_margin_dev *mdev = dev->lmr; ecb76f560cf217 Priyank Rathod 2026-08-24 1055 ecb76f560cf217 Priyank Rathod 2026-08-24 @1056 if (!dev || !mdev) -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki