From: kernel test robot <lkp@intel.com>
To: Jie Gan <jie.gan@oss.qualcomm.com>,
Suzuki K Poulose <suzuki.poulose@arm.com>,
Mike Leach <mike.leach@arm.com>,
James Clark <james.clark@linaro.org>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Tingwei Zhang <tingwei.zhang@oss.qualcomm.com>,
Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konradybcio@kernel.org>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org,
devicetree@vger.kernel.org, Jie Gan <jie.gan@oss.qualcomm.com>
Subject: Re: [PATCH v15 2/7] coresight: tmc: add create/clean functions for etr_buf_list
Date: Tue, 17 Mar 2026 16:43:31 +0800 [thread overview]
Message-ID: <202603171518.XQOgdjNN-lkp@intel.com> (raw)
In-Reply-To: <20260313-enable-byte-cntr-for-ctcu-v15-2-1777f14ed319@oss.qualcomm.com>
Hi Jie,
kernel test robot noticed the following build warnings:
[auto build test WARNING on a0ae2a256046c0c5d3778d1a194ff2e171f16e5f]
url: https://github.com/intel-lab-lkp/linux/commits/Jie-Gan/coresight-core-refactor-ctcu_get_active_port-and-make-it-generic/20260315-052703
base: a0ae2a256046c0c5d3778d1a194ff2e171f16e5f
patch link: https://lore.kernel.org/r/20260313-enable-byte-cntr-for-ctcu-v15-2-1777f14ed319%40oss.qualcomm.com
patch subject: [PATCH v15 2/7] coresight: tmc: add create/clean functions for etr_buf_list
config: arm64-allmodconfig (https://download.01.org/0day-ci/archive/20260317/202603171518.XQOgdjNN-lkp@intel.com/config)
compiler: clang version 19.1.7 (https://github.com/llvm/llvm-project cd708029e0b2869e80abe31ddb175f7c35361f90)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260317/202603171518.XQOgdjNN-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/202603171518.XQOgdjNN-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/hwtracing/coresight/coresight-tmc-etr.c:1979:50: warning: variable 'flags' is uninitialized when used here [-Wuninitialized]
1979 | raw_spin_unlock_irqrestore(&drvdata->spinlock, flags);
| ^~~~~
include/linux/spinlock.h:283:37: note: expanded from macro 'raw_spin_unlock_irqrestore'
283 | _raw_spin_unlock_irqrestore(lock, flags); \
| ^~~~~
drivers/hwtracing/coresight/coresight-tmc-etr.c:1969:21: note: initialize the variable 'flags' to silence this warning
1969 | unsigned long flags;
| ^
| = 0
1 warning generated.
vim +/flags +1979 drivers/hwtracing/coresight/coresight-tmc-etr.c
1957
1958 /**
1959 * tmc_create_etr_buf_list - create a list to manage the etr_buf_node.
1960 * @drvdata: driver data of the TMC device.
1961 * @num_nodes: number of nodes want to create with the list.
1962 *
1963 * Return 0 upon success and return the error number if fail.
1964 */
1965 int tmc_create_etr_buf_list(struct tmc_drvdata *drvdata, int num_nodes)
1966 {
1967 struct etr_buf_node *new_node;
1968 struct etr_buf *sysfs_buf;
1969 unsigned long flags;
1970 int i = 0, ret = 0;
1971
1972 lockdep_assert_held(&drvdata->spinlock);
1973 /* We dont need a list if there is only one node */
1974 if (num_nodes < 2)
1975 return -EINVAL;
1976
1977 /* We expect that sysfs_buf in drvdata has already been allocated. */
1978 if (drvdata->sysfs_buf) {
> 1979 raw_spin_unlock_irqrestore(&drvdata->spinlock, flags);
1980 /* Directly insert the allocated sysfs_buf into the list first */
1981 new_node = kzalloc_obj(*new_node, GFP_KERNEL);
1982 if (IS_ERR(new_node))
1983 return PTR_ERR(new_node);
1984
1985 raw_spin_lock_irqsave(&drvdata->spinlock, flags);
1986 new_node->sysfs_buf = drvdata->sysfs_buf;
1987 new_node->is_free = false;
1988 list_add(&new_node->link, &drvdata->etr_buf_list);
1989 i++;
1990 }
1991
1992 raw_spin_unlock_irqrestore(&drvdata->spinlock, flags);
1993 while (i < num_nodes) {
1994 new_node = kzalloc_obj(*new_node, GFP_KERNEL);
1995 if (IS_ERR(new_node)) {
1996 ret = PTR_ERR(new_node);
1997 break;
1998 }
1999
2000 sysfs_buf = tmc_alloc_etr_buf(drvdata, drvdata->size, 0, cpu_to_node(0), NULL);
2001 if (IS_ERR(sysfs_buf)) {
2002 kfree(new_node);
2003 ret = PTR_ERR(sysfs_buf);
2004 break;
2005 }
2006
2007 /* We dont have a available sysfs_buf in drvdata, setup one */
2008 if (!drvdata->sysfs_buf) {
2009 drvdata->sysfs_buf = sysfs_buf;
2010 new_node->is_free = false;
2011 } else
2012 new_node->is_free = true;
2013
2014 new_node->sysfs_buf = sysfs_buf;
2015 list_add(&new_node->link, &drvdata->etr_buf_list);
2016 i++;
2017 }
2018
2019 /* Clean the list if there is an error */
2020 if (ret)
2021 tmc_clean_etr_buf_list(drvdata);
2022
2023 raw_spin_lock_irqsave(&drvdata->spinlock, flags);
2024
2025 return ret;
2026 }
2027 EXPORT_SYMBOL_GPL(tmc_create_etr_buf_list);
2028
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2026-03-17 8:44 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-13 9:02 [PATCH v15 0/7] coresight: ctcu: Enable byte-cntr function for TMC ETR Jie Gan
2026-03-13 9:02 ` [PATCH v15 1/7] coresight: core: refactor ctcu_get_active_port and make it generic Jie Gan
2026-03-13 9:02 ` [PATCH v15 2/7] coresight: tmc: add create/clean functions for etr_buf_list Jie Gan
2026-03-17 8:43 ` kernel test robot [this message]
2026-03-17 11:01 ` Suzuki K Poulose
2026-03-18 1:06 ` Jie Gan
2026-03-13 9:02 ` [PATCH v15 3/7] coresight: tmc: introduce tmc_sysfs_ops to wrap sysfs read operations Jie Gan
2026-03-13 9:02 ` [PATCH v15 4/7] coresight: etr: add a new function to retrieve the CTCU device Jie Gan
2026-03-13 9:02 ` [PATCH v15 5/7] dt-bindings: arm: add an interrupt property for Coresight CTCU Jie Gan
2026-03-13 9:02 ` [PATCH v15 6/7] coresight: ctcu: enable byte-cntr for TMC ETR devices Jie Gan
2026-03-17 10:10 ` kernel test robot
2026-03-13 9:02 ` [PATCH v15 7/7] arm64: dts: qcom: lemans: add interrupts to CTCU device Jie Gan
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=202603171518.XQOgdjNN-lkp@intel.com \
--to=lkp@intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=andersson@kernel.org \
--cc=conor+dt@kernel.org \
--cc=coresight@lists.linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=james.clark@linaro.org \
--cc=jie.gan@oss.qualcomm.com \
--cc=konradybcio@kernel.org \
--cc=krzk@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=mike.leach@arm.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=robh@kernel.org \
--cc=suzuki.poulose@arm.com \
--cc=tingwei.zhang@oss.qualcomm.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