Re: [PATCH] mm: memcontrol: Assign boolean values to a bool variable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Nov 7, 2020 at 1:55 PM <xiakaixu1987@xxxxxxxxx> wrote:
>
> From: Kaixu Xia <kaixuxia@xxxxxxxxxxx>
>
> 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 <tencent_os_robot@xxxxxxxxxxx>
> Signed-off-by: Kaixu Xia <kaixuxia@xxxxxxxxxxx>

Acked-by: Souptick Joarder <jrdr.linux@xxxxxxxxx>

> ---
>  mm/memcontrol.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/mm/memcontrol.c b/mm/memcontrol.c
> index 3dcbf24d2227..60147cf9f0c0 100644
> --- a/mm/memcontrol.c
> +++ b/mm/memcontrol.c
> @@ -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
>
>




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux