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:
yidong0635 2020-09-29 06:29:39 -04:00 committed by Tomasz Zawadzki
parent 3844ffc1c2
commit 06b537bfdb

View File

@ -629,8 +629,7 @@ static inline void env_bit_clear(int nr, volatile void *addr)
char *byte = (char *)addr + (nr >> 3);
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)