Skip to content

Fix sparse errors #37

Open
Open

Description

@mpe

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

Activity

  1. ajdlinux commented on May 18, 2016

    @ajdlinux
    Member

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

  2. daxtens commented on May 18, 2016

    @daxtens
    Member

    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

  3. ajdlinux commented on May 18, 2016

    @ajdlinux
    Member

    Ping @csmart

  4. 40 remaining items

  5. leitao commented on Sep 25, 2018

    @leitao
    Member

    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.

  6. chleroy commented on Sep 25, 2018

    @chleroy

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

  7. leitao commented on Sep 25, 2018

    @leitao
    Member

    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.

  8. leitao commented on Oct 21, 2018

    @leitao
    Member

    I also spent some time on this issue this weekend.

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

  9. transferred this issue fromlinuxppc/linuxon Jan 7, 2019
  10. chleroy commented on Mar 9, 2019

    @chleroy

    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

  11. mpe commented on Mar 13, 2019

    @mpe
    MemberAuthor

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

  12. moved this to 🆕 New in linuxppc backlogon Aug 16, 2022
  13. moved this from 🆕 New to 📋 Backlog in linuxppc backlogon Aug 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    easyShould be easy

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    ⌂ Proxy