Messages in this thread | | | Date | Thu, 13 Aug 2020 14:02:49 +0200 | From | Luc Van Oostenryck <> | Subject | Re: [PATCH v5 06/17] sched/debug: Output SD flag names rather than their values |
| |
On Wed, Aug 12, 2020 at 07:51:08PM +0100, Valentin Schneider wrote: > On 12/08/20 17:35, kernel test robot wrote: > > > config: i386-randconfig-s001-20200811 (attached as .config) > > reproduce: > > # sparse version: v0.6.2-168-g9554805c-dirty > > make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386 > > > >>> kernel/sched/debug.c:279:17: sparse: sparse: non size-preserving pointer to integer cast > >>> kernel/sched/debug.c:279:17: sparse: sparse: non size-preserving integer to pointer cast > > > > > 279 tmp += *ppos; > > I pretty much copied kernel/sysctl.c::_proc_do_string() and I think that's > exactly the same types here: char* buffer incremented by loff_t offset. It > does look fine to me, but I can't really parse that warning.
The warnings mean that there is a cast from a pointer to an integer with a size other than the size of a pointer and the other way around.
I's indeed the case here, on i386, where pointers are 32-bit and loff_t is 64-bit. But yes, I agree: 1) these messages are far from clear 2) these casts are internal and are probably not appropriate here.
I'll look later what can be done at sparse level.
Regards, -- Luc
| |