Skip to content

sparc32 sparse fixes in mm/

Sam Ravnborg sparclinux 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5sparc32: rename mm/srmmu.h to mm/mm_32.harch/sparc/mm/leon_mm.c arch/sparc/mm/mm_32.h arch/sparc/mm/srmmu.c +1 more+6 -60 replies
2/5sparc32: fix sparse warning in fault_32.carch/sparc/mm/fault_32.c arch/sparc/mm/mm_32.h+12 -30 replies
3/5sparc32: fix sparse warning in init_32.carch/sparc/include/asm/pgtable_32.h arch/sparc/mm/srmmu.c+1 -20 replies
4/5sparc32: fix sparse warnings in srmmu.carch/sparc/mm/init_32.c arch/sparc/mm/iommu.c arch/sparc/mm/mm_32.h +1 more+11 -70 replies
5/5sparc32: fix sparse "Should it be static?" in mm/arch/sparc/mm/leon_mm.c arch/sparc/mm/mm_32.h arch/sparc/mm/srmmu.c+7 -40 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/5] sparc32 sparse fixes in mm/

The following 5 patches fixes most of the sparse generated warnings in mm/.

Sam Ravnborg (5):
sparc32: rename mm/srmmu.h to mm/mm_32.h
sparc32: fix sparse warning in fault_32.c
sparc32: fix sparse warning in init_32.c
sparc32: fix sparse warnings in srmmu.c
sparc32: fix sparse "Should it be static?" in mm/

 arch/sparc/include/asm/pgtable_32.h |  1 +
 arch/sparc/mm/fault_32.c            |  5 ++---
 arch/sparc/mm/init_32.c             |  3 ++-
 arch/sparc/mm/iommu.c               |  5 ++---
 arch/sparc/mm/leon_mm.c             |  4 ++--
 arch/sparc/mm/mm_32.h               | 24 ++++++++++++++++++++++++
 arch/sparc/mm/srmmu.c               | 13 ++++---------
 arch/sparc/mm/srmmu.h               |  4 ----
 8 files changed, 37 insertions(+), 22 deletions(-)

There are now only two sparse warning left in mm/ (for sparc32) Both warnings relates to the return value of of_ioremap() which is __iomem.

iommu.c:69:21: warning: incorrect type in assignment (different address spaces)

    iommu->regs is set to a value obtained by of_ioremap().
    And this value is later dereferenced like this:
    iommu->regs->control = xxx;

io-unit.c:56:13: warning: incorrect type in assignment (different address spaces)
iounit->page_table is set to a value obtained by of_ioremap(), the address of the External Page Table.
And this value is dereference later like this dev->archdata.iommu->page_table[scan]

When looking closer at ioport.c which implments of_ioremap() I tentatively conclude that the direct reference above is OK. But as I was not sure I left these as is.

The warnings could have been silenced with a few casts but that would just hide the potential error that they flag.

Sam