Re: [PATCH/RFC?] usb/input: Add support for fn key on ApplePowerBooks

From: Benjamin Herrenschmidt
Date: Fri Jan 13 2006 - 16:56:05 EST


On Sat, 2006-01-14 at 08:55 +1100, Benjamin Herrenschmidt wrote:

>
> > > + try_translate = test_bit(usage->code, usbhid_pb_numlock)?1:
> > > + test_bit(LED_NUML, input->led);
> > > + if (try_translate) {
> >
> > Isn't this the same as
> >
> > if (test_bit(usage->code, usbhid_pb_numlock) || test_bit(LED_NUML, input->led))
> >
> > but harder to read?
>
> No. If the first one is 0, the second one will not matter in the first
> version, while it will in yours.

Forget me, I'm stupid or rather I should finish by breakfast before
writing stupid things ;) Of course you are right, they are equivalent.

Ben.


-
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/