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: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/455163
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This commit is contained in:
Darek Stojaczyk 2019-05-21 06:19:40 +02:00
parent 390b364146
commit 60d487877a

View File

@ -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];
}
}