Re: [RESEND PATCH 4/8] mfd: cros_ec: Use a zero-length array for command data

2015-05-05 Thread Javier Martinez Canillas
Hello Gwendal, Thanks a lot for your feedback. On 04/24/2015 07:19 AM, Gwendal Grignou wrote: > In general we can use kmalloc instead of kzalloc. Also some commands > do not need malloc at all. We could allocate on stack for known small > commands and for the keyboard case use the caller argument

Re: [RESEND PATCH 4/8] mfd: cros_ec: Use a zero-length array for command data

2015-05-05 Thread Javier Martinez Canillas
Hello Gwendal, On 04/24/2015 10:29 PM, Gwendal Grignou wrote: > On Mon, Apr 6, 2015 at 9:15 AM, Javier Martinez Canillas > wrote: [snip] >> >> @@ -110,17 +115,25 @@ static ssize_t ec_device_read(struct file *filp, char >> __user *buffer, >> static long ec_device_ioctl_xcmd(struct cros_ec_devi

Re: [RESEND PATCH 4/8] mfd: cros_ec: Use a zero-length array for command data

2015-04-24 Thread Gwendal Grignou
On Mon, Apr 6, 2015 at 9:15 AM, Javier Martinez Canillas wrote: > Commit 1b84f2a4cd4a ("mfd: cros_ec: Use fixed size arrays to transfer > data with the EC") modified the struct cros_ec_command fields to not > use pointers for the input and output buffers and use fixed length > arrays instead. > >

Re: [RESEND PATCH 4/8] mfd: cros_ec: Use a zero-length array for command data

2015-04-23 Thread Gwendal Grignou
In general we can use kmalloc instead of kzalloc. Also some commands do not need malloc at all. We could allocate on stack for known small commands and for the keyboard case use the caller argument. Gwendal. On Mon, Apr 6, 2015 at 9:15 AM, Javier Martinez Canillas wrote: > Commit 1b84f2a4cd4a ("

Re: [RESEND PATCH 4/8] mfd: cros_ec: Use a zero-length array for command data

2015-04-16 Thread Javier Martinez Canillas
Hello Heiko, [snip] On 04/16/2015 11:45 AM, Heiko Stübner wrote: > >> /* Module initialization */ >> @@ -269,3 +301,4 @@ void ec_dev_sysfs_remove(struct cros_ec_device *ec) >> { >> sysfs_remove_group(&ec->vdev->kobj, &ec_attr_group); >> } >> + > > .git/rebase-apply/patch:893: new blank

Re: [RESEND PATCH 4/8] mfd: cros_ec: Use a zero-length array for command data

2015-04-16 Thread Heiko Stübner
Am Montag, 6. April 2015, 18:15:02 schrieb Javier Martinez Canillas: > Commit 1b84f2a4cd4a ("mfd: cros_ec: Use fixed size arrays to transfer > data with the EC") modified the struct cros_ec_command fields to not > use pointers for the input and output buffers and use fixed length > arrays instead.