Commit 60d48787 authored by Darek Stojaczyk's avatar Darek Stojaczyk
Browse files

util/cpuset: use dst & src parameter names



Declaractions for those functions already have dst
and src as param names, but definitions use set1 and
set2, which doesn't really tell which one is which.

My IDE actually gives me tooltips with param names
from definitions and it would be much easier to see
"dst" and "src" in there.

Change-Id: I45013cf27fc95f69cb2c776fb1b6701c5e60e373
Signed-off-by: default avatarDarek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/455163


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
parent 390b3641
Loading
Loading
Loading
Loading
+19 −19
Original line number Diff line number Diff line
@@ -60,11 +60,11 @@ spdk_cpuset_equal(const struct spdk_cpuset *set1, const struct spdk_cpuset *set2
}

void
spdk_cpuset_copy(struct spdk_cpuset *set1, const struct spdk_cpuset *set2)
spdk_cpuset_copy(struct spdk_cpuset *dst, const struct spdk_cpuset *src)
{
	assert(set1 != NULL);
	assert(set2 != NULL);
	memcpy(&set1->cpus, &set2->cpus, sizeof(set2->cpus));
	assert(dst != NULL);
	assert(src != NULL);
	memcpy(&dst->cpus, &src->cpus, sizeof(src->cpus));
}

void
@@ -78,35 +78,35 @@ spdk_cpuset_negate(struct spdk_cpuset *set)
}

void
spdk_cpuset_and(struct spdk_cpuset *set1, const struct spdk_cpuset *set2)
spdk_cpuset_and(struct spdk_cpuset *dst, const struct spdk_cpuset *src)
{
	unsigned int i;
	assert(set1 != NULL);
	assert(set2 != NULL);
	for (i = 0; i < sizeof(set2->cpus); i++) {
		set1->cpus[i] &= set2->cpus[i];
	assert(dst != NULL);
	assert(src != NULL);
	for (i = 0; i < sizeof(src->cpus); i++) {
		dst->cpus[i] &= src->cpus[i];
	}
}

void
spdk_cpuset_or(struct spdk_cpuset *set1, const struct spdk_cpuset *set2)
spdk_cpuset_or(struct spdk_cpuset *dst, const struct spdk_cpuset *src)
{
	unsigned int i;
	assert(set1 != NULL);
	assert(set2 != NULL);
	for (i = 0; i < sizeof(set2->cpus); i++) {
		set1->cpus[i] |= set2->cpus[i];
	assert(dst != NULL);
	assert(src != NULL);
	for (i = 0; i < sizeof(src->cpus); i++) {
		dst->cpus[i] |= src->cpus[i];
	}
}

void
spdk_cpuset_xor(struct spdk_cpuset *set1, const struct spdk_cpuset *set2)
spdk_cpuset_xor(struct spdk_cpuset *dst, const struct spdk_cpuset *src)
{
	unsigned int i;
	assert(set1 != NULL);
	assert(set2 != NULL);
	for (i = 0; i < sizeof(set2->cpus); i++) {
		set1->cpus[i] ^= set2->cpus[i];
	assert(dst != NULL);
	assert(src != NULL);
	for (i = 0; i < sizeof(src->cpus); i++) {
		dst->cpus[i] ^= src->cpus[i];
	}
}