Skip to contentSkip to conversation

mm/damon/sysfs-schemes.c:1622:32: sparse: sparse: symbol 'damos_sysfs_action_names' was not declared. Should it be static?

PATCH kernel test robot 3 participants 3 messages Jun 27, 2025

Subsystems (2)
lore
Share & tools
lore

kernel test robot

author build bot
#0 lore raw
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   ecb259c4f70dd5c83907809f45bf4dc6869961d7
commit: 98c5783c468ce5630a0604c69694d04ccc078c02 [5320/5590] mm/damon/sysfs-schemes: decouple from damos_action
config: hexagon-randconfig-r122-20250627 (https://download.01.org/0day-ci/archive/20250627/[email protected]/config)
compiler: clang version 21.0.0git (https://github.com/llvm/llvm-project e04c938cc08a90ae60440ce22d072ebc69d67ee8)
reproduce: (https://download.01.org/0day-ci/archive/20250627/[email protected]/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 <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

sparse warnings: (new ones prefixed by >>)

>> mm/damon/sysfs-schemes.c:1622:32: sparse: sparse: symbol 'damos_sysfs_action_names' was not declared. Should it be static?

vim +/damos_sysfs_action_names +1622 mm/damon/sysfs-schemes.c

1621

> 1622	struct damos_sysfs_action_name damos_sysfs_action_names[] = {

1623 {
1624 .action = DAMOS_WILLNEED,
1625 .name = "willneed",
1626 },
1627 {
1628 .action = DAMOS_COLD,
1629 .name = "cold",
1630 },
1631 {
1632 .action = DAMOS_PAGEOUT,
1633 .name = "pageout",
1634 },
1635 {
1636 .action = DAMOS_HUGEPAGE,
1637 .name = "hugepage",
1638 },
1639 {
1640 .action = DAMOS_NOHUGEPAGE,
1641 .name = "nohugepage",
1642 },
1643 {
1644 .action = DAMOS_LRU_PRIO,
1645 .name = "lru_prio",
1646 },
1647 {
1648 .action = DAMOS_LRU_DEPRIO,
1649 .name = "lru_deprio",
1650 },
1651 {
1652 .action = DAMOS_MIGRATE_HOT,
1653 .name = "migrate_hot",
1654 },
1655 {
1656 .action = DAMOS_MIGRATE_COLD,
1657 .name = "migrate_cold",
1658 },
1659 {
1660 .action = DAMOS_STAT,
1661 .name = "stat",
1662 },
1663 };
1664

Signature · 2 lines
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
maintainer
#1 lore raw
Quoted 7 lines · On Fri, 27 Jun 2025 16:41:02 +0800 kernel test robot <[email protected]> wrote:
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   ecb259c4f70dd5c83907809f45bf4dc6869961d7
commit: 98c5783c468ce5630a0604c69694d04ccc078c02 [5320/5590] mm/damon/sysfs-schemes: decouple from damos_action
config: hexagon-randconfig-r122-20250627 (https://download.01.org/0day-ci/archive/20250627/[email protected]/config)
compiler: clang version 21.0.0git (https://github.com/llvm/llvm-project e04c938cc08a90ae60440ce22d072ebc69d67ee8)
reproduce: (https://download.01.org/0day-ci/archive/20250627/[email protected]/reproduce)
Quoted 7 lines

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 <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

sparse warnings: (new ones prefixed by >>)

Quoted 1 line
Quoted 1 line

mm/damon/sysfs-schemes.c:1622:32: sparse: sparse: symbol 'damos_sysfs_action_names' was not declared. Should it be static?

Thanks.

mm/damon/sysfs-schemes.c renamed from mm/damon/sysfs-schemes.c~mm-damon-sysfs-schemes-decouple-from-damos_action-fix +1 -1
@@ -1619,7 +1619,7 @@ struct damos_sysfs_action_name {
 	char *name;
 };
 
-struct damos_sysfs_action_name damos_sysfs_action_names[] = {
+static struct damos_sysfs_action_name damos_sysfs_action_names[] = {
 	{
 		.action = DAMOS_WILLNEED,
 		.name = "willneed",

_

maintainer Reviewed-by
#2 lore raw
Quoted 1 line · On Fri, 27 Jun 2025 12:57:31 -0700 Andrew Morton <[email protected]>…

On Fri, 27 Jun 2025 16:41:02 +0800 kernel test robot <[email protected]> wrote:

[...]

Quoted 16 lines
Quoted 2 lines

sparse warnings: (new ones prefixed by >>)

Quoted 1 line
Quoted 1 line

mm/damon/sysfs-schemes.c:1622:32: sparse: sparse: symbol 'damos_sysfs_action_names' was not declared. Should it be static?

Thanks.

mm/damon/sysfs-schemes.c renamed from mm/damon/sysfs-schemes.c~mm-damon-sysfs-schemes-decouple-from-damos_action-fix +1 -1
@@ -1619,7 +1619,7 @@ struct damos_sysfs_action_name {
 	char *name;
 };
 
-struct damos_sysfs_action_name damos_sysfs_action_names[] = {
+static struct damos_sysfs_action_name damos_sysfs_action_names[] = {
 	{
 		.action = DAMOS_WILLNEED,
 		.name = "willneed",
Quoted 1 line

_

Thank you Andrew. I posted a same fix[1] but forgot noting that here. Since it is same to yours and yours is already added to mm tree, let's keep using yours unless you mind.

FWIW,

[1] https://lore.kernel.org/[email protected]

Thanks,
SJ