Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp1200711rwl; Sat, 25 Mar 2023 20:33:38 -0700 (PDT) X-Google-Smtp-Source: AKy350box8zlh8MXNSR+50n5jBzEkHrNAuGe8m0Pl1EsTkkXNH7k3ZnK8R9+TF9DGco3y9BJES7b X-Received: by 2002:a17:903:228f:b0:19d:62b:f040 with SMTP id b15-20020a170903228f00b0019d062bf040mr9909799plh.37.1679801618227; Sat, 25 Mar 2023 20:33:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679801618; cv=none; d=google.com; s=arc-20160816; b=q4oYhFc0wGviS4/b9y1JhFinD3yW0JwziU9hfTfETWW2rlfBfSmZFYaeK967qwSULu fvKk1iZ9eaYQpCjI2WOnpJSIf6IYw00nZMGtbRiUYVXdhTCpyAUkqdhQd4j0ZPRMeLF5 x5gMUVtAurAGdpB0wUemxtT4WXvhDe1HhcEJmAbfYsYe2zbXOppcQSX+atPh11LzYjTh GpLN9h7NnTsLgWNkKfd/vyNzjGepMJGgvH+ymlQkS89ZeG58C7i4CsOvThMNLpPnYAUH 7Qr6mRAuAYDSMaN6O10QbYUDaLo0HKJlqFsUtf8kcIGigN86SO8T5WHB4qIeuBHZEnNa 8ZeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=QJXwUATP+VDr4imGtf+OtzrCNdoqnl+qk6pd1rJAqno=; b=SnzieK2ChM2+l8qgHlkeoD/cvpBbRK+LXxgF7EDmB64sjLVqh2sGiT+zWcuvzmebZe k84kCmqjOj1r6YNCbnayzPkjjN1AymOtpcMEpVj3hvs99m0E5g2F5UpiyaqvlZ5XGr8J ntnd13lmFGhuf1OxvUyTsAbTkTd2kOOYuC8CfaRSs1DVYJdym0r3irGKZ+kmpd15nkh8 YnwyrcFSSvLsKiIrXc+S0PiphCI66dS2BaoFwZ3XA8I+07k3VxHLmxz5lOuX+EfiwdBa V8UCbIwZoXRbRNDFJJ/bquMEcYFuOpjviRNW0Nbdy561J71gAqYAsnqrLtIwEt7UR2t3 Mmpg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=cNEjgFA7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l11-20020a170903244b00b0019f28f4a6c3si26124687pls.478.2023.03.25.20.33.26; Sat, 25 Mar 2023 20:33:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=cNEjgFA7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230087AbjCZDRc (ORCPT + 99 others); Sat, 25 Mar 2023 23:17:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37288 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229643AbjCZDRb (ORCPT ); Sat, 25 Mar 2023 23:17:31 -0400 Received: from mail-pl1-x62c.google.com (mail-pl1-x62c.google.com [IPv6:2607:f8b0:4864:20::62c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0BC59AF38 for ; Sat, 25 Mar 2023 20:17:30 -0700 (PDT) Received: by mail-pl1-x62c.google.com with SMTP id kq3so5467411plb.13 for ; Sat, 25 Mar 2023 20:17:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1679800649; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=QJXwUATP+VDr4imGtf+OtzrCNdoqnl+qk6pd1rJAqno=; b=cNEjgFA7QXYvPrGtk62VaYUAPZRIvm45tGOhXJzFkYCmXlyP1JRo56u2Kj3pJwizZx t26m/Cq/4wp2CZPRHl9mCcpOu7ppiSj51l/2TTMztgZ+e9pvJvEDp8+duoXGbuJDWk4I 10PzKf65I3irFTHS0GlSdGasnugnFmWnQJPyc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679800649; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=QJXwUATP+VDr4imGtf+OtzrCNdoqnl+qk6pd1rJAqno=; b=mRz+UULOs41ANKwyF2NfbJ4N4hPUy37PYbhkG1a+iYGk2IWCP/PD+ZAE1vgu38Cqhk MRJQBlfaDx5b1ZJYrzWZ9w1AGQLnCT0fHVtSOJDWVDvQIHHQjLC0J5PCCoH5ppNHIUr8 b4noVFyjPyRlnIVL7I2K712qd7+wgd5Iot5derTEs9E+PMmI3sX5xQEo7NjpXmfpGCUo QB6Ci7ZC6hvuSvnbbxEF4DaDX8NAvHtu/N3hEVRJyQ9/UK7+LlXSIrwWclyPaMbw1X3B n38mtnKlXnnO5vT73aLDKL1pGKFjztsbQq3GxBPN7WyWsGXgxXcnN8SSbLZMSGxuNwn1 EnZQ== X-Gm-Message-State: AAQBX9eduY7d6x+7g5PCKUPArR1ZoCR/2uzTyphp/5PvCspAThtL0XgF FMeRUnbHOFbZ2r9iD38LJKDMLA== X-Received: by 2002:a17:90b:1b48:b0:23f:7770:9e75 with SMTP id nv8-20020a17090b1b4800b0023f77709e75mr8409217pjb.47.1679800649460; Sat, 25 Mar 2023 20:17:29 -0700 (PDT) Received: from google.com (KD124209188001.ppp-bb.dion.ne.jp. [124.209.188.1]) by smtp.gmail.com with ESMTPSA id d3-20020a170902728300b0019c32968271sm16548162pll.11.2023.03.25.20.17.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 Mar 2023 20:17:28 -0700 (PDT) Date: Sun, 26 Mar 2023 12:17:23 +0900 From: Sergey Senozhatsky To: Liu Shixin Cc: Seth Jennings , Dan Streetman , Vitaly Wool , Andrew Morton , Nathan Chancellor , Christoph Hellwig , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH -next v7 2/4] mm/zswap: skip invalid or unchanged parameter Message-ID: <20230326031723.GD3269998@google.com> References: <20230325071420.2246461-1-liushixin2@huawei.com> <20230325071420.2246461-3-liushixin2@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230325071420.2246461-3-liushixin2@huawei.com> X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.