mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: John Garry <john.garry@huawei.com>, xuwei5@huawei.com
Cc: linuxarm@huawei.com, linux-kernel@vger.kernel.org,
	olof@lixom.net, bhelgaas@google.com, arnd@arndb.de
Subject: Re: [PATCH v3 3/5] bus: hisi_lpc: Clean some types
Date: Tue, 05 Nov 2019 07:48:43 -0800	[thread overview]
Message-ID: <1beaa707511e1ef6b1e2fe408a61a35d4cd0b5ba.camel@perches.com> (raw)
In-Reply-To: <d6c8521c-30c0-7a2c-b658-8734f7b180d3@huawei.com>

On Tue, 2019-11-05 at 09:50 +0000, John Garry wrote:
> On 04/11/2019 18:39, Joe Perches wrote:
> > On Tue, 2019-11-05 at 01:22 +0800, John Garry wrote:
> > > Sparse complains of these:
> > > drivers/bus/hisi_lpc.c:82:38: warning: incorrect type in argument 1 (different address spaces)
> > > drivers/bus/hisi_lpc.c:82:38:    expected void const volatile [noderef] <asn:2>*addr
> > > drivers/bus/hisi_lpc.c:82:38:    got unsigned char *
> > > drivers/bus/hisi_lpc.c:131:35: warning: incorrect type in argument 1 (different address spaces)
> > > drivers/bus/hisi_lpc.c:131:35:    expected unsigned char *mbase
> > > drivers/bus/hisi_lpc.c:131:35:    got void [noderef] <asn:2>*membase
> > > drivers/bus/hisi_lpc.c:186:35: warning: incorrect type in argument 1 (different address spaces)
> > > drivers/bus/hisi_lpc.c:186:35:    expected unsigned char *mbase
> > > drivers/bus/hisi_lpc.c:186:35:    got void [noderef] <asn:2>*membase
> > > drivers/bus/hisi_lpc.c:228:16: warning: cast to restricted __le32
> > > drivers/bus/hisi_lpc.c:251:13: warning: incorrect type in assignment (different base types)
> > > drivers/bus/hisi_lpc.c:251:13:    expected unsigned int [unsigned] [usertype] val
> > > drivers/bus/hisi_lpc.c:251:13:    got restricted __le32 [usertype] <noident>
> > > 
> > > Clean them up.
> > 
> > OK, it might also be good to change the _in and _out functions
> > to use void * and not unsigned char * for buf
> 
> Hi Joe,

Hi John.

> In fact, using unsigned char * is the right thing to do, and really the 
> upper layer prob should not be passing void *. I'll look at this as a 
> follow up.

Maybe so, but it looks like the generic readsb and writesb routines
take void * so it might be a lot of other files to modify.

g'luck and cheers, Joe


  reply	other threads:[~2019-11-05 15:49 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-04 17:22 [PATCH v3 0/5] hisi_lpc: Improve build test coverage John Garry
2019-11-04 17:22 ` [PATCH v3 1/5] lib: logic_pio: Enforce LOGIC_PIO_INDIRECT region ops are set at registration John Garry
2019-11-04 17:22 ` [PATCH v3 2/5] logic_pio: Define PIO_INDIRECT_SIZE for !CONFIG_INDIRECT_PIO John Garry
2019-11-04 17:22 ` [PATCH v3 3/5] bus: hisi_lpc: Clean some types John Garry
2019-11-04 18:39   ` Joe Perches
2019-11-05  9:50     ` John Garry
2019-11-05 15:48       ` Joe Perches [this message]
2019-11-04 17:22 ` [PATCH v3 4/5] bus: hisi_lpc: Expand build test coverage John Garry
2019-11-04 17:22 ` [PATCH v3 5/5] logic_pio: Build into a library John Garry
2019-11-09  6:33 ` [PATCH v3 0/5] hisi_lpc: Improve build test coverage Wei Xu

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=1beaa707511e1ef6b1e2fe408a61a35d4cd0b5ba.camel@perches.com \
    --to=joe@perches.com \
    --cc=arnd@arndb.de \
    --cc=bhelgaas@google.com \
    --cc=john.garry@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    --cc=olof@lixom.net \
    --cc=xuwei5@huawei.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

all inboxes | Powered by JetHome®