kernel: atomic: Ignore atomic_and/or return when not used
There are some cases where atomic_and/or don't need to be checked. Actively acknowledge these cases. Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
This commit is contained in:
parent
4d5397bb0a
commit
abffd83d26
2 changed files with 6 additions and 6 deletions
|
@ -388,7 +388,7 @@ static inline void atomic_clear_bit(atomic_t *target, int bit)
|
|||
{
|
||||
atomic_val_t mask = ATOMIC_MASK(bit);
|
||||
|
||||
atomic_and(ATOMIC_ELEM(target, bit), ~mask);
|
||||
(void)atomic_and(ATOMIC_ELEM(target, bit), ~mask);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -406,7 +406,7 @@ static inline void atomic_set_bit(atomic_t *target, int bit)
|
|||
{
|
||||
atomic_val_t mask = ATOMIC_MASK(bit);
|
||||
|
||||
atomic_or(ATOMIC_ELEM(target, bit), mask);
|
||||
(void)atomic_or(ATOMIC_ELEM(target, bit), mask);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -123,10 +123,10 @@ static inline void group_set(atomic_t *target, atomic_t *source)
|
|||
int i;
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(bt_mesh.lpn.added); i++) {
|
||||
atomic_or(&target[i], atomic_get(&source[i]));
|
||||
(void)atomic_or(&target[i], atomic_get(&source[i]));
|
||||
}
|
||||
#else
|
||||
atomic_or(target, atomic_get(source));
|
||||
(void)atomic_or(target, atomic_get(source));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -136,10 +136,10 @@ static inline void group_clear(atomic_t *target, atomic_t *source)
|
|||
int i;
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(bt_mesh.lpn.added); i++) {
|
||||
atomic_and(&target[i], ~atomic_get(&source[i]));
|
||||
(void)atomic_and(&target[i], ~atomic_get(&source[i]));
|
||||
}
|
||||
#else
|
||||
atomic_and(target, ~atomic_get(source));
|
||||
(void)atomic_and(target, ~atomic_get(source));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue