Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Ralf Baechle <ralf@linux-mips.org>
To: James Hogan <james.hogan@imgtec.com>
Cc: linux-mips@linux-mips.org, Paul Burton <paul.burton@imgtec.com>
Subject: Re: [PATCH] MIPS: mips-cm: Fix sparse warnings
Date: Mon, 5 Jan 2015 18:45:37 +0100	[thread overview]
Message-ID: <20150105174537.GB14192@linux-mips.org> (raw)
In-Reply-To: <1420472730-23629-1-git-send-email-james.hogan@imgtec.com>

On Mon, Jan 05, 2015 at 03:45:30PM +0000, James Hogan wrote:

> Sparse emits a bunch of warnings in mips-cm.h due to casting away of
> __iomem by the addr_gcr_*() functions:
> 
> arch/mips/include/asm/mips-cm.h:134:1: warning: cast removes address space of expression
> 
> And subsequent passing of the return values to __raw_readl() and
> __raw_writel() in the read_gcr_*() and write_gcr_*() functions:
> 
> arch/mips/include/asm/mips-cm.h:134:1: warning: incorrect type in argument 2 (different address spaces)
> arch/mips/include/asm/mips-cm.h:134:1:    expected void volatile [noderef] <asn:2>*mem
> arch/mips/include/asm/mips-cm.h:134:1:    got unsigned int [usertype] *
> arch/mips/include/asm/mips-cm.h:134:1: warning: incorrect type in argument 1 (different address spaces)
> arch/mips/include/asm/mips-cm.h:134:1:    expected void const volatile [noderef] <asn:2>*mem
> arch/mips/include/asm/mips-cm.h:134:1:    got unsigned int [usertype] *
> 
> Fix by adding __iomem to the addr_gcr_*() return type and cast.

Thanks, applied.

  Ralf

      parent reply	other threads:[~2015-01-05 17:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-05 15:45 [PATCH] MIPS: mips-cm: Fix sparse warnings James Hogan
2015-01-05 15:45 ` James Hogan
2015-01-05 17:45 ` Ralf Baechle [this message]

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=20150105174537.GB14192@linux-mips.org \
    --to=ralf@linux-mips.org \
    --cc=james.hogan@imgtec.com \
    --cc=linux-mips@linux-mips.org \
    --cc=paul.burton@imgtec.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox