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:
> +++ b/mm/zswap.c
> @@ -761,15 +761,15 @@ static int __zswap_param_set(const char *val, const struct kernel_param *kp,
>  	char *s = strstrip((char *)val);
>  	int ret;
>  
> +	/* no change required */
> +	if (!strcmp(s, *(char **)kp->arg) && zswap_has_pool)
> +		return 0;
> +
>  	if (zswap_init_failed) {
>  		pr_err("can't set param, initialization failed\n");
>  		return -ENODEV;
>  	}
>  
> -	/* no change required */
> -	if (!strcmp(s, *(char **)kp->arg) && zswap_has_pool)
> -		return 0;

I probably would suggest to simply remove `*(char **)kp->arg`
from zswap code entirely, it doesn't solve any real problem
(as far as I can tell).




[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