From: kernel test robot <lkp@intel.com>
To: Zheng Zengkai <zhengzengkai@huawei.com>,
lpieralisi@kernel.org, guohanjun@huawei.com,
sudeep.holla@arm.com, mark.rutland@arm.com, maz@kernel.org,
rafael@kernel.org, lenb@kernel.org
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
daniel.lezcano@linaro.org, tglx@linutronix.de,
linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, zhengzengkai@huawei.com
Subject: Re: [PATCH] ACPI: GTDT: simplify acpi_gtdt_init() implementation
Date: Tue, 1 Oct 2024 02:22:59 +0800 [thread overview]
Message-ID: <202410010101.2oPkEaoP-lkp@intel.com> (raw)
In-Reply-To: <20240930030716.179992-1-zhengzengkai@huawei.com>
Hi Zheng,
kernel test robot noticed the following build warnings:
[auto build test WARNING on rafael-pm/linux-next]
[also build test WARNING on rafael-pm/bleeding-edge tip/timers/core linus/master v6.12-rc1 next-20240930]
[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/Zheng-Zengkai/ACPI-GTDT-simplify-acpi_gtdt_init-implementation/20240930-105041
base: https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next
patch link: https://lore.kernel.org/r/20240930030716.179992-1-zhengzengkai%40huawei.com
patch subject: [PATCH] ACPI: GTDT: simplify acpi_gtdt_init() implementation
config: arm64-allmodconfig (https://download.01.org/0day-ci/archive/20241001/202410010101.2oPkEaoP-lkp@intel.com/config)
compiler: clang version 20.0.0git (https://github.com/llvm/llvm-project 7773243d9916f98ba0ffce0c3a960e4aa9f03e81)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241001/202410010101.2oPkEaoP-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/202410010101.2oPkEaoP-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from drivers/acpi/arm64/gtdt.c:11:
In file included from include/linux/acpi.h:39:
In file included from include/acpi/acpi_io.h:7:
In file included from arch/arm64/include/asm/acpi.h:14:
In file included from include/linux/memblock.h:12:
In file included from include/linux/mm.h:2236:
include/linux/vmstat.h:503:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
503 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~ ^
504 | item];
| ~~~~
include/linux/vmstat.h:510:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
510 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~ ^
511 | NR_VM_NUMA_EVENT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~~
include/linux/vmstat.h:517:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
517 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
| ~~~~~~~~~~~ ^ ~~~
include/linux/vmstat.h:523:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
523 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~ ^
524 | NR_VM_NUMA_EVENT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~~
>> drivers/acpi/arm64/gtdt.c:383:6: warning: variable 'ret' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
383 | if (!timer_count)
| ^~~~~~~~~~~~
drivers/acpi/arm64/gtdt.c:400:9: note: uninitialized use occurs here
400 | return ret;
| ^~~
drivers/acpi/arm64/gtdt.c:383:2: note: remove the 'if' if its condition is always false
383 | if (!timer_count)
| ^~~~~~~~~~~~~~~~~
384 | goto out_put_gtdt;
| ~~~~~~~~~~~~~~~~~
drivers/acpi/arm64/gtdt.c:365:9: note: initialize the variable 'ret' to silence this warning
365 | int ret, timer_count = 0, gwdt_count = 0;
| ^
| = 0
5 warnings generated.
vim +383 drivers/acpi/arm64/gtdt.c
360
361 static int __init gtdt_sbsa_gwdt_init(void)
362 {
363 void *platform_timer;
364 struct acpi_table_header *table;
365 int ret, timer_count = 0, gwdt_count = 0;
366
367 if (acpi_disabled)
368 return 0;
369
370 if (ACPI_FAILURE(acpi_get_table(ACPI_SIG_GTDT, 0, &table)))
371 return -EINVAL;
372
373 /*
374 * Note: Even though the global variable acpi_gtdt_desc has been
375 * initialized by acpi_gtdt_init() while initializing the arch timers,
376 * when we call this function to get SBSA watchdogs info from GTDT, the
377 * pointers stashed in it are stale (since they are early temporary
378 * mappings carried out before acpi_permanent_mmap is set) and we need
379 * to re-initialize them with permanent mapped pointer values to let the
380 * GTDT parsing possible.
381 */
382 acpi_gtdt_init(table, &timer_count);
> 383 if (!timer_count)
384 goto out_put_gtdt;
385
386 for_each_platform_timer(platform_timer) {
387 if (is_non_secure_watchdog(platform_timer)) {
388 ret = gtdt_import_sbsa_gwdt(platform_timer, gwdt_count);
389 if (ret)
390 break;
391 gwdt_count++;
392 }
393 }
394
395 if (gwdt_count)
396 pr_info("found %d SBSA generic Watchdog(s).\n", gwdt_count);
397
398 out_put_gtdt:
399 acpi_put_table(table);
400 return ret;
401 }
402
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
prev parent reply other threads:[~2024-09-30 18:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-30 3:07 [PATCH] ACPI: GTDT: simplify acpi_gtdt_init() implementation Zheng Zengkai
2024-09-30 18:22 ` kernel test robot [this message]
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=202410010101.2oPkEaoP-lkp@intel.com \
--to=lkp@intel.com \
--cc=daniel.lezcano@linaro.org \
--cc=guohanjun@huawei.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=lpieralisi@kernel.org \
--cc=mark.rutland@arm.com \
--cc=maz@kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=rafael@kernel.org \
--cc=sudeep.holla@arm.com \
--cc=tglx@linutronix.de \
--cc=zhengzengkai@huawei.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