mm: memcontrol: Assign boolean values to a bool variable
Subsystems (3)
PATCH 1/1 mm: memcontrol: Assign boolean values to a bool variable
From: Kaixu Xia <[email protected]>
Fix the following coccinelle warnings:
./mm/memcontrol.c:7341:2-22: WARNING: Assignment of 0/1 to bool variable ./mm/memcontrol.c:7343:2-22: WARNING: Assignment of 0/1 to bool variable
Reported-by Tosk Robot <[email protected]>
Signed-off-by Kaixu Xia <[email protected]>
--- mm/memcontrol.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
mm/memcontrol.c +2 -2
@@ -7349,9 +7349,9 @@ bool mem_cgroup_swap_full(struct page *page)static int __init setup_swap_account (char *s) {if (!strcmp (s,"1" )) - cgroup_memory_noswap =0 ; + cgroup_memory_noswap = false;else if (!strcmp (s,"0" )) - cgroup_memory_noswap =1 ; + cgroup_memory_noswap = true;return 1 ; }__setup ("swapaccount=" , setup_swap_account);
Signature · 1 line
2.20.0
Quoted 10 lines · On Sat, Nov 7, 2020 at 1:55 PM <[email protected]…
From: Kaixu Xia <[email protected]>
Fix the following coccinelle warnings:
./mm/memcontrol.c:7341:2-22: WARNING: Assignment of 0/1 to bool variable ./mm/memcontrol.c:7343:2-22: WARNING: Assignment of 0/1 to bool variable
Reported-by Tosk Robot <[email protected]>Signed-off-by Kaixu Xia <[email protected]>
Acked-by Souptick Joarder <[email protected]>
Quoted 24 lines
--- mm/memcontrol.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)mm/memcontrol.c +2
-3@@ -7349,9 +7349,9 @@ bool mem_cgroup_swap_full(struct page *page)static int __init setup_swap_account (char *s) {if (!strcmp (s,"1" )) - cgroup_memory_noswap =0 ; + cgroup_memory_noswap = false;else if (!strcmp (s,"0" )) - cgroup_memory_noswap =1 ; + cgroup_memory_noswap = true;return 1 ; }__setup ("swapaccount=" , setup_swap_account); --2.20.0