Re: [PATCH] staging: nvec: convert to use platform registerandmfdcells

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Joe,

On Friday 05 August 2011 22:11:24 Joe Perches wrote:
> On Fri, 2011-08-05 at 22:07 +0200, Marc Dietrich wrote:
> > On Friday 05 August 2011 21:31:05 Joe Perches wrote:
> > > On Fri, 2011-08-05 at 21:03 +0200, Marc Dietrich wrote:
> > > > On Sunday 24 July 2011 23:01:19 Joe Perches wrote:
> > > > > On Sun, 2011-07-24 at 21:56 +0200, Marc Dietrich wrote:
> > > > > > This patch converts the nvec to use mfd cells and improves the
> > > > > > registration of the platform driver. The child drivers are also
> > > > > > converted to use mfd cells and platform registration.
> 
> []
> 
> > > > > >  static unsigned char EC_DISABLE_EVENT_REPORTING[]
> > > > > >  =	{'\x04','\x00','\x00'};
> > > > > 
> > > > > Please use const where appropriate.
> > > > 
> > > > while these message strings are constant most of the time, there are
> > > > places where they aren't. So the nvec_write_{a}sync functions (which
> > > > are feeded by these strings) cannot be called with a const argument.
> > > 
> > > That doesn't matter.
> > > nvec_write_async should be changed to:
> > > void nvec_write_async(struct nvec_chip *nvec, const unsigned char
> > > *data, short size)
> > > and nvec_write_sync should be:
> > > static struct nvec_msg *nvec_write_sync(struct nvec_chip *nvec, const
> > > unsigned char *data, short size)
> > 
> > sure, but does this also work if *data is not constant, e.g. points to a
> > buffer (e.g. on the stack) with variable content, as mentioned above?
> 
> Yes it does.
> 
> Besides, internally nvec_write_async does a memcpy of the data.

ahh, sorry. Seems my C got a bit rusty.

Will change this in the next iteration.

Thanks!

Marc
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux