Re: [PATCH 2.6.11-rc3] IBM Trackpoint support

Domen Puncer
2005-02-06T20:17:33Z

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