Thread (21 messages) 21 messages, 3 authors, 2016-09-16

Re: [PATCH v3] leds: Introduce userspace leds driver

From: David Lechner <david@lechnology.com>
Date: 2016-09-16 15:41:29
Also in: lkml

On 09/16/2016 01:07 AM, Pavel Machek wrote:
Hi!

+static ssize_t uleds_read(struct file *file, char __user *buffer,
size_t count,
+ loff_t *ppos)
+{
+ struct uleds_device *udev = file->private_data;
+ ssize_t retval;
+
+ if (count == 0)
+ return 0;
+
+ if (count != 1)
+ return -EINVAL;

This is quite anti-social. You are free to return 1 byte on any read
(short read), but please allow reads with bigger buffers.

Thanks,
									Pavel
Sure.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help