linuxppc / issues

Issues repository for linuxppc
5 stars 0 forks source link

Fix sparse errors #37

Open mpe opened 8 years ago

mpe commented 8 years ago

Running sparse reports ~1000 errors related to powerpc. They are not all correct, but many are and should be fixed.

An up-to-date report (built from Linus' tree) is available here:

https://openpower.xyz/job/linux-build-master/lastSuccessfulBuild/artifact/linux/sparse.log.gz

ajdlinux commented 8 years ago

We should probably try to get @daxtens's IBM-internal-Jenkins sparse and cppcheck dashboard on to openpower.xyz at some point.

daxtens commented 8 years ago

It's really really simple - the script is in the job, not an external repo. Whoever owns openpower.xyz is welcome to copy it and I'd be happy to help.

On Wed, May 18, 2016 at 10:15 AM, Andrew Donnellan <notifications@github.com

wrote:

We should probably try to get @daxtens https://github.com/daxtens's IBM-internal-Jenkins sparse and cppcheck dashboard on to openpower.xyz at some point.

— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub https://github.com/linuxppc/linux/issues/37#issuecomment-219891441

ajdlinux commented 8 years ago

Ping @csmart

leitao commented 5 years ago

I would like to start looking at those, since I am also playing with smatch.

Regarding sparse, there are several warnings and 3 error. I will start to analyze the errors first and then the warnings.

These are the current errors (4.19-rc5):


arch/powerpc/kernel/prom_init.c:1138:36: error: cannot size expression

different type (originally declared at arch/powerpc/platforms/powernv/powernv.h:11) - different modifiers
/usr/lib/gcc/powerpc64le-linux-gnu/7/include/altivec.h:34:2: error: Use the "-maltivec" flag to enable PowerPC AltiVec support

The first error should be really easy to get fixed. I'll go ahead and send a patch.

chleroy commented 5 years ago

Have you noted that Mathieu @malaterre has also some patches to fix some of the sparse feedback, see above.

leitao commented 5 years ago

hi @chleroy,

Yes, and I also saw they were not fully integrated into 4.19 yet, but, most of them are s/0/NULL, which are sparse warnings. I am starting with sparse errors which seem that they were not fixed by @malaterre.

leitao commented 5 years ago

I also spent some time on this issue this weekend.

https://github.com/leitao/linux/tree/sparse

chleroy commented 5 years ago

Note that with sparse 0.5.2, each use of min() or max() generates the following warning:

warning: expression using sizeof(void)

This is fixed in sparse 0.6.0

mpe commented 5 years ago

cc @ajdlinux might be worth updating the version we use with snowpatch ^