* arch/powerpc/kexec/core.c:246:29: sparse: sparse: incorrect type in assignment (different base types)
@ 2020-06-11 16:01 kernel test robot
2020-06-12 5:15 ` Christophe Leroy
0 siblings, 1 reply; 6+ messages in thread
From: kernel test robot @ 2020-06-11 16:01 UTC (permalink / raw)
To: Christophe Leroy; +Cc: kbuild-all, linux-kernel, Michael Ellerman
[-- Attachment #1: Type: text/plain, Size: 7583 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: b29482fde649c72441d5478a4ea2c52c56d97a5e
commit: 793b08e2efff3ec020c5c5861d00ed394fcdd488 powerpc/kexec: Move kexec files into a dedicated subdir.
date: 7 months ago
config: powerpc-randconfig-s032-20200611 (attached as .config)
compiler: powerpc-linux-gcc (GCC) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.1-250-g42323db3-dirty
git checkout 793b08e2efff3ec020c5c5861d00ed394fcdd488
# save the attached .config to linux build tree
make W=1 C=1 ARCH=powerpc CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
sparse warnings: (new ones prefixed by >>)
>> arch/powerpc/kexec/core.c:246:29: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long long static [addressable] [toplevel] [usertype] crashk_base @@ got restricted __be32 [usertype] @@
arch/powerpc/kexec/core.c:246:29: sparse: expected unsigned long long static [addressable] [toplevel] [usertype] crashk_base
arch/powerpc/kexec/core.c:246:29: sparse: got restricted __be32 [usertype]
>> arch/powerpc/kexec/core.c:248:29: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long long static [addressable] [toplevel] [usertype] crashk_size @@ got restricted __be32 [usertype] @@
arch/powerpc/kexec/core.c:248:29: sparse: expected unsigned long long static [addressable] [toplevel] [usertype] crashk_size
arch/powerpc/kexec/core.c:248:29: sparse: got restricted __be32 [usertype]
arch/powerpc/kexec/core.c:256:19: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long long static [addressable] [toplevel] mem_limit @@ got restricted __be32 [usertype] @@
arch/powerpc/kexec/core.c:256:19: sparse: expected unsigned long long static [addressable] [toplevel] mem_limit
arch/powerpc/kexec/core.c:256:19: sparse: got restricted __be32 [usertype]
>> arch/powerpc/kexec/core.c:272:20: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long long static [addressable] [toplevel] [usertype] kernel_end @@ got restricted __be32 [usertype] @@
arch/powerpc/kexec/core.c:272:20: sparse: expected unsigned long long static [addressable] [toplevel] [usertype] kernel_end
arch/powerpc/kexec/core.c:272:20: sparse: got restricted __be32 [usertype]
vim +246 arch/powerpc/kexec/core.c
ea961a828fe725 arch/powerpc/kernel/machine_kexec.c Anton Blanchard 2014-01-22 235
6f29c3298b1821 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-17 236 static void __init export_crashk_values(struct device_node *node)
6f29c3298b1821 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-17 237 {
6f29c3298b1821 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-17 238 /* There might be existing crash kernel properties, but we can't
6f29c3298b1821 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-17 239 * be sure what's in them, so remove them. */
925e2d1ded80fc arch/powerpc/kernel/machine_kexec.c Suraj Jitindar Singh 2016-04-28 240 of_remove_property(node, of_find_property(node,
925e2d1ded80fc arch/powerpc/kernel/machine_kexec.c Suraj Jitindar Singh 2016-04-28 241 "linux,crashkernel-base", NULL));
925e2d1ded80fc arch/powerpc/kernel/machine_kexec.c Suraj Jitindar Singh 2016-04-28 242 of_remove_property(node, of_find_property(node,
925e2d1ded80fc arch/powerpc/kernel/machine_kexec.c Suraj Jitindar Singh 2016-04-28 243 "linux,crashkernel-size", NULL));
6f29c3298b1821 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-17 244
6f29c3298b1821 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-17 245 if (crashk_res.start != 0) {
ea961a828fe725 arch/powerpc/kernel/machine_kexec.c Anton Blanchard 2014-01-22 @246 crashk_base = cpu_to_be_ulong(crashk_res.start),
79d1c712958f94 arch/powerpc/kernel/machine_kexec.c Nathan Fontenot 2012-10-02 247 of_add_property(node, &crashk_base_prop);
ea961a828fe725 arch/powerpc/kernel/machine_kexec.c Anton Blanchard 2014-01-22 @248 crashk_size = cpu_to_be_ulong(resource_size(&crashk_res));
79d1c712958f94 arch/powerpc/kernel/machine_kexec.c Nathan Fontenot 2012-10-02 249 of_add_property(node, &crashk_size_prop);
6f29c3298b1821 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-17 250 }
4bc77a5ed215b4 arch/powerpc/kernel/machine_kexec.c Suzuki Poulose 2012-08-21 251
4bc77a5ed215b4 arch/powerpc/kernel/machine_kexec.c Suzuki Poulose 2012-08-21 252 /*
4bc77a5ed215b4 arch/powerpc/kernel/machine_kexec.c Suzuki Poulose 2012-08-21 253 * memory_limit is required by the kexec-tools to limit the
4bc77a5ed215b4 arch/powerpc/kernel/machine_kexec.c Suzuki Poulose 2012-08-21 254 * crash regions to the actual memory used.
4bc77a5ed215b4 arch/powerpc/kernel/machine_kexec.c Suzuki Poulose 2012-08-21 255 */
ea961a828fe725 arch/powerpc/kernel/machine_kexec.c Anton Blanchard 2014-01-22 256 mem_limit = cpu_to_be_ulong(memory_limit);
79d1c712958f94 arch/powerpc/kernel/machine_kexec.c Nathan Fontenot 2012-10-02 257 of_update_property(node, &memory_limit_prop);
6f29c3298b1821 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-17 258 }
6f29c3298b1821 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-17 259
2e8e4f5b80e101 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-16 260 static int __init kexec_setup(void)
2e8e4f5b80e101 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-16 261 {
2e8e4f5b80e101 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-16 262 struct device_node *node;
2e8e4f5b80e101 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-16 263
2e8e4f5b80e101 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-16 264 node = of_find_node_by_path("/chosen");
2e8e4f5b80e101 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-16 265 if (!node)
2e8e4f5b80e101 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-16 266 return -ENOENT;
2e8e4f5b80e101 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-16 267
2e8e4f5b80e101 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-16 268 /* remove any stale properties so ours can be found */
925e2d1ded80fc arch/powerpc/kernel/machine_kexec.c Suraj Jitindar Singh 2016-04-28 269 of_remove_property(node, of_find_property(node, kernel_end_prop.name, NULL));
2e8e4f5b80e101 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-16 270
2e8e4f5b80e101 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-16 271 /* information needed by userspace when using default_machine_kexec */
ea961a828fe725 arch/powerpc/kernel/machine_kexec.c Anton Blanchard 2014-01-22 @272 kernel_end = cpu_to_be_ulong(__pa(_end));
:::::: The code at line 246 was first introduced by commit
:::::: ea961a828fe7250e954f086d74d9323c3d44c3e4 powerpc: Fix endian issues in kexec and crash dump code
:::::: TO: Anton Blanchard <anton@samba.org>
:::::: CC: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 27946 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: arch/powerpc/kexec/core.c:246:29: sparse: sparse: incorrect type in assignment (different base types)
2020-06-11 16:01 arch/powerpc/kexec/core.c:246:29: sparse: sparse: incorrect type in assignment (different base types) kernel test robot
@ 2020-06-12 5:15 ` Christophe Leroy
2020-06-12 6:47 ` Xia, Hui
0 siblings, 1 reply; 6+ messages in thread
From: Christophe Leroy @ 2020-06-12 5:15 UTC (permalink / raw)
To: kernel test robot, Christophe Leroy
Cc: kbuild-all, linux-kernel, Michael Ellerman
Le 11/06/2020 à 18:01, kernel test robot a écrit :
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head: b29482fde649c72441d5478a4ea2c52c56d97a5e
> commit: 793b08e2efff3ec020c5c5861d00ed394fcdd488 powerpc/kexec: Move kexec files into a dedicated subdir.
> date: 7 months ago
> config: powerpc-randconfig-s032-20200611 (attached as .config)
> compiler: powerpc-linux-gcc (GCC) 9.3.0
> reproduce:
> # apt-get install sparse
> # sparse version: v0.6.1-250-g42323db3-dirty
> git checkout 793b08e2efff3ec020c5c5861d00ed394fcdd488
> # save the attached .config to linux build tree
> make W=1 C=1 ARCH=powerpc CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
That's the second time the robot reports sparse errors on that commit,
but the only thing I did is move code, that commit didn't add any code,
so I don't know what I should do about it.
Christophe
>
>
> sparse warnings: (new ones prefixed by >>)
>
>>> arch/powerpc/kexec/core.c:246:29: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long long static [addressable] [toplevel] [usertype] crashk_base @@ got restricted __be32 [usertype] @@
> arch/powerpc/kexec/core.c:246:29: sparse: expected unsigned long long static [addressable] [toplevel] [usertype] crashk_base
> arch/powerpc/kexec/core.c:246:29: sparse: got restricted __be32 [usertype]
>>> arch/powerpc/kexec/core.c:248:29: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long long static [addressable] [toplevel] [usertype] crashk_size @@ got restricted __be32 [usertype] @@
> arch/powerpc/kexec/core.c:248:29: sparse: expected unsigned long long static [addressable] [toplevel] [usertype] crashk_size
> arch/powerpc/kexec/core.c:248:29: sparse: got restricted __be32 [usertype]
> arch/powerpc/kexec/core.c:256:19: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long long static [addressable] [toplevel] mem_limit @@ got restricted __be32 [usertype] @@
> arch/powerpc/kexec/core.c:256:19: sparse: expected unsigned long long static [addressable] [toplevel] mem_limit
> arch/powerpc/kexec/core.c:256:19: sparse: got restricted __be32 [usertype]
>>> arch/powerpc/kexec/core.c:272:20: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long long static [addressable] [toplevel] [usertype] kernel_end @@ got restricted __be32 [usertype] @@
> arch/powerpc/kexec/core.c:272:20: sparse: expected unsigned long long static [addressable] [toplevel] [usertype] kernel_end
> arch/powerpc/kexec/core.c:272:20: sparse: got restricted __be32 [usertype]
>
> vim +246 arch/powerpc/kexec/core.c
>
> ea961a828fe725 arch/powerpc/kernel/machine_kexec.c Anton Blanchard 2014-01-22 235
> 6f29c3298b1821 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-17 236 static void __init export_crashk_values(struct device_node *node)
> 6f29c3298b1821 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-17 237 {
> 6f29c3298b1821 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-17 238 /* There might be existing crash kernel properties, but we can't
> 6f29c3298b1821 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-17 239 * be sure what's in them, so remove them. */
> 925e2d1ded80fc arch/powerpc/kernel/machine_kexec.c Suraj Jitindar Singh 2016-04-28 240 of_remove_property(node, of_find_property(node,
> 925e2d1ded80fc arch/powerpc/kernel/machine_kexec.c Suraj Jitindar Singh 2016-04-28 241 "linux,crashkernel-base", NULL));
> 925e2d1ded80fc arch/powerpc/kernel/machine_kexec.c Suraj Jitindar Singh 2016-04-28 242 of_remove_property(node, of_find_property(node,
> 925e2d1ded80fc arch/powerpc/kernel/machine_kexec.c Suraj Jitindar Singh 2016-04-28 243 "linux,crashkernel-size", NULL));
> 6f29c3298b1821 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-17 244
> 6f29c3298b1821 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-17 245 if (crashk_res.start != 0) {
> ea961a828fe725 arch/powerpc/kernel/machine_kexec.c Anton Blanchard 2014-01-22 @246 crashk_base = cpu_to_be_ulong(crashk_res.start),
> 79d1c712958f94 arch/powerpc/kernel/machine_kexec.c Nathan Fontenot 2012-10-02 247 of_add_property(node, &crashk_base_prop);
> ea961a828fe725 arch/powerpc/kernel/machine_kexec.c Anton Blanchard 2014-01-22 @248 crashk_size = cpu_to_be_ulong(resource_size(&crashk_res));
> 79d1c712958f94 arch/powerpc/kernel/machine_kexec.c Nathan Fontenot 2012-10-02 249 of_add_property(node, &crashk_size_prop);
> 6f29c3298b1821 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-17 250 }
> 4bc77a5ed215b4 arch/powerpc/kernel/machine_kexec.c Suzuki Poulose 2012-08-21 251
> 4bc77a5ed215b4 arch/powerpc/kernel/machine_kexec.c Suzuki Poulose 2012-08-21 252 /*
> 4bc77a5ed215b4 arch/powerpc/kernel/machine_kexec.c Suzuki Poulose 2012-08-21 253 * memory_limit is required by the kexec-tools to limit the
> 4bc77a5ed215b4 arch/powerpc/kernel/machine_kexec.c Suzuki Poulose 2012-08-21 254 * crash regions to the actual memory used.
> 4bc77a5ed215b4 arch/powerpc/kernel/machine_kexec.c Suzuki Poulose 2012-08-21 255 */
> ea961a828fe725 arch/powerpc/kernel/machine_kexec.c Anton Blanchard 2014-01-22 256 mem_limit = cpu_to_be_ulong(memory_limit);
> 79d1c712958f94 arch/powerpc/kernel/machine_kexec.c Nathan Fontenot 2012-10-02 257 of_update_property(node, &memory_limit_prop);
> 6f29c3298b1821 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-17 258 }
> 6f29c3298b1821 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-17 259
> 2e8e4f5b80e101 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-16 260 static int __init kexec_setup(void)
> 2e8e4f5b80e101 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-16 261 {
> 2e8e4f5b80e101 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-16 262 struct device_node *node;
> 2e8e4f5b80e101 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-16 263
> 2e8e4f5b80e101 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-16 264 node = of_find_node_by_path("/chosen");
> 2e8e4f5b80e101 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-16 265 if (!node)
> 2e8e4f5b80e101 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-16 266 return -ENOENT;
> 2e8e4f5b80e101 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-16 267
> 2e8e4f5b80e101 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-16 268 /* remove any stale properties so ours can be found */
> 925e2d1ded80fc arch/powerpc/kernel/machine_kexec.c Suraj Jitindar Singh 2016-04-28 269 of_remove_property(node, of_find_property(node, kernel_end_prop.name, NULL));
> 2e8e4f5b80e101 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-16 270
> 2e8e4f5b80e101 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-16 271 /* information needed by userspace when using default_machine_kexec */
> ea961a828fe725 arch/powerpc/kernel/machine_kexec.c Anton Blanchard 2014-01-22 @272 kernel_end = cpu_to_be_ulong(__pa(_end));
>
> :::::: The code at line 246 was first introduced by commit
> :::::: ea961a828fe7250e954f086d74d9323c3d44c3e4 powerpc: Fix endian issues in kexec and crash dump code
>
> :::::: TO: Anton Blanchard <anton@samba.org>
> :::::: CC: Benjamin Herrenschmidt <benh@kernel.crashing.org>
>
> ---
> 0-DAY CI Kernel Test Service, Intel Corporation
> https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: arch/powerpc/kexec/core.c:246:29: sparse: sparse: incorrect type in assignment (different base types)
2020-06-12 5:15 ` Christophe Leroy
@ 2020-06-12 6:47 ` Xia, Hui
0 siblings, 0 replies; 6+ messages in thread
From: Xia, Hui @ 2020-06-12 6:47 UTC (permalink / raw)
To: Christophe Leroy, lkp, Christophe Leroy
Cc: kbuild-all, linux-kernel, Michael Ellerman
>-----Original Message-----
>From: Christophe Leroy <christophe.leroy@csgroup.eu>
>Sent: 2020年6月12日 13:15
>To: lkp <lkp@intel.com>; Christophe Leroy <christophe.leroy@c-s.fr>
>Cc: kbuild-all@lists.01.org; linux-kernel@vger.kernel.org; Michael Ellerman
><mpe@ellerman.id.au>
>Subject: Re: arch/powerpc/kexec/core.c:246:29: sparse: sparse: incorrect type in
>assignment (different base types)
>
>Le 11/06/2020 à 18:01, kernel test robot a écrit :
>> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
>> head: b29482fde649c72441d5478a4ea2c52c56d97a5e
>> commit: 793b08e2efff3ec020c5c5861d00ed394fcdd488 powerpc/kexec: Move
>kexec files into a dedicated subdir.
>> date: 7 months ago
>> config: powerpc-randconfig-s032-20200611 (attached as .config)
>> compiler: powerpc-linux-gcc (GCC) 9.3.0
>> reproduce:
>> # apt-get install sparse
>> # sparse version: v0.6.1-250-g42323db3-dirty
>> git checkout 793b08e2efff3ec020c5c5861d00ed394fcdd488
>> # save the attached .config to linux build tree
>> make W=1 C=1 ARCH=powerpc CF='-fdiagnostic-prefix -
>D__CHECK_ENDIAN__'
>>
>> If you fix the issue, kindly add following tag as appropriate
>> Reported-by: kernel test robot <lkp@intel.com>
>
>
>That's the second time the robot reports sparse errors on that commit, but the
>only thing I did is move code, that commit didn't add any code, so I don't know
>what I should do about it.
Hi Christophe,
Yes, these sparse warnings not introduced by this commit.
Please ignore them. Sorry for the noise.
These warnings were treated as new warning because the file name changed (arch/powerpc/kernel/machine_kexec.c --> arch/powerpc/kexec/core.c)
We will look for solution to resolve such kind of false positive. Thanks.
>
>Christophe
>
>
>>
>>
>> sparse warnings: (new ones prefixed by >>)
>>
>>>> arch/powerpc/kexec/core.c:246:29: sparse: sparse: incorrect type in
>assignment (different base types) @@ expected unsigned long long static
>[addressable] [toplevel] [usertype] crashk_base @@ got restricted __be32
>[usertype] @@
>> arch/powerpc/kexec/core.c:246:29: sparse: expected unsigned long long
>static [addressable] [toplevel] [usertype] crashk_base
>> arch/powerpc/kexec/core.c:246:29: sparse: got restricted __be32
>[usertype]
>>>> arch/powerpc/kexec/core.c:248:29: sparse: sparse: incorrect type in
>assignment (different base types) @@ expected unsigned long long static
>[addressable] [toplevel] [usertype] crashk_size @@ got restricted __be32
>[usertype] @@
>> arch/powerpc/kexec/core.c:248:29: sparse: expected unsigned long long
>static [addressable] [toplevel] [usertype] crashk_size
>> arch/powerpc/kexec/core.c:248:29: sparse: got restricted __be32
>[usertype]
>> arch/powerpc/kexec/core.c:256:19: sparse: sparse: incorrect type in
>assignment (different base types) @@ expected unsigned long long static
>[addressable] [toplevel] mem_limit @@ got restricted __be32 [usertype] @@
>> arch/powerpc/kexec/core.c:256:19: sparse: expected unsigned long long
>static [addressable] [toplevel] mem_limit
>> arch/powerpc/kexec/core.c:256:19: sparse: got restricted __be32
>[usertype]
>>>> arch/powerpc/kexec/core.c:272:20: sparse: sparse: incorrect type in
>assignment (different base types) @@ expected unsigned long long static
>[addressable] [toplevel] [usertype] kernel_end @@ got restricted __be32
>[usertype] @@
>> arch/powerpc/kexec/core.c:272:20: sparse: expected unsigned long long
>static [addressable] [toplevel] [usertype] kernel_end
>> arch/powerpc/kexec/core.c:272:20: sparse: got restricted __be32
>[usertype]
>>
>> vim +246 arch/powerpc/kexec/core.c
>>
>> ea961a828fe725 arch/powerpc/kernel/machine_kexec.c Anton Blanchard
>2014-01-22 235
>> 6f29c3298b1821 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth
>2008-12-17 236 static void __init export_crashk_values(struct device_node
>*node)
>> 6f29c3298b1821 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth
>2008-12-17 237 {
>> 6f29c3298b1821 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth
>2008-12-17 238 /* There might be existing crash kernel properties, but
>we can't
>> 6f29c3298b1821 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth
>2008-12-17 239 * be sure what's in them, so remove them. */
>> 925e2d1ded80fc arch/powerpc/kernel/machine_kexec.c Suraj Jitindar Singh
>2016-04-28 240 of_remove_property(node, of_find_property(node,
>> 925e2d1ded80fc arch/powerpc/kernel/machine_kexec.c Suraj Jitindar Singh
>2016-04-28 241 "linux,crashkernel-base", NULL));
>> 925e2d1ded80fc arch/powerpc/kernel/machine_kexec.c Suraj Jitindar Singh
>2016-04-28 242 of_remove_property(node, of_find_property(node,
>> 925e2d1ded80fc arch/powerpc/kernel/machine_kexec.c Suraj Jitindar Singh
>2016-04-28 243 "linux,crashkernel-size", NULL));
>> 6f29c3298b1821 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth
>2008-12-17 244
>> 6f29c3298b1821 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth
>2008-12-17 245 if (crashk_res.start != 0) {
>> ea961a828fe725 arch/powerpc/kernel/machine_kexec.c Anton Blanchard
>2014-01-22 @246 crashk_base =
>cpu_to_be_ulong(crashk_res.start),
>> 79d1c712958f94 arch/powerpc/kernel/machine_kexec.c Nathan Fontenot
>2012-10-02 247 of_add_property(node, &crashk_base_prop);
>> ea961a828fe725 arch/powerpc/kernel/machine_kexec.c Anton Blanchard
>2014-01-22 @248 crashk_size =
>cpu_to_be_ulong(resource_size(&crashk_res));
>> 79d1c712958f94 arch/powerpc/kernel/machine_kexec.c Nathan Fontenot
>2012-10-02 249 of_add_property(node, &crashk_size_prop);
>> 6f29c3298b1821 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth
>2008-12-17 250 }
>> 4bc77a5ed215b4 arch/powerpc/kernel/machine_kexec.c Suzuki Poulose
>2012-08-21 251
>> 4bc77a5ed215b4 arch/powerpc/kernel/machine_kexec.c Suzuki Poulose
>2012-08-21 252 /*
>> 4bc77a5ed215b4 arch/powerpc/kernel/machine_kexec.c Suzuki Poulose
>2012-08-21 253 * memory_limit is required by the kexec-tools to limit
>the
>> 4bc77a5ed215b4 arch/powerpc/kernel/machine_kexec.c Suzuki Poulose
>2012-08-21 254 * crash regions to the actual memory used.
>> 4bc77a5ed215b4 arch/powerpc/kernel/machine_kexec.c Suzuki Poulose
>2012-08-21 255 */
>> ea961a828fe725 arch/powerpc/kernel/machine_kexec.c Anton Blanchard
>2014-01-22 256 mem_limit = cpu_to_be_ulong(memory_limit);
>> 79d1c712958f94 arch/powerpc/kernel/machine_kexec.c Nathan Fontenot
>2012-10-02 257 of_update_property(node, &memory_limit_prop);
>> 6f29c3298b1821 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth
>2008-12-17 258 }
>> 6f29c3298b1821 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth
>2008-12-17 259
>> 2e8e4f5b80e101 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth
>2008-12-16 260 static int __init kexec_setup(void)
>> 2e8e4f5b80e101 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth
>2008-12-16 261 {
>> 2e8e4f5b80e101 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth
>2008-12-16 262 struct device_node *node;
>> 2e8e4f5b80e101 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth
>2008-12-16 263
>> 2e8e4f5b80e101 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth
>2008-12-16 264 node = of_find_node_by_path("/chosen");
>> 2e8e4f5b80e101 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth
>2008-12-16 265 if (!node)
>> 2e8e4f5b80e101 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth
>2008-12-16 266 return -ENOENT;
>> 2e8e4f5b80e101 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth
>2008-12-16 267
>> 2e8e4f5b80e101 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth
>2008-12-16 268 /* remove any stale properties so ours can be found */
>> 925e2d1ded80fc arch/powerpc/kernel/machine_kexec.c Suraj Jitindar Singh
>2016-04-28 269 of_remove_property(node, of_find_property(node,
>kernel_end_prop.name, NULL));
>> 2e8e4f5b80e101 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth
>2008-12-16 270
>> 2e8e4f5b80e101 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth
>2008-12-16 271 /* information needed by userspace when using
>default_machine_kexec */
>> ea961a828fe725 arch/powerpc/kernel/machine_kexec.c Anton Blanchard
>2014-01-22 @272 kernel_end = cpu_to_be_ulong(__pa(_end));
>>
>> :::::: The code at line 246 was first introduced by commit
>> :::::: ea961a828fe7250e954f086d74d9323c3d44c3e4 powerpc: Fix endian
>> issues in kexec and crash dump code
>>
>> :::::: TO: Anton Blanchard <anton@samba.org>
>> :::::: CC: Benjamin Herrenschmidt <benh@kernel.crashing.org>
>>
>> ---
>> 0-DAY CI Kernel Test Service, Intel Corporation
>> https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
>>
^ permalink raw reply [flat|nested] 6+ messages in thread
* arch/powerpc/kexec/core.c:246:29: sparse: sparse: incorrect type in assignment (different base types)
@ 2020-09-29 4:00 kernel test robot
0 siblings, 0 replies; 6+ messages in thread
From: kernel test robot @ 2020-09-29 4:00 UTC (permalink / raw)
To: Christophe Leroy; +Cc: kbuild-all, linux-kernel, Michael Ellerman
[-- Attachment #1: Type: text/plain, Size: 8083 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: fb0155a09b0224a7147cb07a4ce6034c8d29667f
commit: 793b08e2efff3ec020c5c5861d00ed394fcdd488 powerpc/kexec: Move kexec files into a dedicated subdir.
date: 10 months ago
config: powerpc-randconfig-s032-20200929 (attached as .config)
compiler: powerpc-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.2-201-g24bdaac6-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=793b08e2efff3ec020c5c5861d00ed394fcdd488
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 793b08e2efff3ec020c5c5861d00ed394fcdd488
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=powerpc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
sparse warnings: (new ones prefixed by >>)
>> arch/powerpc/kexec/core.c:246:29: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long long static [addressable] [toplevel] [usertype] crashk_base @@ got restricted __be32 [usertype] @@
arch/powerpc/kexec/core.c:246:29: sparse: expected unsigned long long static [addressable] [toplevel] [usertype] crashk_base
arch/powerpc/kexec/core.c:246:29: sparse: got restricted __be32 [usertype]
>> arch/powerpc/kexec/core.c:248:29: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long long static [addressable] [toplevel] [usertype] crashk_size @@ got restricted __be32 [usertype] @@
arch/powerpc/kexec/core.c:248:29: sparse: expected unsigned long long static [addressable] [toplevel] [usertype] crashk_size
arch/powerpc/kexec/core.c:248:29: sparse: got restricted __be32 [usertype]
arch/powerpc/kexec/core.c:256:19: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long long static [addressable] [toplevel] mem_limit @@ got restricted __be32 [usertype] @@
arch/powerpc/kexec/core.c:256:19: sparse: expected unsigned long long static [addressable] [toplevel] mem_limit
arch/powerpc/kexec/core.c:256:19: sparse: got restricted __be32 [usertype]
>> arch/powerpc/kexec/core.c:272:20: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long long static [addressable] [toplevel] [usertype] kernel_end @@ got restricted __be32 [usertype] @@
arch/powerpc/kexec/core.c:272:20: sparse: expected unsigned long long static [addressable] [toplevel] [usertype] kernel_end
arch/powerpc/kexec/core.c:272:20: sparse: got restricted __be32 [usertype]
vim +246 arch/powerpc/kexec/core.c
ea961a828fe7250 arch/powerpc/kernel/machine_kexec.c Anton Blanchard 2014-01-22 235
6f29c3298b18216 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-17 236 static void __init export_crashk_values(struct device_node *node)
6f29c3298b18216 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-17 237 {
6f29c3298b18216 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-17 238 /* There might be existing crash kernel properties, but we can't
6f29c3298b18216 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-17 239 * be sure what's in them, so remove them. */
925e2d1ded80fcc arch/powerpc/kernel/machine_kexec.c Suraj Jitindar Singh 2016-04-28 240 of_remove_property(node, of_find_property(node,
925e2d1ded80fcc arch/powerpc/kernel/machine_kexec.c Suraj Jitindar Singh 2016-04-28 241 "linux,crashkernel-base", NULL));
925e2d1ded80fcc arch/powerpc/kernel/machine_kexec.c Suraj Jitindar Singh 2016-04-28 242 of_remove_property(node, of_find_property(node,
925e2d1ded80fcc arch/powerpc/kernel/machine_kexec.c Suraj Jitindar Singh 2016-04-28 243 "linux,crashkernel-size", NULL));
6f29c3298b18216 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-17 244
6f29c3298b18216 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-17 245 if (crashk_res.start != 0) {
ea961a828fe7250 arch/powerpc/kernel/machine_kexec.c Anton Blanchard 2014-01-22 @246 crashk_base = cpu_to_be_ulong(crashk_res.start),
79d1c712958f943 arch/powerpc/kernel/machine_kexec.c Nathan Fontenot 2012-10-02 247 of_add_property(node, &crashk_base_prop);
ea961a828fe7250 arch/powerpc/kernel/machine_kexec.c Anton Blanchard 2014-01-22 @248 crashk_size = cpu_to_be_ulong(resource_size(&crashk_res));
79d1c712958f943 arch/powerpc/kernel/machine_kexec.c Nathan Fontenot 2012-10-02 249 of_add_property(node, &crashk_size_prop);
6f29c3298b18216 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-17 250 }
4bc77a5ed215b4e arch/powerpc/kernel/machine_kexec.c Suzuki Poulose 2012-08-21 251
4bc77a5ed215b4e arch/powerpc/kernel/machine_kexec.c Suzuki Poulose 2012-08-21 252 /*
4bc77a5ed215b4e arch/powerpc/kernel/machine_kexec.c Suzuki Poulose 2012-08-21 253 * memory_limit is required by the kexec-tools to limit the
4bc77a5ed215b4e arch/powerpc/kernel/machine_kexec.c Suzuki Poulose 2012-08-21 254 * crash regions to the actual memory used.
4bc77a5ed215b4e arch/powerpc/kernel/machine_kexec.c Suzuki Poulose 2012-08-21 255 */
ea961a828fe7250 arch/powerpc/kernel/machine_kexec.c Anton Blanchard 2014-01-22 256 mem_limit = cpu_to_be_ulong(memory_limit);
79d1c712958f943 arch/powerpc/kernel/machine_kexec.c Nathan Fontenot 2012-10-02 257 of_update_property(node, &memory_limit_prop);
6f29c3298b18216 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-17 258 }
6f29c3298b18216 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-17 259
2e8e4f5b80e101d arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-16 260 static int __init kexec_setup(void)
2e8e4f5b80e101d arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-16 261 {
2e8e4f5b80e101d arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-16 262 struct device_node *node;
2e8e4f5b80e101d arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-16 263
2e8e4f5b80e101d arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-16 264 node = of_find_node_by_path("/chosen");
2e8e4f5b80e101d arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-16 265 if (!node)
2e8e4f5b80e101d arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-16 266 return -ENOENT;
2e8e4f5b80e101d arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-16 267
2e8e4f5b80e101d arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-16 268 /* remove any stale properties so ours can be found */
925e2d1ded80fcc arch/powerpc/kernel/machine_kexec.c Suraj Jitindar Singh 2016-04-28 269 of_remove_property(node, of_find_property(node, kernel_end_prop.name, NULL));
2e8e4f5b80e101d arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-16 270
2e8e4f5b80e101d arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-16 271 /* information needed by userspace when using default_machine_kexec */
ea961a828fe7250 arch/powerpc/kernel/machine_kexec.c Anton Blanchard 2014-01-22 @272 kernel_end = cpu_to_be_ulong(__pa(_end));
:::::: The code at line 246 was first introduced by commit
:::::: ea961a828fe7250e954f086d74d9323c3d44c3e4 powerpc: Fix endian issues in kexec and crash dump code
:::::: TO: Anton Blanchard <anton@samba.org>
:::::: CC: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 29806 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* arch/powerpc/kexec/core.c:246:29: sparse: sparse: incorrect type in assignment (different base types)
@ 2020-09-05 22:37 kernel test robot
0 siblings, 0 replies; 6+ messages in thread
From: kernel test robot @ 2020-09-05 22:37 UTC (permalink / raw)
To: Christophe Leroy; +Cc: kbuild-all, linux-kernel, Michael Ellerman
[-- Attachment #1: Type: text/plain, Size: 8075 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 9322c47b21b9e05d7f9c037aa2c472e9f0dc7f3b
commit: 793b08e2efff3ec020c5c5861d00ed394fcdd488 powerpc/kexec: Move kexec files into a dedicated subdir.
date: 10 months ago
config: powerpc-randconfig-s032-20200906 (attached as .config)
compiler: powerpc-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.2-191-g10164920-dirty
git checkout 793b08e2efff3ec020c5c5861d00ed394fcdd488
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=powerpc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
sparse warnings: (new ones prefixed by >>)
>> arch/powerpc/kexec/core.c:246:29: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long long static [addressable] [toplevel] [usertype] crashk_base @@ got restricted __be32 [usertype] @@
arch/powerpc/kexec/core.c:246:29: sparse: expected unsigned long long static [addressable] [toplevel] [usertype] crashk_base
>> arch/powerpc/kexec/core.c:246:29: sparse: got restricted __be32 [usertype]
>> arch/powerpc/kexec/core.c:248:29: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long long static [addressable] [toplevel] [usertype] crashk_size @@ got restricted __be32 [usertype] @@
arch/powerpc/kexec/core.c:248:29: sparse: expected unsigned long long static [addressable] [toplevel] [usertype] crashk_size
arch/powerpc/kexec/core.c:248:29: sparse: got restricted __be32 [usertype]
>> arch/powerpc/kexec/core.c:256:19: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long long static [addressable] [toplevel] mem_limit @@ got restricted __be32 [usertype] @@
arch/powerpc/kexec/core.c:256:19: sparse: expected unsigned long long static [addressable] [toplevel] mem_limit
arch/powerpc/kexec/core.c:256:19: sparse: got restricted __be32 [usertype]
>> arch/powerpc/kexec/core.c:272:20: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long long static [addressable] [toplevel] [usertype] kernel_end @@ got restricted __be32 [usertype] @@
arch/powerpc/kexec/core.c:272:20: sparse: expected unsigned long long static [addressable] [toplevel] [usertype] kernel_end
arch/powerpc/kexec/core.c:272:20: sparse: got restricted __be32 [usertype]
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=793b08e2efff3ec020c5c5861d00ed394fcdd488
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 793b08e2efff3ec020c5c5861d00ed394fcdd488
vim +246 arch/powerpc/kexec/core.c
ea961a828fe725 arch/powerpc/kernel/machine_kexec.c Anton Blanchard 2014-01-22 235
6f29c3298b1821 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-17 236 static void __init export_crashk_values(struct device_node *node)
6f29c3298b1821 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-17 237 {
6f29c3298b1821 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-17 238 /* There might be existing crash kernel properties, but we can't
6f29c3298b1821 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-17 239 * be sure what's in them, so remove them. */
925e2d1ded80fc arch/powerpc/kernel/machine_kexec.c Suraj Jitindar Singh 2016-04-28 240 of_remove_property(node, of_find_property(node,
925e2d1ded80fc arch/powerpc/kernel/machine_kexec.c Suraj Jitindar Singh 2016-04-28 241 "linux,crashkernel-base", NULL));
925e2d1ded80fc arch/powerpc/kernel/machine_kexec.c Suraj Jitindar Singh 2016-04-28 242 of_remove_property(node, of_find_property(node,
925e2d1ded80fc arch/powerpc/kernel/machine_kexec.c Suraj Jitindar Singh 2016-04-28 243 "linux,crashkernel-size", NULL));
6f29c3298b1821 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-17 244
6f29c3298b1821 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-17 245 if (crashk_res.start != 0) {
ea961a828fe725 arch/powerpc/kernel/machine_kexec.c Anton Blanchard 2014-01-22 @246 crashk_base = cpu_to_be_ulong(crashk_res.start),
79d1c712958f94 arch/powerpc/kernel/machine_kexec.c Nathan Fontenot 2012-10-02 247 of_add_property(node, &crashk_base_prop);
ea961a828fe725 arch/powerpc/kernel/machine_kexec.c Anton Blanchard 2014-01-22 @248 crashk_size = cpu_to_be_ulong(resource_size(&crashk_res));
79d1c712958f94 arch/powerpc/kernel/machine_kexec.c Nathan Fontenot 2012-10-02 249 of_add_property(node, &crashk_size_prop);
6f29c3298b1821 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-17 250 }
4bc77a5ed215b4 arch/powerpc/kernel/machine_kexec.c Suzuki Poulose 2012-08-21 251
4bc77a5ed215b4 arch/powerpc/kernel/machine_kexec.c Suzuki Poulose 2012-08-21 252 /*
4bc77a5ed215b4 arch/powerpc/kernel/machine_kexec.c Suzuki Poulose 2012-08-21 253 * memory_limit is required by the kexec-tools to limit the
4bc77a5ed215b4 arch/powerpc/kernel/machine_kexec.c Suzuki Poulose 2012-08-21 254 * crash regions to the actual memory used.
4bc77a5ed215b4 arch/powerpc/kernel/machine_kexec.c Suzuki Poulose 2012-08-21 255 */
ea961a828fe725 arch/powerpc/kernel/machine_kexec.c Anton Blanchard 2014-01-22 @256 mem_limit = cpu_to_be_ulong(memory_limit);
79d1c712958f94 arch/powerpc/kernel/machine_kexec.c Nathan Fontenot 2012-10-02 257 of_update_property(node, &memory_limit_prop);
6f29c3298b1821 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-17 258 }
6f29c3298b1821 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-17 259
2e8e4f5b80e101 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-16 260 static int __init kexec_setup(void)
2e8e4f5b80e101 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-16 261 {
2e8e4f5b80e101 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-16 262 struct device_node *node;
2e8e4f5b80e101 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-16 263
2e8e4f5b80e101 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-16 264 node = of_find_node_by_path("/chosen");
2e8e4f5b80e101 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-16 265 if (!node)
2e8e4f5b80e101 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-16 266 return -ENOENT;
2e8e4f5b80e101 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-16 267
2e8e4f5b80e101 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-16 268 /* remove any stale properties so ours can be found */
925e2d1ded80fc arch/powerpc/kernel/machine_kexec.c Suraj Jitindar Singh 2016-04-28 269 of_remove_property(node, of_find_property(node, kernel_end_prop.name, NULL));
2e8e4f5b80e101 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-16 270
2e8e4f5b80e101 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-16 271 /* information needed by userspace when using default_machine_kexec */
ea961a828fe725 arch/powerpc/kernel/machine_kexec.c Anton Blanchard 2014-01-22 @272 kernel_end = cpu_to_be_ulong(__pa(_end));
:::::: The code at line 246 was first introduced by commit
:::::: ea961a828fe7250e954f086d74d9323c3d44c3e4 powerpc: Fix endian issues in kexec and crash dump code
:::::: TO: Anton Blanchard <anton@samba.org>
:::::: CC: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 31652 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* arch/powerpc/kexec/core.c:246:29: sparse: sparse: incorrect type in assignment (different base types)
@ 2020-08-23 22:12 kernel test robot
0 siblings, 0 replies; 6+ messages in thread
From: kernel test robot @ 2020-08-23 22:12 UTC (permalink / raw)
To: Christophe Leroy; +Cc: kbuild-all, linux-kernel, Michael Ellerman
[-- Attachment #1: Type: text/plain, Size: 8078 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: d012a7190fc1fd72ed48911e77ca97ba4521bccd
commit: 793b08e2efff3ec020c5c5861d00ed394fcdd488 powerpc/kexec: Move kexec files into a dedicated subdir.
date: 9 months ago
config: powerpc64-randconfig-s032-20200824 (attached as .config)
compiler: powerpc-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.2-191-g10164920-dirty
git checkout 793b08e2efff3ec020c5c5861d00ed394fcdd488
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=powerpc64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
sparse warnings: (new ones prefixed by >>)
>> arch/powerpc/kexec/core.c:246:29: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long long static [addressable] [toplevel] [usertype] crashk_base @@ got restricted __be32 [usertype] @@
arch/powerpc/kexec/core.c:246:29: sparse: expected unsigned long long static [addressable] [toplevel] [usertype] crashk_base
arch/powerpc/kexec/core.c:246:29: sparse: got restricted __be32 [usertype]
>> arch/powerpc/kexec/core.c:248:29: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long long static [addressable] [toplevel] [usertype] crashk_size @@ got restricted __be32 [usertype] @@
arch/powerpc/kexec/core.c:248:29: sparse: expected unsigned long long static [addressable] [toplevel] [usertype] crashk_size
arch/powerpc/kexec/core.c:248:29: sparse: got restricted __be32 [usertype]
arch/powerpc/kexec/core.c:256:19: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long long static [addressable] [toplevel] mem_limit @@ got restricted __be32 [usertype] @@
arch/powerpc/kexec/core.c:256:19: sparse: expected unsigned long long static [addressable] [toplevel] mem_limit
arch/powerpc/kexec/core.c:256:19: sparse: got restricted __be32 [usertype]
>> arch/powerpc/kexec/core.c:272:20: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long long static [addressable] [toplevel] [usertype] kernel_end @@ got restricted __be32 [usertype] @@
arch/powerpc/kexec/core.c:272:20: sparse: expected unsigned long long static [addressable] [toplevel] [usertype] kernel_end
arch/powerpc/kexec/core.c:272:20: sparse: got restricted __be32 [usertype]
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=793b08e2efff3ec020c5c5861d00ed394fcdd488
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 793b08e2efff3ec020c5c5861d00ed394fcdd488
vim +246 arch/powerpc/kexec/core.c
ea961a828fe725 arch/powerpc/kernel/machine_kexec.c Anton Blanchard 2014-01-22 235
6f29c3298b1821 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-17 236 static void __init export_crashk_values(struct device_node *node)
6f29c3298b1821 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-17 237 {
6f29c3298b1821 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-17 238 /* There might be existing crash kernel properties, but we can't
6f29c3298b1821 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-17 239 * be sure what's in them, so remove them. */
925e2d1ded80fc arch/powerpc/kernel/machine_kexec.c Suraj Jitindar Singh 2016-04-28 240 of_remove_property(node, of_find_property(node,
925e2d1ded80fc arch/powerpc/kernel/machine_kexec.c Suraj Jitindar Singh 2016-04-28 241 "linux,crashkernel-base", NULL));
925e2d1ded80fc arch/powerpc/kernel/machine_kexec.c Suraj Jitindar Singh 2016-04-28 242 of_remove_property(node, of_find_property(node,
925e2d1ded80fc arch/powerpc/kernel/machine_kexec.c Suraj Jitindar Singh 2016-04-28 243 "linux,crashkernel-size", NULL));
6f29c3298b1821 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-17 244
6f29c3298b1821 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-17 245 if (crashk_res.start != 0) {
ea961a828fe725 arch/powerpc/kernel/machine_kexec.c Anton Blanchard 2014-01-22 @246 crashk_base = cpu_to_be_ulong(crashk_res.start),
79d1c712958f94 arch/powerpc/kernel/machine_kexec.c Nathan Fontenot 2012-10-02 247 of_add_property(node, &crashk_base_prop);
ea961a828fe725 arch/powerpc/kernel/machine_kexec.c Anton Blanchard 2014-01-22 @248 crashk_size = cpu_to_be_ulong(resource_size(&crashk_res));
79d1c712958f94 arch/powerpc/kernel/machine_kexec.c Nathan Fontenot 2012-10-02 249 of_add_property(node, &crashk_size_prop);
6f29c3298b1821 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-17 250 }
4bc77a5ed215b4 arch/powerpc/kernel/machine_kexec.c Suzuki Poulose 2012-08-21 251
4bc77a5ed215b4 arch/powerpc/kernel/machine_kexec.c Suzuki Poulose 2012-08-21 252 /*
4bc77a5ed215b4 arch/powerpc/kernel/machine_kexec.c Suzuki Poulose 2012-08-21 253 * memory_limit is required by the kexec-tools to limit the
4bc77a5ed215b4 arch/powerpc/kernel/machine_kexec.c Suzuki Poulose 2012-08-21 254 * crash regions to the actual memory used.
4bc77a5ed215b4 arch/powerpc/kernel/machine_kexec.c Suzuki Poulose 2012-08-21 255 */
ea961a828fe725 arch/powerpc/kernel/machine_kexec.c Anton Blanchard 2014-01-22 256 mem_limit = cpu_to_be_ulong(memory_limit);
79d1c712958f94 arch/powerpc/kernel/machine_kexec.c Nathan Fontenot 2012-10-02 257 of_update_property(node, &memory_limit_prop);
6f29c3298b1821 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-17 258 }
6f29c3298b1821 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-17 259
2e8e4f5b80e101 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-16 260 static int __init kexec_setup(void)
2e8e4f5b80e101 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-16 261 {
2e8e4f5b80e101 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-16 262 struct device_node *node;
2e8e4f5b80e101 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-16 263
2e8e4f5b80e101 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-16 264 node = of_find_node_by_path("/chosen");
2e8e4f5b80e101 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-16 265 if (!node)
2e8e4f5b80e101 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-16 266 return -ENOENT;
2e8e4f5b80e101 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-16 267
2e8e4f5b80e101 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-16 268 /* remove any stale properties so ours can be found */
925e2d1ded80fc arch/powerpc/kernel/machine_kexec.c Suraj Jitindar Singh 2016-04-28 269 of_remove_property(node, of_find_property(node, kernel_end_prop.name, NULL));
2e8e4f5b80e101 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-16 270
2e8e4f5b80e101 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-16 271 /* information needed by userspace when using default_machine_kexec */
ea961a828fe725 arch/powerpc/kernel/machine_kexec.c Anton Blanchard 2014-01-22 @272 kernel_end = cpu_to_be_ulong(__pa(_end));
:::::: The code at line 246 was first introduced by commit
:::::: ea961a828fe7250e954f086d74d9323c3d44c3e4 powerpc: Fix endian issues in kexec and crash dump code
:::::: TO: Anton Blanchard <anton@samba.org>
:::::: CC: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 35014 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-09-29 4:01 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-11 16:01 arch/powerpc/kexec/core.c:246:29: sparse: sparse: incorrect type in assignment (different base types) kernel test robot
2020-06-12 5:15 ` Christophe Leroy
2020-06-12 6:47 ` Xia, Hui
2020-08-23 22:12 kernel test robot
2020-09-05 22:37 kernel test robot
2020-09-29 4:00 kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).