Message ID | 20221120155134.57193-1-haifeng.xu@shopee.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp1179444wrr; Sun, 20 Nov 2022 08:16:42 -0800 (PST) X-Google-Smtp-Source: AA0mqf7JoIQ0iRGLGazoN6LISButK3vd374PYneuF2iP7LRt7r7rQJXBfhNFVxmaT/qHMA8WWvYS X-Received: by 2002:a05:6402:1aca:b0:469:701b:588d with SMTP id ba10-20020a0564021aca00b00469701b588dmr2948332edb.384.1668961002492; Sun, 20 Nov 2022 08:16:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668961002; cv=none; d=google.com; s=arc-20160816; b=cKpse8eGJ+AOAuPLfokBsXnLg/TJtkubUOW+vJxsm/1ar94lsDG8NoXAdmDXzMbWyZ wG0SE5FwRBWRuQdEORGSwZ4UGEKr9v3osOe3lTLtBU37PDPrKbyubSxgxE0Q5+uuRiUR +wmXhQgoXCdPL8yhYWYQnQI15y3FGgivXo0GuyAyH7b8xtS+8pTtWLC7YCp7dcAajhyY +kG+8zBEMvTJAwtaZkVday5xHC+5sBE3Arun0V1r2q66kckt8HhhU0UpM7SitkTf4yMe sEha38HBiej3A0eBHoUBRnNahvUgIho3VrTd4YxOsn570Bz90v2w0GBhAlxkck6ByngU DyTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=DttQDPYJqDe2lRvTfIAZ96JFKMlEltVMw+oadVUR8gw=; b=kucT1uRVteW1TP+F0fOFDYWG9TIdDCuIKsSjxsAinSDHsC4xiwl2QQbhFSWia+/aRD XbCvPjxb4bVtbNsi64ORPPymb3WI2i8/f70p5uG1h6CLEg156PeGb5odSbFvckWquE59 9JpUuoKKMdNquJwzGz4LWRFNrf+tTlHJy3qTj1CRpiGYp7NBz3TvUm+YX6ZCa83k71le 3QZte/JSY41cFKAdwD4Y0tDPDDWfKR4tB9ADH1rJdFN9k457gE3lIJ1dc+R6Kx1GUkHH HF9kxg18xqAV2/crKCCoCLNcsLv9jyQbKJPg9lbJlLfaGIPp8CsCBCEwyeLlwY/xyexN Ir4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@shopee.com header.s=shopee.com header.b=jvTBchvE; 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=REJECT sp=REJECT dis=NONE) header.from=shopee.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ht10-20020a170907608a00b007ada03062e9si8570241ejc.415.2022.11.20.08.16.02; Sun, 20 Nov 2022 08:16:42 -0800 (PST) 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=@shopee.com header.s=shopee.com header.b=jvTBchvE; 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=REJECT sp=REJECT dis=NONE) header.from=shopee.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229672AbiKTPwB (ORCPT <rfc822;yuanzuo1009@gmail.com> + 99 others); Sun, 20 Nov 2022 10:52:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53952 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229641AbiKTPv7 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sun, 20 Nov 2022 10:51:59 -0500 Received: from mail-pf1-x432.google.com (mail-pf1-x432.google.com [IPv6:2607:f8b0:4864:20::432]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 29F8127CDB for <linux-kernel@vger.kernel.org>; Sun, 20 Nov 2022 07:51:59 -0800 (PST) Received: by mail-pf1-x432.google.com with SMTP id k15so9245157pfg.2 for <linux-kernel@vger.kernel.org>; Sun, 20 Nov 2022 07:51:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=shopee.com; s=shopee.com; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=DttQDPYJqDe2lRvTfIAZ96JFKMlEltVMw+oadVUR8gw=; b=jvTBchvEr1cpkAFx1KWphFje2d/lHBFdAMl2ic9Wwv3/qYiIPMqd8hNFjdxVP9FbzN dF2yWOgzqFAeYontau/3ftgNeLXDbjC5nUwoAqUNt/Kac3hPXAXK8fgWGKaf9j7wnLLa VjkRM8LZ/W+fFIBF4H0FTBGsQJs1pzPxuy1pLPYse4wEMFqMBYyl5w9TImS7Uky0NF7j 06iJOR7JYYmFAlA4TrEvplumSaDxcCuav2hg/OguaHJ7rXa0o7jes+q2qhfGqf4sTprt U9zx7uUHFKJ+eaDrV5maUiLIjC+jYvmzrJLpoEepYKHcf/GqKZBszq6VIipscvPNorrG k/RA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=DttQDPYJqDe2lRvTfIAZ96JFKMlEltVMw+oadVUR8gw=; b=o/cf4JKmXPwvrdipaz7I9i3x71xDSttCXyp5huiRJSpwLxUouYFiNRM+hsZ7PS91Yv xdfVFwVFcAPRsolPzE2xo5s57hrARkCtVirxVma4k5elMb5gzCZU/B4h4prMMlGSMcQv 5vwjQWlCKljtSTQz39mqxJdcGJm7EncIsAY4BSO4dz7dqmMa10DWVx6ruphD52hAy8K2 ZqitDDY4WjEc+x2MVtxoJJrm93APh3kv+Oa5U1FQKgT9+urgCp6pAGhu/fx3B6pMkS7g FKnFg6ZNnfwfkMDkeW/QIbRcZfx+pd+1uMBj6DXktFhXBVir+FKDzrldRcnODP8wBO+8 gBjg== X-Gm-Message-State: ANoB5pljxM+B9ZtdBj/YkgcEfjfHfeOf/gdmUONgGy/e+wxiJPZ4oVVK atZ575U+FBiTuAlaM94yKWqx4A== X-Received: by 2002:a63:f1d:0:b0:475:a06:50ae with SMTP id e29-20020a630f1d000000b004750a0650aemr1038849pgl.67.1668959518729; Sun, 20 Nov 2022 07:51:58 -0800 (PST) Received: from ubuntu-haifeng.default.svc.cluster.local ([101.127.248.173]) by smtp.gmail.com with ESMTPSA id p188-20020a625bc5000000b0056e32a2b88esm6730378pfb.219.2022.11.20.07.51.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 20 Nov 2022 07:51:58 -0800 (PST) From: "haifeng.xu" <haifeng.xu@shopee.com> To: tj@kernel.org Cc: lizefan.x@bytedance.com, hannes@cmpxchg.org, cgroups@vger.kernel.org, linux-kernel@vger.kernel.org, "haifeng.xu" <haifeng.xu@shopee.com> Subject: [PATCH] cgroup: Fix typo in comment Date: Sun, 20 Nov 2022 15:51:34 +0000 Message-Id: <20221120155134.57193-1-haifeng.xu@shopee.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=ham 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1750032452051502583?= X-GMAIL-MSGID: =?utf-8?q?1750032452051502583?= |
Series |
cgroup: Fix typo in comment
|
|
Commit Message
Haifeng Xu
Nov. 20, 2022, 3:51 p.m. UTC
Replace iff with if.
Signed-off-by: haifeng.xu <haifeng.xu@shopee.com>
---
kernel/cgroup/cgroup.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
On Sun, 2022-11-20 at 15:51 +0000, haifeng.xu wrote:
> Replace iff with if.
You can't do this without a more detailed analysis. iff means if and
only if (logical implies in both directions), which appears to be more
correct in the code being patched than if, which is logical implies in
only one direction only.
James
On 11/20/22 21:21, haifeng.xu wrote: > Replace iff with if. > > Signed-off-by: haifeng.xu <haifeng.xu@shopee.com> > --- > kernel/cgroup/cgroup.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/kernel/cgroup/cgroup.c b/kernel/cgroup/cgroup.c > index f2743a476190..93c5e50b1392 100644 > --- a/kernel/cgroup/cgroup.c > +++ b/kernel/cgroup/cgroup.c > @@ -814,7 +814,7 @@ static bool css_set_populated(struct css_set *cset) > * One of the css_sets associated with @cgrp is either getting its first > * task or losing the last. Update @cgrp->nr_populated_* accordingly. The > * count is propagated towards root so that a given cgroup's > - * nr_populated_children is zero iff none of its descendants contain any > + * nr_populated_children is zero if none of its descendants contain any > * tasks. > * > * @cgrp's interface file "cgroup.populated" is zero if both iff abbreviates to if and only if and it's a valid usage.
On 2022/11/21 00:38, Kamalesh Babulal wrote: > > > On 11/20/22 21:21, haifeng.xu wrote: >> Replace iff with if. >> >> Signed-off-by: haifeng.xu <haifeng.xu@shopee.com> >> --- >> kernel/cgroup/cgroup.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/kernel/cgroup/cgroup.c b/kernel/cgroup/cgroup.c >> index f2743a476190..93c5e50b1392 100644 >> --- a/kernel/cgroup/cgroup.c >> +++ b/kernel/cgroup/cgroup.c >> @@ -814,7 +814,7 @@ static bool css_set_populated(struct css_set *cset) >> * One of the css_sets associated with @cgrp is either getting its first >> * task or losing the last. Update @cgrp->nr_populated_* accordingly. The >> * count is propagated towards root so that a given cgroup's >> - * nr_populated_children is zero iff none of its descendants contain any >> + * nr_populated_children is zero if none of its descendants contain any >> * tasks. >> * >> * @cgrp's interface file "cgroup.populated" is zero if both > > iff abbreviates to if and only if and it's a valid usage. > Ok, thanks.
diff --git a/kernel/cgroup/cgroup.c b/kernel/cgroup/cgroup.c index f2743a476190..93c5e50b1392 100644 --- a/kernel/cgroup/cgroup.c +++ b/kernel/cgroup/cgroup.c @@ -814,7 +814,7 @@ static bool css_set_populated(struct css_set *cset) * One of the css_sets associated with @cgrp is either getting its first * task or losing the last. Update @cgrp->nr_populated_* accordingly. The * count is propagated towards root so that a given cgroup's - * nr_populated_children is zero iff none of its descendants contain any + * nr_populated_children is zero if none of its descendants contain any * tasks. * * @cgrp's interface file "cgroup.populated" is zero if both