ocf: simplify code to one line.
I think these two lines code can be simplified one line. Signed-off-by: yidong0635 <dongx.yi@intel.com> Change-Id: Ibfc876e8de1c5a39cde94ed2ad57b5095a098f3b Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4375 Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
parent
3844ffc1c2
commit
06b537bfdb
@ -629,8 +629,7 @@ static inline void env_bit_clear(int nr, volatile void *addr)
|
|||||||
char *byte = (char *)addr + (nr >> 3);
|
char *byte = (char *)addr + (nr >> 3);
|
||||||
char mask = 1 << (nr & 7);
|
char mask = 1 << (nr & 7);
|
||||||
|
|
||||||
mask = ~mask;
|
__sync_and_and_fetch(byte, ~mask);
|
||||||
__sync_and_and_fetch(byte, mask);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline bool env_bit_test(int nr, const volatile unsigned long *addr)
|
static inline bool env_bit_test(int nr, const volatile unsigned long *addr)
|
||||||
|
Loading…
Reference in New Issue
Block a user