Re: [PATCH libinput 2/6] touchpad: use __builtin_ffs instead of a manual count

2015-01-05 Thread Peter Hutterer
On Tue, Jan 06, 2015 at 01:39:24PM +0800, Jonas Ådahl wrote: > On Tue, Jan 06, 2015 at 01:00:08PM +1000, Peter Hutterer wrote: > > On Mon, Jan 05, 2015 at 04:29:48PM -0800, Thiago Macieira wrote: > > > On Monday 05 January 2015 12:00:24 Hans de Goede wrote: > > > > > + return __builtin_ffs(tp->

Re: [PATCH libinput 2/6] touchpad: use __builtin_ffs instead of a manual count

2015-01-05 Thread Jonas Ådahl
On Tue, Jan 06, 2015 at 01:00:08PM +1000, Peter Hutterer wrote: > On Mon, Jan 05, 2015 at 04:29:48PM -0800, Thiago Macieira wrote: > > On Monday 05 January 2015 12:00:24 Hans de Goede wrote: > > > > + return __builtin_ffs(tp->fake_touches >> 1); > > > > Why the builtin instead of ffs from ?

Re: [PATCH libinput 2/6] touchpad: use __builtin_ffs instead of a manual count

2015-01-05 Thread Peter Hutterer
On Mon, Jan 05, 2015 at 04:29:48PM -0800, Thiago Macieira wrote: > On Monday 05 January 2015 12:00:24 Hans de Goede wrote: > > > + return __builtin_ffs(tp->fake_touches >> 1); > > Why the builtin instead of ffs from ? simple answer: was the first one that google came up with. does it matter much

Re: [PATCH libinput 2/6] touchpad: use __builtin_ffs instead of a manual count

2015-01-05 Thread Thiago Macieira
On Monday 05 January 2015 12:00:24 Hans de Goede wrote: > > + return __builtin_ffs(tp->fake_touches >> 1); Why the builtin instead of ffs from ? -- Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org Software Architect - Intel Open Source Technology Center PGP/GPG: 0x6EF

Re: [PATCH libinput 2/6] touchpad: use __builtin_ffs instead of a manual count

2015-01-05 Thread Hans de Goede
Hi, On 16-12-14 04:14, Peter Hutterer wrote: BTN_TOOL_FINGER, DOUBLETAP, etc. are mutually exclusive in the kernel, so we can use ffs here instead of manually counting. Signed-off-by: Peter Hutterer Looks good: Reviewed-by: Hans de Goede Regards, Hans --- src/evdev-mt-touchpad.c | 11

[PATCH libinput 2/6] touchpad: use __builtin_ffs instead of a manual count

2014-12-15 Thread Peter Hutterer
BTN_TOOL_FINGER, DOUBLETAP, etc. are mutually exclusive in the kernel, so we can use ffs here instead of manually counting. Signed-off-by: Peter Hutterer --- src/evdev-mt-touchpad.c | 11 +-- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/evdev-mt-touchpad.c b/src/evde