> For bit vector registers, masking might be fine. What is not OK > however is to mask a *range* with 0xff instead of simply checking that > the value is between 0 and 255 and return -EINVAL or similar if it > isn't. It's usually better to return an error to user-space than > silently drop an invalid value. Do the best you can. On second thought, for ranges, you might simply force the input value into the range instead of returning an error. This is what other drivers do. -- Jean Delvare http://khali.linux-fr.org/