Re: [PATCH -next v7 2/4] mm/zswap: skip invalid or unchanged parameter

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

 



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.




[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