Re: [PATCH 1/6] staging: sm750fb: Use memset_io instead of memset

From
Dan Carpenter <hidden>
Date
2015-03-11 09:23:52
Also in
lkml
Reply to
Lorenzo Stoakes, 2015-03-11
On Wed, Mar 11, 2015 at 09:11:52AM +0000, Lorenzo Stoakes wrote:
On 11 March 2015 at 08:54, Dan Carpenter [off-list ref] wrote:
quoted
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.
quoted
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
Thread (18 messages) 18 messages, 3 authors, last reply 2015-03-11
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help