From: Dan Carpenter <dan.carpenter@linaro.org>
To: oe-kbuild@lists.linux.dev, Kishon Vijay Abraham I <kvijayab@amd.com>
Cc: lkp@intel.com, oe-kbuild-all@lists.linux.dev,
linux-kernel@vger.kernel.org, Joerg Roedel <jroedel@suse.de>,
Sairaj Kodilkar <sarunkod@amd.com>,
Vasant Hegde <vasant.hegde@amd.com>
Subject: drivers/iommu/amd/iommu.c:2401 amd_iommu_probe_device() error: uninitialized symbol 'dev_data'.
Date: Fri, 19 Dec 2025 12:57:22 +0300 [thread overview]
Message-ID: <202512191724.meqJENXe-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: dd9b004b7ff3289fb7bae35130c0a5c0537266af
commit: 19e5cc156cbc32421eb8237615f246c08eea8284 iommu/amd: Enable support for up to 2K interrupts per function
config: x86_64-randconfig-r073-20251215 (https://download.01.org/0day-ci/archive/20251219/202512191724.meqJENXe-lkp@intel.com/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
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>
| Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
| Closes: https://lore.kernel.org/r/202512191724.meqJENXe-lkp@intel.com/
New smatch warnings:
drivers/iommu/amd/iommu.c:2401 amd_iommu_probe_device() error: uninitialized symbol 'dev_data'.
drivers/iommu/amd/iommu.c:3200 alloc_irq_table() error: we previously assumed 'iommu' could be null (see line 3195)
vim +/dev_data +2401 drivers/iommu/amd/iommu.c
dce8d6964ebdb3 drivers/iommu/amd_iommu.c Joerg Roedel 2020-04-29 2353 static struct iommu_device *amd_iommu_probe_device(struct device *dev)
15898bbcb48fc8 arch/x86/kernel/amd_iommu.c Joerg Roedel 2009-11-24 2354 {
dce8d6964ebdb3 drivers/iommu/amd_iommu.c Joerg Roedel 2020-04-29 2355 struct iommu_device *iommu_dev;
e275a2a0fc9e21 arch/x86/kernel/amd_iommu.c Joerg Roedel 2008-12-10 2356 struct amd_iommu *iommu;
a0c47f233e683e drivers/iommu/amd/iommu.c Vasant Hegde 2024-04-18 2357 struct iommu_dev_data *dev_data;
8b71c9bf4df829 drivers/iommu/amd/iommu.c Suravee Suthikulpanit 2022-07-06 2358 int ret;
e275a2a0fc9e21 arch/x86/kernel/amd_iommu.c Joerg Roedel 2008-12-10 2359
57bd2c24ba1673 drivers/iommu/amd_iommu.c Joerg Roedel 2020-04-29 2360 if (!check_device(dev))
dce8d6964ebdb3 drivers/iommu/amd_iommu.c Joerg Roedel 2020-04-29 2361 return ERR_PTR(-ENODEV);
e275a2a0fc9e21 arch/x86/kernel/amd_iommu.c Joerg Roedel 2008-12-10 2362
8b71c9bf4df829 drivers/iommu/amd/iommu.c Suravee Suthikulpanit 2022-07-06 2363 iommu = rlookup_amd_iommu(dev);
8b71c9bf4df829 drivers/iommu/amd/iommu.c Suravee Suthikulpanit 2022-07-06 2364 if (!iommu)
8b71c9bf4df829 drivers/iommu/amd/iommu.c Suravee Suthikulpanit 2022-07-06 2365 return ERR_PTR(-ENODEV);
e275a2a0fc9e21 arch/x86/kernel/amd_iommu.c Joerg Roedel 2008-12-10 2366
cbc040081fdf7d drivers/iommu/amd/iommu.c Robin Murphy 2022-08-15 2367 /* Not registered yet? */
cbc040081fdf7d drivers/iommu/amd/iommu.c Robin Murphy 2022-08-15 2368 if (!iommu->iommu.ops)
cbc040081fdf7d drivers/iommu/amd/iommu.c Robin Murphy 2022-08-15 2369 return ERR_PTR(-ENODEV);
cbc040081fdf7d drivers/iommu/amd/iommu.c Robin Murphy 2022-08-15 2370
05a0542b456e13 drivers/iommu/amd_iommu.c Joerg Roedel 2020-05-27 2371 if (dev_iommu_priv_get(dev))
dce8d6964ebdb3 drivers/iommu/amd_iommu.c Joerg Roedel 2020-04-29 2372 return &iommu->iommu;
dce8d6964ebdb3 drivers/iommu/amd_iommu.c Joerg Roedel 2020-04-29 2373
99fc4ac3d2978c drivers/iommu/amd/iommu.c Suravee Suthikulpanit 2022-07-06 2374 ret = iommu_init_device(iommu, dev);
4d58b8a6de6b8c drivers/iommu/amd_iommu.c Joerg Roedel 2015-06-11 2375 if (ret) {
5f226da1b1d706 drivers/iommu/amd_iommu.c Bjorn Helgaas 2019-02-08 2376 dev_err(dev, "Failed to initialize - trying to proceed anyway\n");
dce8d6964ebdb3 drivers/iommu/amd_iommu.c Joerg Roedel 2020-04-29 2377 iommu_dev = ERR_PTR(ret);
99fc4ac3d2978c drivers/iommu/amd/iommu.c Suravee Suthikulpanit 2022-07-06 2378 iommu_ignore_device(iommu, dev);
293aa9ec694e63 drivers/iommu/amd/iommu.c Vasant Hegde 2024-08-28 2379 goto out_err;
dev_data is uninitialized.
293aa9ec694e63 drivers/iommu/amd/iommu.c Vasant Hegde 2024-08-28 2380 }
293aa9ec694e63 drivers/iommu/amd/iommu.c Vasant Hegde 2024-08-28 2381
2b2c6aa63824c6 drivers/iommu/amd/iommu.c Thomas Gleixner 2020-08-26 2382 amd_iommu_set_pci_msi_domain(dev, iommu);
dce8d6964ebdb3 drivers/iommu/amd_iommu.c Joerg Roedel 2020-04-29 2383 iommu_dev = &iommu->iommu;
657cbb6b6cba0f arch/x86/kernel/amd_iommu.c Joerg Roedel 2009-11-23 2384
a0c47f233e683e drivers/iommu/amd/iommu.c Vasant Hegde 2024-04-18 2385 /*
a0c47f233e683e drivers/iommu/amd/iommu.c Vasant Hegde 2024-04-18 2386 * If IOMMU and device supports PASID then it will contain max
a0c47f233e683e drivers/iommu/amd/iommu.c Vasant Hegde 2024-04-18 2387 * supported PASIDs, else it will be zero.
a0c47f233e683e drivers/iommu/amd/iommu.c Vasant Hegde 2024-04-18 2388 */
a0c47f233e683e drivers/iommu/amd/iommu.c Vasant Hegde 2024-04-18 2389 dev_data = dev_iommu_priv_get(dev);
a0c47f233e683e drivers/iommu/amd/iommu.c Vasant Hegde 2024-04-18 2390 if (amd_iommu_pasid_supported() && dev_is_pci(dev) &&
a0c47f233e683e drivers/iommu/amd/iommu.c Vasant Hegde 2024-04-18 2391 pdev_pasid_supported(dev_data)) {
a0c47f233e683e drivers/iommu/amd/iommu.c Vasant Hegde 2024-04-18 2392 dev_data->max_pasids = min_t(u32, iommu->iommu.max_pasids,
a0c47f233e683e drivers/iommu/amd/iommu.c Vasant Hegde 2024-04-18 2393 pci_max_pasids(to_pci_dev(dev)));
a0c47f233e683e drivers/iommu/amd/iommu.c Vasant Hegde 2024-04-18 2394 }
a0c47f233e683e drivers/iommu/amd/iommu.c Vasant Hegde 2024-04-18 2395
293aa9ec694e63 drivers/iommu/amd/iommu.c Vasant Hegde 2024-08-28 2396 out_err:
19e5cc156cbc32 drivers/iommu/amd/iommu.c Kishon Vijay Abraham I 2025-03-07 2397
dce8d6964ebdb3 drivers/iommu/amd_iommu.c Joerg Roedel 2020-04-29 2398 iommu_completion_wait(iommu);
2c9195e9902970 drivers/iommu/amd_iommu.c Joerg Roedel 2012-07-19 2399
19e5cc156cbc32 drivers/iommu/amd/iommu.c Kishon Vijay Abraham I 2025-03-07 2400 if (FEATURE_NUM_INT_REMAP_SUP_2K(amd_iommu_efr2))
19e5cc156cbc32 drivers/iommu/amd/iommu.c Kishon Vijay Abraham I 2025-03-07 @2401 dev_data->max_irqs = MAX_IRQS_PER_TABLE_2K;
^^^^^^^^^^
19e5cc156cbc32 drivers/iommu/amd/iommu.c Kishon Vijay Abraham I 2025-03-07 2402 else
19e5cc156cbc32 drivers/iommu/amd/iommu.c Kishon Vijay Abraham I 2025-03-07 2403 dev_data->max_irqs = MAX_IRQS_PER_TABLE_512;
^^^^^^^^^^
19e5cc156cbc32 drivers/iommu/amd/iommu.c Kishon Vijay Abraham I 2025-03-07 2404
6c17c7d5936e6a drivers/iommu/amd/iommu.c Jason Gunthorpe 2024-08-07 2405 if (dev_is_pci(dev))
6c17c7d5936e6a drivers/iommu/amd/iommu.c Jason Gunthorpe 2024-08-07 2406 pci_prepare_ats(to_pci_dev(dev), PAGE_SHIFT);
6c17c7d5936e6a drivers/iommu/amd/iommu.c Jason Gunthorpe 2024-08-07 2407
dce8d6964ebdb3 drivers/iommu/amd_iommu.c Joerg Roedel 2020-04-29 2408 return iommu_dev;
dce8d6964ebdb3 drivers/iommu/amd_iommu.c Joerg Roedel 2020-04-29 2409 }
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2025-12-19 9:57 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=202512191724.meqJENXe-lkp@intel.com \
--to=dan.carpenter@linaro.org \
--cc=jroedel@suse.de \
--cc=kvijayab@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=oe-kbuild@lists.linux.dev \
--cc=sarunkod@amd.com \
--cc=vasant.hegde@amd.com \
/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
all inboxes | Powered by JetHome®