[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230326031723.GD3269998@google.com>
Date: Sun, 26 Mar 2023 12:17:23 +0900
From: Sergey Senozhatsky <senozhatsky@...omium.org>
To: Liu Shixin <liushixin2@...wei.com>
Cc: Seth Jennings <sjenning@...hat.com>,
Dan Streetman <ddstreet@...e.org>,
Vitaly Wool <vitaly.wool@...sulko.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Nathan Chancellor <nathan@...nel.org>,
Christoph Hellwig <hch@....de>, linux-kernel@...r.kernel.org,
linux-mm@...ck.org
Subject: Re: [PATCH -next v7 2/4] mm/zswap: skip invalid or unchanged
parameter
On (23/03/25 15:14), Liu Shixin wrote:
> static int zswap_enabled_param_set(const char *val,
> const struct kernel_param *kp)
> {
> + bool res;
> +
> + if (kstrtobool(val, &res))
> + return -EINVAL;
> +
> + /* no change required */
> + if (res == *(bool *)kp->arg)
> + return 0;
Bool kernel param can be any of these letters 'YyTt1NnFf0'. Doing things
to kp->arg outside of kernel/params.c is not going to be easy, let's not
even try.
Powered by blists - more mailing lists