summaryrefslogtreecommitdiff
path: root/drivers/acpi/dptf
diff options
context:
space:
mode:
authorJian Shen <shenjian15@huawei.com>2023-06-21 20:33:07 +0800
committerPaolo Abeni <pabeni@redhat.com>2023-06-23 10:59:17 +0200
commit9b476494da1aad70f4f083e853eb817bcb292d08 (patch)
treeb4bbe95e4256b2f4d1030749ff64751d19eaf8d6 /drivers/acpi/dptf
parente6988447c15d622d11c68250a33f47b3cacb66eb (diff)
net: hns3: refine the tcam key convert handle
The result of expression '(k ^ ~v) & k' is exactly the same with 'k & v', so simplify it. (k ^ ~v) & k == k & v The truth table (in non table form): k == 0, v == 0: (k ^ ~v) & k == (0 ^ ~0) & 0 == (0 ^ 1) & 0 == 1 & 0 == 0 k & v == 0 & 0 == 0 k == 0, v == 1: (k ^ ~v) & k == (0 ^ ~1) & 0 == (0 ^ 0) & 0 == 1 & 0 == 0 k & v == 0 & 1 == 0 k == 1, v == 0: (k ^ ~v) & k == (1 ^ ~0) & 1 == (1 ^ 1) & 1 == 0 & 1 == 0 k & v == 1 & 0 == 0 k == 1, v == 1: (k ^ ~v) & k == (1 ^ ~1) & 1 == (1 ^ 0) & 1 == 1 & 1 == 1 k & v == 1 & 1 == 1 Signed-off-by: Jian Shen <shenjian15@huawei.com> Signed-off-by: Hao Lan <lanhao@huawei.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'drivers/acpi/dptf')
0 files changed, 0 insertions, 0 deletions