[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202307251721.bUGcsCeQ-lkp@intel.com>
Date: Tue, 25 Jul 2023 17:20:49 +0800
From: kernel test robot <lkp@...el.com>
To: Laurent Dufour <ldufour@...ux.ibm.com>
Cc: llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev,
linux-kernel@...r.kernel.org, Michael Ellerman <mpe@...erman.id.au>
Subject: arch/powerpc/kexec/file_load_64.c:939: warning: expecting prototype
for get_cpu_node_size(). Prototype was for cpu_node_size() instead
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 0b5547c51827e053cc754db47d3ec3e6c2c451d2
commit: 340a4a9f8773e102cc5ef531665970a686dfa245 powerpc: Take in account addition CPU node when building kexec FDT
date: 8 months ago
config: powerpc-skiroot_defconfig (https://download.01.org/0day-ci/archive/20230725/202307251721.bUGcsCeQ-lkp@intel.com/config)
compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project.git 4a5ac14ee968ff0ad5d2cc1ffa0299048db4c88a)
reproduce: (https://download.01.org/0day-ci/archive/20230725/202307251721.bUGcsCeQ-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@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202307251721.bUGcsCeQ-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> arch/powerpc/kexec/file_load_64.c:939: warning: expecting prototype for get_cpu_node_size(). Prototype was for cpu_node_size() instead
vim +939 arch/powerpc/kexec/file_load_64.c
931
932 /**
933 * get_cpu_node_size - Compute the size of a CPU node in the FDT.
934 * This should be done only once and the value is stored in
935 * a static variable.
936 * Returns the max size of a CPU node in the FDT.
937 */
938 static unsigned int cpu_node_size(void)
> 939 {
940 static unsigned int size;
941 struct device_node *dn;
942 struct property *pp;
943
944 /*
945 * Don't compute it twice, we are assuming that the per CPU node size
946 * doesn't change during the system's life.
947 */
948 if (size)
949 return size;
950
951 dn = of_find_node_by_type(NULL, "cpu");
952 if (WARN_ON_ONCE(!dn)) {
953 // Unlikely to happen
954 return 0;
955 }
956
957 /*
958 * We compute the sub node size for a CPU node, assuming it
959 * will be the same for all.
960 */
961 size += strlen(dn->name) + 5;
962 for_each_property_of_node(dn, pp) {
963 size += strlen(pp->name);
964 size += pp->length;
965 }
966
967 of_node_put(dn);
968 return size;
969 }
970
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Powered by blists - more mailing lists