Re: [PATCH][next] perf/x86/rapl: replace 0 with NULL to initialize pointers

From: Dan Carpenter
Date: Wed Jan 26 2022 - 06:34:50 EST


On Tue, Jan 25, 2022 at 10:32:31PM +0100, Peter Zijlstra wrote:
> On Tue, Jan 25, 2022 at 08:14:03PM +0000, Colin Ian King wrote:
> > Pointers should be initialized with NULL rather than zero. Fix these.
>
> Why ? This isn't C++, heck, this isn't even C, this is the kernel, we
> hard rely on NULL being 0.

It's a Sparse warning.

https://www.spinics.net/lists/linux-sparse/msg10066.html

regards,
dan carpenter