Just a few triviata:
> +static int proc_attr_readdir(struct file * filp,
Can all this be inside CONFIG_SOMETHING? It's quite a lot of code.
> + switch (i) {
> + case 0:
We often line the `case' up with the `switch' to save a tabstop.
> + if (i>=sizeof(attr_stuff)/sizeof(attr_stuff[0])) {
The ARRAY_SIZE macro does this.
> +static ssize_t proc_pid_attr_read(struct file * file, char * buf,
> + size_t count, loff_t *ppos)
> +{
> ...
> + copy_to_user(buf, (char *) page + *ppos, count);
Need to check the return value here, return a short read if something was
copied, else -EFAULT. Or just EFAULT.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/