This patch uses memset_io instead of memset when using memset on __iomem
qualified pointers. This fixes the following sparse warnings:-
drivers/staging/sm750fb/sm750.c:489:17: warning: incorrect type in argument 1 (different address spaces)
drivers/staging/sm750fb/sm750.c:490:17: warning: incorrect type in argument 1 (different address spaces)
drivers/staging/sm750fb/sm750.c:501:17: warning: incorrect type in argument 1 (different address spaces)
drivers/staging/sm750fb/sm750.c:502:17: warning: incorrect type in argument 1 (different address spaces)
drivers/staging/sm750fb/sm750.c:833:5: warning: incorrect type in argument 1 (different address spaces)
drivers/staging/sm750fb/sm750.c:1154:9: warning: incorrect type in argument 1 (different address spaces)
Signed-off-by: Lorenzo Stoakes <redacted>
---
drivers/staging/sm750fb/sm750.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
@@ -486,8 +486,8 @@ static int lynxfb_resume(struct pci_dev* pdev)par=info->par;crtc=&par->crtc;cursor=&crtc->cursor;-memset(cursor->vstart,0x0,cursor->size);-memset(crtc->vScreen,0x0,crtc->vidmem_size);+memset_io(cursor->vstart,0x0,cursor->size);+memset_io(crtc->vScreen,0x0,crtc->vidmem_size);
ERROR is reported by scripts/checkpatch.pl (spaces are missing after
','). This coding style problem was there before your patch but I don't
think it makes sense to preserve it.
WARNING: please, no spaces at the start of a line
#137: FILE: drivers/staging/sm750fb/sm750.c:833:
+ memset_io(crtc->cursor.vstart, 0, crtc->cursor.size);$
From: Lorenzo Stoakes <hidden> Date: 2015-03-18 11:12:43
On 18 March 2015 at 10:50, Vitaly Kuznetsov [off-list ref] wrote:
ERROR is reported by scripts/checkpatch.pl (spaces are missing after
','). This coding style problem was there before your patch but I don't
think it makes sense to preserve it.
[snip]
WARNING: please, no spaces at the start of a line
#137: FILE: drivers/staging/sm750fb/sm750.c:833:
[snip]
Hi Vitaly, these style issues have vexed me and I was not sure whether
to make changes or preserve all the obvious errors so as not to blend
the two changes inappropriately, however it does indeed make sense to
fix these on the lines I'm changing, will fix these!
Best,
--
Lorenzo Stoakes
https:/ljs.io
From: Dan Carpenter <hidden> Date: 2015-03-18 11:25:23
On Wed, Mar 18, 2015 at 11:12:20AM +0000, Lorenzo Stoakes wrote:
On 18 March 2015 at 10:50, Vitaly Kuznetsov [off-list ref] wrote:
quoted
ERROR is reported by scripts/checkpatch.pl (spaces are missing after
','). This coding style problem was there before your patch but I don't
think it makes sense to preserve it.
[snip]
quoted
WARNING: please, no spaces at the start of a line
#137: FILE: drivers/staging/sm750fb/sm750.c:833:
[snip]
Hi Vitaly, these style issues have vexed me and I was not sure whether
to make changes or preserve all the obvious errors so as not to blend
the two changes inappropriately, however it does indeed make sense to
fix these on the lines I'm changing, will fix these!
If it's a white space thing on the same line then it's generally ok to
fix it. The "one thing per patch" is meant to make patches easier to
review. If it's a trivial thing and it doesn't make it harder to review
then we are reasonable people.
Could you read your patches again and find other similar white space
issues.
+ void __iomem * pbuffer,*pstart;
Should be:
+ void __iomem *pbuffer, *pstart;
regards,
dan carpenter
On Wed, Mar 18, 2015 at 02:25:09PM +0300, Dan Carpenter wrote:
On Wed, Mar 18, 2015 at 11:12:20AM +0000, Lorenzo Stoakes wrote:
quoted
On 18 March 2015 at 10:50, Vitaly Kuznetsov [off-list ref] wrote:
If it's a white space thing on the same line then it's generally ok to
fix it. The "one thing per patch" is meant to make patches easier to
review. If it's a trivial thing and it doesn't make it harder to review
then we are reasonable people.
but Greg K-H has explisitely mentiond not to do so.
I did just that and fixed few whitespace things in the patch to fix the
build failure.
https://lkml.org/lkml/2015/3/10/685
regards
sudip
From: Dan Carpenter <hidden> Date: 2015-03-18 13:24:04
On Wed, Mar 18, 2015 at 06:36:07PM +0530, Sudip Mukherjee wrote:
On Wed, Mar 18, 2015 at 02:25:09PM +0300, Dan Carpenter wrote:
quoted
On Wed, Mar 18, 2015 at 11:12:20AM +0000, Lorenzo Stoakes wrote:
quoted
On 18 March 2015 at 10:50, Vitaly Kuznetsov [off-list ref] wrote:
If it's a white space thing on the same line then it's generally ok to
fix it. The "one thing per patch" is meant to make patches easier to
review. If it's a trivial thing and it doesn't make it harder to review
then we are reasonable people.
but Greg K-H has explisitely mentiond not to do so.
I did just that and fixed few whitespace things in the patch to fix the
build failure.
https://lkml.org/lkml/2015/3/10/685
You were making random white space changes and not on the same line. It
was hard to review because you had to count how many u32 arguments there
were (a million) and really look at it to see what the compile warning
was. There was no compile warning in the end. Very annoying.
regards,
dan carpenter
You were making random white space changes and not on the same line. It
was hard to review because you had to count how many u32 arguments there
were (a million) and really look at it to see what the compile warning
was. There was no compile warning in the end. Very annoying.
ok, now understood. Thanks.
like you said once - combining different changes in a single patch is
an art. :)
regards
sudip