From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B7D1DC433E6 for ; Thu, 14 Jan 2021 13:00:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9198223A59 for ; Thu, 14 Jan 2021 13:00:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728818AbhANNAM (ORCPT ); Thu, 14 Jan 2021 08:00:12 -0500 Received: from hqnvemgate26.nvidia.com ([216.228.121.65]:8307 "EHLO hqnvemgate26.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728772AbhANNAI (ORCPT ); Thu, 14 Jan 2021 08:00:08 -0500 Received: from hqmail.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate26.nvidia.com (using TLS: TLSv1.2, AES256-SHA) id ; Thu, 14 Jan 2021 04:59:27 -0800 Received: from localhost (172.20.145.6) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Thu, 14 Jan 2021 12:59:26 +0000 Date: Thu, 14 Jan 2021 14:59:23 +0200 From: Leon Romanovsky To: Jason Gunthorpe CC: Sagi Grimberg , Max Gurtovoy , , , , Israel Rukshin Subject: Re: [PATCH 3/3] IB/isert: simplify signature cap check Message-ID: <20210114125923.GP4678@unreal> References: <20210110111903.486681-1-mgurtovoy@nvidia.com> <20210110111903.486681-3-mgurtovoy@nvidia.com> <20210114072938.GM4678@unreal> <20210114124939.GG4147@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20210114124939.GG4147@nvidia.com> X-Originating-IP: [172.20.145.6] X-ClientProxiedBy: HQMAIL105.nvidia.com (172.20.187.12) To HQMAIL107.nvidia.com (172.20.187.13) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1610629167; bh=b8s7Vm8a98bxKAaPzT9DXeaLUolgMIt1FYksj7bvdEI=; h=Date:From:To:CC:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To:X-Originating-IP: X-ClientProxiedBy; b=PXOa+WeQre2jSJYIDm8tzcX+Zu9wjK/nO1Z5V/ms4F7kgK6A7qHffxHl53sODb+on rXeYEDJAq/qD6r+It7hy2y1lqkfPzYjjIr4zxsxbSj+TB9oAZiP5zPRLEl28/GqqzX p+iu22h0WTL64eNVkEpSse3KBcwfon2faxB+iX6mg08O6j/C7rnE2h0fk4XFWpu0DN XVh67JvFizps0mnJG1un2sbtPKlpr+lpYOJmKCj1kTaZCEOxeeeyuEG68pg6ERC8d1 FHmSOAQXsMCTkWvy8bhNwdQYNz0cwb/yPEAt+mhS02xkyNtyR9iAKoy3Kx1kmwK2Ah awMYem3u4SPvg== Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org On Thu, Jan 14, 2021 at 08:49:39AM -0400, Jason Gunthorpe wrote: > On Thu, Jan 14, 2021 at 09:29:38AM +0200, Leon Romanovsky wrote: > > On Wed, Jan 13, 2021 at 04:08:29PM -0800, Sagi Grimberg wrote: > > > > > > > Use if/else clause instead of "condition ? val1 : val2" to make the code > > > > cleaner and simpler. > > > > > > Not sure what is cleaner and simpler for a simple condition, but I don't > > > mind either way... > > > > Agree, probably even more cleaner variant will be: > > device->pi_capable = !!(ib_dev->attrs.device_cap_flags & IB_DEVICE_INTEGRITY_HANDOVER); > > Gah, !! is rarely a sign of something good.. You see, three of us see same code differently. > > Jason