Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp1163269rwb; Tue, 4 Oct 2022 16:45:24 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4GAsc5+k0wpF9wRq8qOpfDNFhA3UC5/k+4qYCn2rkGruBcoUntoRLwUeiNR+GwDW/LOXxb X-Received: by 2002:a63:8548:0:b0:44b:89d5:710 with SMTP id u69-20020a638548000000b0044b89d50710mr13674678pgd.124.1664927124621; Tue, 04 Oct 2022 16:45:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664927124; cv=none; d=google.com; s=arc-20160816; b=OGGrd7FgciHhrL8PYSrozzwSZrLEUmnPOhzzD3dJnR4SCH0yp4Ndqb0gyiWHT6ZHz8 OLhkYMyWi1kcRBt949XEvNJxmjR3RzYUkrk/FesMi8SAgKTpV0z4GIFBAxQOWZINDU6H K+uM4KFUT9nLWUWO97VC1l1cvzIA7Lht8m6bZCP1BMU60eXuTyqPLYVsDzhMlFJIrPHI F/vydauKpgvjhNqaxpCm2SCB+vOwlzNAy6eQXc0pNZjuH1gRv1ADp34cmJXoV+jonqPH ja7CC5rpjzeLBN2VqWyrBwQJriLaOD21QziwONu8JLqx3nl+Mv2jzAiuTfac6uoCC6Sc /uzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=7/Ozj3mcJHGAbiaTjJPeg1Cq0BOU1VOEYEwFpmEWKCM=; b=PC83roY8Ids+PyROW8AvQkw/cQoNeRDnRmHQwUgAO/sUHQwsHf9roVccBNTe0tFO+B RQvDPlGlt/SCzAR5NOXRd/pmgQjLMVsDqpW/9jXhUoXGzR/rI6abNpOQBeg0wLEuag6e GHQiCEJc7CxEiFaA5VAekuoqEfC/vFzm929ZpWMY/rq7Ak1SWX/IJe+1oTfjgzBg3lTr YjY9+Bj43lMN9742BaP8rnovbHDA/dXFsJVxSqpfGDLAzXBnruVQllaK0iAr7xvjaiKT dgLxWjzNh2x3yGSMM8cIxkyWWKIre1HTi2GQ6AEhhdng2cLy2ah1Zeg747nnZBhfCb2w TSbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=llPMwaCi; 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=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id oc4-20020a17090b1c0400b002004c680032si346154pjb.160.2022.10.04.16.45.12; Tue, 04 Oct 2022 16:45:24 -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=@google.com header.s=20210112 header.b=llPMwaCi; 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=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230112AbiJDX0X (ORCPT + 99 others); Tue, 4 Oct 2022 19:26:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60440 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229529AbiJDX0S (ORCPT ); Tue, 4 Oct 2022 19:26:18 -0400 Received: from mail-pj1-x1030.google.com (mail-pj1-x1030.google.com [IPv6:2607:f8b0:4864:20::1030]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3701E66138 for ; Tue, 4 Oct 2022 16:26:18 -0700 (PDT) Received: by mail-pj1-x1030.google.com with SMTP id g1-20020a17090a708100b00203c1c66ae3so251925pjk.2 for ; Tue, 04 Oct 2022 16:26:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date; bh=7/Ozj3mcJHGAbiaTjJPeg1Cq0BOU1VOEYEwFpmEWKCM=; b=llPMwaCiE9svemlfZqli62QUjvnug0AjUfYmUGejcxHbeFLQzrs63Wval4R32RWsHg +Az6jF6ioPj+7Fo1t2L69xg0tVVHdFxCe0D/voKanm4stAdZgmX5t5qodEVHpZDgd0+9 56jlkNiFTjn62io5dQDAzOfNUjkhCdtYYRpGoxxDGgQQznSmN7+9ms/r3VLqSw27je47 J8PhqljQ1VWp5tNzLNZXgCU7ZqRYvwMf3ZKhF0Y8kcOXuUcx77j8vwD+/0La/xJ5oZFv 15F+xfb1NOIy87TBxyHwpuO9j8I9PYX0kQ4b/HgxO2hq2bePBhWZV31DjFCmOn90fDQh b4rA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date; bh=7/Ozj3mcJHGAbiaTjJPeg1Cq0BOU1VOEYEwFpmEWKCM=; b=QORBEs/VSEKxsnWtujecwaWMFtiZvQoBJahCHp6LdmJVr2oBaNbCGzY6U06v3sgiyB ggSDDAPw9bfAYmxn7q9C7QrFCxJ9NX2lcpxQa33QCCZqs2Gx6I4rT84/brUFld38X2K9 OU0XoDVWJpRLlCUDoxYG2fJh1ULRxDzdsTXLJS5qIVEBuC/k1lmGiqSYwmiXtX4Wtdw5 aCCTUb0tV8GA7kDthUk0la05HK3q37q4WL6NAz8XeTaVajHQKSAStAWsD769EDii9Ulu FMkDk/KauYxWhCiyiS7G61bB4xtBAEmcjVJUY29cWKcKRsRPLUDghygR036iI7MovGa8 f9nA== X-Gm-Message-State: ACrzQf2ke3NHQyRxqkHNps1BhDRW+ubu9zYxKGhG0iUENcNMM0JYtK60 QL5pqxEC1EQLJyHOVEtHd92iE7H/kLXciu+Es3oTHA== X-Received: by 2002:a17:90b:33c3:b0:20a:ebc3:6514 with SMTP id lk3-20020a17090b33c300b0020aebc36514mr641575pjb.147.1664925977583; Tue, 04 Oct 2022 16:26:17 -0700 (PDT) MIME-Version: 1.0 References: <20221004232359.285685-1-nathan@kernel.org> <20221004232359.285685-2-nathan@kernel.org> In-Reply-To: <20221004232359.285685-2-nathan@kernel.org> From: Nick Desaulniers Date: Tue, 4 Oct 2022 16:26:05 -0700 Message-ID: Subject: Re: [PATCH -next v2 2/2] fs/ntfs3: Eliminate unnecessary ternary operator in ntfs_d_compare() To: Nathan Chancellor Cc: Konstantin Komarov , Tom Rix , ntfs3@lists.linux.dev, llvm@lists.linux.dev, patches@lists.linux.dev, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL 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: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 4, 2022 at 4:24 PM Nathan Chancellor wrote: > > 'a == b ? 0 : 1' is logically equivalent to 'a != b'. > > Suggested-by: Nick Desaulniers > Signed-off-by: Nathan Chancellor Thanks for the patch! Reviewed-by: Nick Desaulniers > --- > > v2: New patch. > > fs/ntfs3/namei.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/fs/ntfs3/namei.c b/fs/ntfs3/namei.c > index 5d3a6ce3f05f..6b0d2c01d6ff 100644 > --- a/fs/ntfs3/namei.c > +++ b/fs/ntfs3/namei.c > @@ -432,7 +432,7 @@ static int ntfs_d_compare(const struct dentry *dentry, unsigned int len1, > /* First try fast implementation. */ > for (;;) { > if (!lm--) > - return len1 == len2 ? 0 : 1; > + return len1 != len2; > > if ((c1 = *n1++) == (c2 = *n2++)) > continue; > -- > 2.37.3 > -- Thanks, ~Nick Desaulniers