From: kernel test robot <lkp@intel.com>
To: Charan Teja Kalla <charan.kalla@oss.qualcomm.com>,
robin.murphy@arm.com, will@kernel.org, joro@8bytes.org,
robh@kernel.org, dmitry.baryshkov@oss.qualcomm.com,
konrad.dybcio@oss.qualcomm.com, bjorn.andersson@oss.qualcomm.com,
bod@kernel.org, conor+dt@kernel.org, krzk+dt@kernel.org,
saravanak@google.com, prakash.gupta@oss.qualcomm.com,
vikash.garodia@oss.qualcomm.com
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
iommu@lists.linux.dev, linux-kernel@vger.kernel.org,
devicetree@vger.kernel.org,
Charan Teja Kalla <charan.kalla@oss.qualcomm.com>
Subject: Re: [PATCH 5/6] of: add infra to parse iommu-map per IOMMU cell count
Date: Tue, 4 Nov 2025 18:46:03 +0800 [thread overview]
Message-ID: <202511041853.IxYgvWlc-lkp@intel.com> (raw)
In-Reply-To: <74d4ddf90c0fb485fda1feec5116dc38e5fd23cf.1762235099.git.charan.kalla@oss.qualcomm.com>
Hi Charan,
kernel test robot noticed the following build warnings:
[auto build test WARNING on robh/for-next]
[also build test WARNING on linus/master v6.18-rc4 next-20251103]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Charan-Teja-Kalla/of-create-a-wrapper-for-of_map_id/20251104-170223
base: https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
patch link: https://lore.kernel.org/r/74d4ddf90c0fb485fda1feec5116dc38e5fd23cf.1762235099.git.charan.kalla%40oss.qualcomm.com
patch subject: [PATCH 5/6] of: add infra to parse iommu-map per IOMMU cell count
config: loongarch-allnoconfig (https://download.01.org/0day-ci/archive/20251104/202511041853.IxYgvWlc-lkp@intel.com/config)
compiler: clang version 22.0.0git (https://github.com/llvm/llvm-project d2625a438020ad35330cda29c3def102c1687b1b)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251104/202511041853.IxYgvWlc-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/202511041853.IxYgvWlc-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/of/base.c:2127:6: warning: variable 'legacy_iommu_cells' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
2127 | if (map_len % 4 != 0)
| ^~~~~~~~~~~~~~~~
drivers/of/base.c:2130:9: note: uninitialized use occurs here
2130 | return legacy_iommu_cells ? : of_iommu_map_id_actual_cell_count(map, map_len, cells);
| ^~~~~~~~~~~~~~~~~~
drivers/of/base.c:2127:2: note: remove the 'if' if its condition is always true
2127 | if (map_len % 4 != 0)
| ^~~~~~~~~~~~~~~~~~~~~
2128 | legacy_iommu_cells = of_iommu_map_id_legacy_cell_count(map, map_len);
drivers/of/base.c:2125:24: note: initialize the variable 'legacy_iommu_cells' to silence this warning
2125 | u32 legacy_iommu_cells;
| ^
| = 0
1 warning generated.
vim +2127 drivers/of/base.c
c74d6f4acf99ef Charan Teja Kalla 2025-11-04 2110
c74d6f4acf99ef Charan Teja Kalla 2025-11-04 2111 /**
c74d6f4acf99ef Charan Teja Kalla 2025-11-04 2112 * of_iommu_map_id_cell_count - Determine the cell count for iommu-map parsing.
c74d6f4acf99ef Charan Teja Kalla 2025-11-04 2113 *
c74d6f4acf99ef Charan Teja Kalla 2025-11-04 2114 * @map: pointer to the iommu-map property that needs to be translated.
c74d6f4acf99ef Charan Teja Kalla 2025-11-04 2115 * @map_len: length of @map in bytes.
c74d6f4acf99ef Charan Teja Kalla 2025-11-04 2116 *
c74d6f4acf99ef Charan Teja Kalla 2025-11-04 2117 * Use #iommu-cells property while parsing iommu-map. Detect and use legacy
c74d6f4acf99ef Charan Teja Kalla 2025-11-04 2118 * case where iommu-map is parsed as if cells = 1.
c74d6f4acf99ef Charan Teja Kalla 2025-11-04 2119 *
c74d6f4acf99ef Charan Teja Kalla 2025-11-04 2120 * Return: number of cells that the caller should be considered while parsing
c74d6f4acf99ef Charan Teja Kalla 2025-11-04 2121 * the @map. It is > 0 for success, 0 for failure.
c74d6f4acf99ef Charan Teja Kalla 2025-11-04 2122 */
5288ad2aeeeb41 Charan Teja Kalla 2025-11-04 2123 static int of_iommu_map_id_cell_count(const __be32 *map, int map_len, u32 cells)
c74d6f4acf99ef Charan Teja Kalla 2025-11-04 2124 {
5288ad2aeeeb41 Charan Teja Kalla 2025-11-04 2125 u32 legacy_iommu_cells;
5288ad2aeeeb41 Charan Teja Kalla 2025-11-04 2126
c74d6f4acf99ef Charan Teja Kalla 2025-11-04 @2127 if (map_len % 4 != 0)
5288ad2aeeeb41 Charan Teja Kalla 2025-11-04 2128 legacy_iommu_cells = of_iommu_map_id_legacy_cell_count(map, map_len);
c74d6f4acf99ef Charan Teja Kalla 2025-11-04 2129
5288ad2aeeeb41 Charan Teja Kalla 2025-11-04 2130 return legacy_iommu_cells ? : of_iommu_map_id_actual_cell_count(map, map_len, cells);
c74d6f4acf99ef Charan Teja Kalla 2025-11-04 2131 }
c74d6f4acf99ef Charan Teja Kalla 2025-11-04 2132
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2025-11-04 10:47 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-04 8:50 [PATCH 0/6] of: iommu-map parsing for multi-cell IOMMU Charan Teja Kalla
2025-11-04 8:51 ` [PATCH 1/6] of: create a wrapper for of_map_id() Charan Teja Kalla
2025-11-04 8:51 ` [PATCH 2/6] of: introduce wrapper function to query the cell count Charan Teja Kalla
2025-11-05 17:35 ` Robin Murphy
2025-11-04 8:51 ` [PATCH 3/6] of: parse #<name>-cells property to get " Charan Teja Kalla
2025-11-04 8:51 ` [PATCH 4/6] of: detect and handle legacy iommu-map parsing Charan Teja Kalla
2025-11-04 8:51 ` [PATCH 5/6] of: add infra to parse iommu-map per IOMMU cell count Charan Teja Kalla
2025-11-04 10:46 ` kernel test robot [this message]
2025-11-04 10:57 ` Charan Teja Kalla
2025-11-04 13:02 ` kernel test robot
2025-11-06 15:03 ` Dan Carpenter
2025-11-04 8:51 ` [PATCH 6/6] of: use correct iommu-map parsing logic from of_iommu layer Charan Teja Kalla
2025-11-05 18:20 ` Robin Murphy
2025-11-05 17:28 ` [PATCH 0/6] of: iommu-map parsing for multi-cell IOMMU Robin Murphy
2025-11-11 18:27 ` Charan Teja Kalla
2025-11-12 14:42 ` Charan Teja Kalla
2025-11-21 5:54 ` Charan Teja Kalla
2025-11-24 16:42 ` Robin Murphy
2025-11-24 16:51 ` Robin Murphy
2025-11-26 17:30 ` Charan Teja Kalla
2025-11-07 8:07 ` Krzysztof Kozlowski
2025-11-11 18:45 ` Charan Teja Kalla
2025-11-11 20:39 ` Rob Herring
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=202511041853.IxYgvWlc-lkp@intel.com \
--to=lkp@intel.com \
--cc=bjorn.andersson@oss.qualcomm.com \
--cc=bod@kernel.org \
--cc=charan.kalla@oss.qualcomm.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.baryshkov@oss.qualcomm.com \
--cc=iommu@lists.linux.dev \
--cc=joro@8bytes.org \
--cc=konrad.dybcio@oss.qualcomm.com \
--cc=krzk+dt@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=prakash.gupta@oss.qualcomm.com \
--cc=robh@kernel.org \
--cc=robin.murphy@arm.com \
--cc=saravanak@google.com \
--cc=vikash.garodia@oss.qualcomm.com \
--cc=will@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