All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: sparclinux@vger.kernel.org
Subject: [PATCH 0/5] sparc32 sparse fixes in mm/
Date: Sun, 20 Apr 2014 19:30:36 +0000	[thread overview]
Message-ID: <20140420193036.GA13910@ravnborg.org> (raw)

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

                 reply	other threads:[~2014-04-20 19:30 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140420193036.GA13910@ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=sparclinux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.