Re: [PATCH 2.6.11-rc3] IBM Trackpoint support

From: Domen Puncer
Date: Sun Feb 06 2005 - 15:18:45 EST


I'm a bit late, sorry. Haven't seen these mentioned in replies:


On 03/02/05 17:43 -0500, Stephen Evanchik wrote:
> +int tp_sens = TP_DEF_SENS;
> +module_param_named(sens, tp_sens, uint, 0);
> +MODULE_PARM_DESC(sens, "Sensitivity");

I don't see out-of-file usages... these could be static.

...
> + static int name(char* page, char** start, off_t off, int count, int*
> eof, void* data) \
> + { \
> + int len; \
> + struct psmouse *psmouse = (struct psmouse *)data; \
> + struct trackpoint_data *tp = (struct trackpoint_data*)psmouse->private; \

No need to cast (void *).

...
> +static int scroll_write_func(struct file *file, const char __user
> *buffer, unsigned long count, void *data)
> +{
> + int len = count;
> + unsigned char tmp[5];
> + struct psmouse *psmouse = (struct psmouse *)data;
> + struct trackpoint_data *tp = (struct trackpoint_data*)psmouse->private;
> + if(count > sizeof(tmp) - 1)
> + len = sizeof(tmp) - 1;

How about: len = min(count, sizeof(tmp) - 1);?

...
> +no_ext_dev:

Nitpick:
Some like ' ' before label (makes diff -pu patches more readable)



Domen
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/