Skip to content
  • NeilBrown's avatar
    staging: lustre: remove conditional compilation from libcfs_cpu.c · 7b8e2026
    NeilBrown authored
    
    
    libcfs_cpu.c manages CPU partitions.  In the !CONFIG_SMP case, most
    of this disappears and 'static inline's from libcfs_cpu.h are used.
    However we still allocate a 'struct cfs_cpt_table' and keep some
    dummy data in it.  This is a bit pointless.
    
    This patch removes all the !CONFIG_SMP code from libcfs_cpu.c and
    conditionally compiles the whole file only when CONFIG_SMP.
    We no longer allocate a 'struct cfs_cpt_table' on !CONFIG_SMP,
    and don't even declare a structure.  The name "cfs_cpt_tab"
    becomes always "NULL", which allows some code to be optimized away.
    
    This means that cfs_cpt_tab can sometimes be NULL, so we need to
    discard the assertion that it isn't.
    
    Signed-off-by: default avatarNeilBrown <neilb@suse.com>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    7b8e2026