Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp3693959rwb; Sat, 12 Nov 2022 10:36:55 -0800 (PST) X-Google-Smtp-Source: AA0mqf6AKyaEKMld6YWnCiPjtyLcrN4qY13m9kQPa8MN6n8uXWSJCJXTaL0ERr9nhfCweLADPC5F X-Received: by 2002:a17:907:6f17:b0:791:9801:e48a with SMTP id sy23-20020a1709076f1700b007919801e48amr5548611ejc.738.1668278214983; Sat, 12 Nov 2022 10:36:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668278214; cv=none; d=google.com; s=arc-20160816; b=crAW4curaikoH4+H0Mq2LHHhypQwxElk0PXP3Zw5ZWJdzuoMOKmc06HJB9u/tA90b/ 7arJrD4FB5a5/706JFLPaN4aawv/JmydCWIA+I8d9SLt8ViagoMW9ZEDAicFKbma7IVt 81k20BD83yNbvIMwdqULS9tSkYCGNnArz7ksopiureTljmWoVlWBwrpMJY/xankLaTHs jIPuXu79rhoYIWLcHSks1RQdUiK7BrmD3MsxHoHVAfn56/rDkuAwfiuuYf46E3Kma/I7 vx1DX5LHhp3XPkBK0DbwkD9Mkq8LXY3xV4CovKGLbEHZfZfXopbA8/M3jfJrRFbSWuUQ axCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature:dkim-signature; bh=WKw6oiLpuQLfeOWVraEU9DSKkxzz8QF9fxnqbchto+8=; b=DzXaVppmy6dthqjk76WMo0erJP1/w4B8AZTJKgynSoIQpiIkquiYS0q4SbhtDUW6U1 T0XmEzZ/RpSU43+20VT15eAsymcuEd7Ux5EH6+1tKkaUJExNlS2tczjf55XLBAgM0TcQ kw2pFvJl7YwxBYAnB7oiFJrAwsKUB5DzVFSp1IwsEhVOKMq4dEr9jtKeyRLUUdcHOvCS J0N0eWv2e0Zw9rSHg61XVY40wySRxnwu1xt6DUYWVqDTFPfSfbYVraOJy6ggRinMmu8X SBnvw00tM0MPwi329a+A0KDDOL1I5wVliIrbYfkkgDzWuBHTe+/FXLDSWvUEitzOl0zN qMdQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@paragon-software.com header.s=mail header.b="n5/O+59I"; dkim=pass header.i=@paragon-software.com header.s=mail header.b=fAuIQhwD; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=paragon-software.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l19-20020a170906795300b00781c9c3b6f5si5506475ejo.474.2022.11.12.10.36.32; Sat, 12 Nov 2022 10:36:54 -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=@paragon-software.com header.s=mail header.b="n5/O+59I"; dkim=pass header.i=@paragon-software.com header.s=mail header.b=fAuIQhwD; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=paragon-software.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234995AbiKLSLP (ORCPT + 90 others); Sat, 12 Nov 2022 13:11:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41912 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231404AbiKLSLN (ORCPT ); Sat, 12 Nov 2022 13:11:13 -0500 Received: from relayaws-01.paragon-software.com (relayaws-01.paragon-software.com [35.157.23.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EE502EB7 for ; Sat, 12 Nov 2022 10:11:12 -0800 (PST) Received: from relayfre-01.paragon-software.com (unknown [172.30.72.12]) by relayaws-01.paragon-software.com (Postfix) with ESMTPS id 401AD1FE6; Sat, 12 Nov 2022 18:08:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paragon-software.com; s=mail; t=1668276499; bh=WKw6oiLpuQLfeOWVraEU9DSKkxzz8QF9fxnqbchto+8=; h=Date:Subject:To:CC:References:From:In-Reply-To; b=n5/O+59IXyqVt3DW9Pz9b3pGvXAgUcYH7sNaOKxWqTGquD6VvmYU2K613xXBrtBAi 31a6JQvE0wdJdvttQ98mm1ewm1e6TwQcyHSXGhppCD5GyxJwBDcDkFAlfqBUW/ltP1 C8IdAYtkidfUVNIkJ/jxVxtQlSxXWT+v7lgMblpQ= Received: from dlg2.mail.paragon-software.com (vdlg-exch-02.paragon-software.com [172.30.1.105]) by relayfre-01.paragon-software.com (Postfix) with ESMTPS id 05C7B26; Sat, 12 Nov 2022 18:11:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paragon-software.com; s=mail; t=1668276671; bh=WKw6oiLpuQLfeOWVraEU9DSKkxzz8QF9fxnqbchto+8=; h=Date:Subject:To:CC:References:From:In-Reply-To; b=fAuIQhwD7B0rPF/XzLU2Tta9W8xaRvI7IkwpIKr8MxlDHfxE3CXIuKUXcLpoJ2VIM yM5IWlxQdy32hrV0wV3RwupXvRXr8nEJrQn+oCKgI44luoAB719VnNImIcAbluwXai fvgoKIAKgTTHb8Pekf93zQmyczGENXGkrPWxkYUc= Received: from [172.30.8.65] (172.30.8.65) by vdlg-exch-02.paragon-software.com (172.30.1.105) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.7; Sat, 12 Nov 2022 21:11:10 +0300 Message-ID: Date: Sat, 12 Nov 2022 21:11:10 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH -next v2 2/2] fs/ntfs3: Eliminate unnecessary ternary operator in ntfs_d_compare() Content-Language: en-US To: Nathan Chancellor CC: Nick Desaulniers , Tom Rix , , , , References: <20221004232359.285685-1-nathan@kernel.org> <20221004232359.285685-2-nathan@kernel.org> From: Konstantin Komarov In-Reply-To: <20221004232359.285685-2-nathan@kernel.org> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [172.30.8.65] X-ClientProxiedBy: vdlg-exch-02.paragon-software.com (172.30.1.105) To vdlg-exch-02.paragon-software.com (172.30.1.105) X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,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: X-Mailing-List: linux-kernel@vger.kernel.org On 10/5/22 02:23, Nathan Chancellor wrote: > 'a == b ? 0 : 1' is logically equivalent to 'a != b'. > > Suggested-by: Nick Desaulniers > Signed-off-by: Nathan Chancellor > --- > > 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; Thank you for your work, applied! First patch was already applied.