lkml.org 
[lkml]   [2022]   [Jun]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    SubjectRe: [PATCH 2/4] x86/cpuid: refactor setup_clear_cpu_cap/clear_feature
    From
    On 6/22/22 07:48, Maxim Levitsky wrote:
    > Simplify the code a bit by always passing &boot_cpu_data
    > in case the setup_clear_cpu_cap was called.
    >
    > Also unify clear_cpu_cap and do_clear_cpu_cap.

    Please always add a "()" suffix to functions. "foo" is a variable, but
    "foo()" is a function.

    I also really like when a changelog has a clear problem statement. I
    _think_ the problem here is something along the lines of the 'c'
    argument to clear_feature() having different behavior when it is NULL
    versus '&boot_cpu_data'.

    Basically, there's no reason to support clearing a bit in
    '&boot_cpu_data' without also setting that bit in 'cpu_caps_cleared'.
    > {
    > - do_clear_cpu_cap(NULL, feature);
    > + clear_cpu_cap(&boot_cpu_data, feature);
    > }

    \
     
     \ /
      Last update: 2022-06-22 17:10    [W:3.118 / U:0.336 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site