Re: [PATCH 05/11] x86, fpu: add helper xfeature_nr_enabled() instead of test_bit()

From: Ingo Molnar
Date: Fri Aug 28 2015 - 01:05:08 EST



* Dave Hansen <dave@xxxxxxxx> wrote:

>
> From: Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>
>
> We currently use test_bit() in a few places to see if an xfeature
> is enabled. It ends up being a bit ugly because 'xfeatures_mask'
> is a u64 and test_bit wants an 'unsigned long' so it requires a
> cast. The *_bit() functions are also techincally atomic, which
> we have no need for here.
>
> So, remove the test_bit()s and replace with the new
> xfeature_nr_enabled() helper.

Small nit: please name it xfeature_enabled(), as it's shorter and already pretty
unambiguous.

Thanks,

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