lkml.org 
[lkml]   [2015]   [Aug]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 05/11] x86, fpu: add helper xfeature_nr_enabled() instead of test_bit()

* Dave Hansen <dave@sr71.net> wrote:

>
> From: Dave Hansen <dave.hansen@linux.intel.com>
>
> 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


\
 
 \ /
  Last update: 2015-08-28 07:41    [W:0.141 / U:1.656 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site