Skip to content

Commit de96e8a

Browse files
vittyvkliuw
authored andcommitted
Drivers: hv: Rename 'alloced' to 'allocated'
'Alloced' is not a real word and only saves us two letters, let's use 'allocated' instead. No functional change intended. Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com> Reviewed-by: Michael Kelley <mikelley@microsoft.com> Link: https://lore.kernel.org/r/20220128103412.3033736-2-vkuznets@redhat.com Signed-off-by: Wei Liu <wei.liu@kernel.org>
1 parent a70d298 commit de96e8a

3 files changed

Lines changed: 17 additions & 17 deletions

File tree

drivers/hv/channel_mgmt.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,7 @@ void hv_process_channel_removal(struct vmbus_channel *channel)
459459
* init_vp_index() can (re-)use the CPU.
460460
*/
461461
if (hv_is_perf_channel(channel))
462-
hv_clear_alloced_cpu(channel->target_cpu);
462+
hv_clear_allocated_cpu(channel->target_cpu);
463463

464464
/*
465465
* Upon suspend, an in-use hv_sock channel is marked as "rescinded" and
@@ -728,7 +728,7 @@ static void init_vp_index(struct vmbus_channel *channel)
728728
bool perf_chn = hv_is_perf_channel(channel);
729729
u32 i, ncpu = num_online_cpus();
730730
cpumask_var_t available_mask;
731-
struct cpumask *alloced_mask;
731+
struct cpumask *allocated_mask;
732732
u32 target_cpu;
733733
int numa_node;
734734

@@ -745,7 +745,7 @@ static void init_vp_index(struct vmbus_channel *channel)
745745
*/
746746
channel->target_cpu = VMBUS_CONNECT_CPU;
747747
if (perf_chn)
748-
hv_set_alloced_cpu(VMBUS_CONNECT_CPU);
748+
hv_set_allocated_cpu(VMBUS_CONNECT_CPU);
749749
return;
750750
}
751751

@@ -760,22 +760,22 @@ static void init_vp_index(struct vmbus_channel *channel)
760760
continue;
761761
break;
762762
}
763-
alloced_mask = &hv_context.hv_numa_map[numa_node];
763+
allocated_mask = &hv_context.hv_numa_map[numa_node];
764764

765-
if (cpumask_weight(alloced_mask) ==
765+
if (cpumask_weight(allocated_mask) ==
766766
cpumask_weight(cpumask_of_node(numa_node))) {
767767
/*
768768
* We have cycled through all the CPUs in the node;
769-
* reset the alloced map.
769+
* reset the allocated map.
770770
*/
771-
cpumask_clear(alloced_mask);
771+
cpumask_clear(allocated_mask);
772772
}
773773

774-
cpumask_xor(available_mask, alloced_mask,
774+
cpumask_xor(available_mask, allocated_mask,
775775
cpumask_of_node(numa_node));
776776

777777
target_cpu = cpumask_first(available_mask);
778-
cpumask_set_cpu(target_cpu, alloced_mask);
778+
cpumask_set_cpu(target_cpu, allocated_mask);
779779

780780
if (channel->offermsg.offer.sub_channel_index >= ncpu ||
781781
i > ncpu || !hv_cpuself_used(target_cpu, channel))

drivers/hv/hyperv_vmbus.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ static inline bool hv_is_perf_channel(struct vmbus_channel *channel)
405405
return vmbus_devs[channel->device_id].perf_device;
406406
}
407407

408-
static inline bool hv_is_alloced_cpu(unsigned int cpu)
408+
static inline bool hv_is_allocated_cpu(unsigned int cpu)
409409
{
410410
struct vmbus_channel *channel, *sc;
411411

@@ -427,23 +427,23 @@ static inline bool hv_is_alloced_cpu(unsigned int cpu)
427427
return false;
428428
}
429429

430-
static inline void hv_set_alloced_cpu(unsigned int cpu)
430+
static inline void hv_set_allocated_cpu(unsigned int cpu)
431431
{
432432
cpumask_set_cpu(cpu, &hv_context.hv_numa_map[cpu_to_node(cpu)]);
433433
}
434434

435-
static inline void hv_clear_alloced_cpu(unsigned int cpu)
435+
static inline void hv_clear_allocated_cpu(unsigned int cpu)
436436
{
437-
if (hv_is_alloced_cpu(cpu))
437+
if (hv_is_allocated_cpu(cpu))
438438
return;
439439
cpumask_clear_cpu(cpu, &hv_context.hv_numa_map[cpu_to_node(cpu)]);
440440
}
441441

442-
static inline void hv_update_alloced_cpus(unsigned int old_cpu,
442+
static inline void hv_update_allocated_cpus(unsigned int old_cpu,
443443
unsigned int new_cpu)
444444
{
445-
hv_set_alloced_cpu(new_cpu);
446-
hv_clear_alloced_cpu(old_cpu);
445+
hv_set_allocated_cpu(new_cpu);
446+
hv_clear_allocated_cpu(old_cpu);
447447
}
448448

449449
#ifdef CONFIG_HYPERV_TESTING

drivers/hv/vmbus_drv.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1874,7 +1874,7 @@ static ssize_t target_cpu_store(struct vmbus_channel *channel,
18741874

18751875
/* See init_vp_index(). */
18761876
if (hv_is_perf_channel(channel))
1877-
hv_update_alloced_cpus(origin_cpu, target_cpu);
1877+
hv_update_allocated_cpus(origin_cpu, target_cpu);
18781878

18791879
/* Currently set only for storvsc channels. */
18801880
if (channel->change_target_cpu_callback) {

0 commit comments

Comments
 (0)