lkml.org 
[lkml]   [2019]   [Nov]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v3 3/5] bus: hisi_lpc: Clean some types
From
Date
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

\
 
 \ /
  Last update: 2019-11-05 16:50    [W:0.029 / U:0.348 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site