]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Staging: lustre: linux-cpu: Drop wrapper function
authorShivani Bhardwaj <shivanib134@gmail.com>
Mon, 2 Nov 2015 17:49:34 +0000 (23:19 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 16 Nov 2015 04:02:47 +0000 (20:02 -0800)
Remove the function cfs_cpu_ht_siblings() and replace all its calls with
the function it wrapped.

Siigned-off-by: Shivani Bhardwaj <shivanib134@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/libcfs/linux/linux-cpu.c

index bd7a9ef0be14a5b7e23f8569267124f740a7ac1d..df6c049b795a58e934ae4d2b269714ccba5e21e7 100644 (file)
@@ -78,12 +78,6 @@ struct cfs_cpt_data {
 
 static struct cfs_cpt_data     cpt_data;
 
-/* return cpumask of HTs in the same core */
-static void cfs_cpu_ht_siblings(int cpu, cpumask_t *mask)
-{
-       cpumask_copy(mask, topology_sibling_cpumask(cpu));
-}
-
 static void cfs_node_to_cpumask(int node, cpumask_t *mask)
 {
        cpumask_copy(mask, cpumask_of_node(node));
@@ -646,7 +640,7 @@ cfs_cpt_choose_ncpus(struct cfs_cpt_table *cptab, int cpt,
                        int     i;
 
                        /* get cpumask for hts in the same core */
-                       cfs_cpu_ht_siblings(cpu, core);
+                       cpumask_copy(core, topology_sibling_cpumask(cpu));
                        cpumask_and(core, core, node);
 
                        LASSERT(!cpumask_empty(core));
@@ -962,7 +956,8 @@ cfs_cpu_notify(struct notifier_block *self, unsigned long action, void *hcpu)
 
                mutex_lock(&cpt_data.cpt_mutex);
                /* if all HTs in a core are offline, it may break affinity */
-               cfs_cpu_ht_siblings(cpu, cpt_data.cpt_cpumask);
+               cpumask_copy(cpt_data.cpt_cpumask,
+                            topology_sibling_cpumask(cpu));
                warn = cpumask_any_and(cpt_data.cpt_cpumask,
                                       cpu_online_mask) >= nr_cpu_ids;
                mutex_unlock(&cpt_data.cpt_mutex);