lkml.org 
[lkml]   [2015]   [Mar]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 1/6] staging: sm750fb: Use memset_io instead of memset
    On Wed, Mar 11, 2015 at 09:11:52AM +0000, Lorenzo Stoakes wrote:
    > On 11 March 2015 at 08:54, Dan Carpenter <dan.carpenter@oracle.com> wrote:
    > > When I see a patch like this, then I worry, "What if the Sparse
    > > annotations are wrong? The patch description doesn't say anything about
    > > that." After review then I think the annotations are correct so that's
    > > fine.
    >
    > How do you mean? I was careful to check what sparse was referring to,
    > then investigate how memset should be used with pointers with a
    > __iomem qualifier. I'd like to be able to improve my patch
    > descriptions going forward as best I can :)
    >

    Yes. The patch is correct. I wasn't asking you to redo it. From later
    patches it's actually clear that you know that this change is a bugfix
    and a behavior change. But we get a lot of patches where people just
    randomly change things to please Sparse and it maybe silences a warning
    but it's not correct. I can think of a few recentish examples where
    people used standard struct types which hold __iomem or __user pointers
    but they used them in non-standard ways so the pointers were actually
    normal kernel pointers.

    I guess the rule here is that the patch should explain the effect of the
    bugfix for the user. Often you won't know the effect, but it's a
    helpful thing to think about.

    > > Btw, do you have this hardware? Are you able to test these changes?
    >
    > Unfortunately not, I am trying to keep these changes as simple code
    > fixes that ought not to affect actual hardware behaviour as I can
    > (though of course you can never be entirely sure that's the case!)

    That's fine. I was just wondering. It affects how paranoid I am when I
    review the code.

    regards,
    dan carpenter



    \
     
     \ /
      Last update: 2015-03-11 10:41    [W:2.421 / U:0.088 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site