Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp167845pxb; Thu, 31 Mar 2022 02:21:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzb0D21HVljZ7c2sfQ4PDgsXdmeZhvQM+T9tCIUpMDlf1HH/tw6lOcZXsN8T81/VAoCm2rT X-Received: by 2002:a05:6402:34c1:b0:419:585a:f383 with SMTP id w1-20020a05640234c100b00419585af383mr15457561edc.65.1648718491295; Thu, 31 Mar 2022 02:21:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648718491; cv=none; d=google.com; s=arc-20160816; b=BjRHikMOQnKguo5xUw0iuNk5KCtCJQbS+VlWNBaSIOtHN0ugBWsmP2Poo6QivpHHpA xiAMHXj7HshjjUKEjz+iINL0r4Q+ZnKkKEqykKHVni7a3h0arJ7wF3kESHrNQ1+5QwId 5xp8IrGVH/TGnLy9vboZnFvNc7L92pSRSfgHo/oPbyVEL8KoEpotGsdKURdR5mFrz+dG QZjsNH/z2lPwy3sYFZAYqeXCrtWHe2SBu9MwZRkFOi80uK3tKa/eWn4rev+Af49BETMU y7qVpCHoBCaebilavHj/ZLW+OiVXI3p8Tm6HrUgzNBIudOVujpU1gg9AG9qb+iYnBzUu 0AJw== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=n7Ko0itM2iz/JBgfQFFvc2tiUoeGM5Uytj/YDQlmDhs=; b=hAN29Wcmwgr/1flsVOHsTYf6TwSFNjLyFWtSyQvBKl0Ba2nEjKSAV5qLE+DEsho2XK XHmupMRDFsxN9EmfgVheV+6ZzCm6V2FnBZBCo74y+kaW/8plbJHg14zszyp8VzQeQywk YehZX3XSPRAY5RPC8hGyHnr6OkvgNMEkn+4LMKlBOU15G6fUv5jcMdRCpL+DHyZPiG4x a3Ar05ABbgiETMGKyHeo2X8BfVMdRPxyPoKjrNlgm8ERqklQj0RRRmCAd9qZ9t8VnakY fbZiwMta6uZHx35/h1YuIQcPLn48POSLhE8/SoiO8WeFKsHtL9hiRemiZMEhLUQs0mDp lGlw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=WXCEVL+6; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h10-20020a1709067cca00b006df76385c2fsi23928312ejp.207.2022.03.31.02.20.51; Thu, 31 Mar 2022 02:21:31 -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=@kernel.org header.s=k20201202 header.b=WXCEVL+6; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233569AbiCaJHa (ORCPT + 99 others); Thu, 31 Mar 2022 05:07:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42174 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231781AbiCaJH3 (ORCPT ); Thu, 31 Mar 2022 05:07:29 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 23298C1E; Thu, 31 Mar 2022 02:05:43 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id A577B6199D; Thu, 31 Mar 2022 09:05:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8B9DDC340EE; Thu, 31 Mar 2022 09:05:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1648717542; bh=O9mbqJV3/2zhXLz1A++FCmBwPUA6tFJLaXZiovQ4JXY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=WXCEVL+6+yKs1Zpypor4ip+GLvHnIJ+ifBVaCT8mlroDbv0hrI9ei/XyQ0BqEGK/d PgJ2dduYgYovBlHn2DbOX8k22xPW/AZ5VEydxBQEwpwg8PISd6fR1XLxdFeFPJnOIq JTt3qfQuPt7cSwa4+7eGS/mfEg+dgDB+ZQ4NunedczqUifYdmvSjkpewwx6F2BJhuj 4NjcuX2DzVXERGzgqZpgV/xq2eE3bcUlfDI1UBqHhN/wFvMd93M5M6lC0r1E1BwfqS SnXT8uaBJN8+eLp1+tlse+A2WWvTH5+9vAYVbX7rjdl/VffAzIrNmHrDLQMORUvm0+ XS1OH0sjygmpw== Date: Thu, 31 Mar 2022 12:05:34 +0300 From: Leon Romanovsky To: Guo Zhengkui Cc: Haakon Bugge , Mustafa Ismail , Shiraz Saleem , Jason Gunthorpe , Yishai Hadas , OFED mailing list , open list , "zhengkui_guo@outlook.com" Subject: Re: [PATCH linux-next] RDMA: simplify if-if to if-else Message-ID: References: <20220328130900.8539-1-guozhengkui@vivo.com> <76AE36BF-01F9-420B-B7BF-A7C9F523A45C@oracle.com> <93D39EC2-6C71-45D8-883A-F8DAA6ECFEDF@oracle.com> <38d43b49-9999-af2d-e3cd-3917c481651b@vivo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <38d43b49-9999-af2d-e3cd-3917c481651b@vivo.com> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 Thu, Mar 31, 2022 at 11:03:30AM +0800, Guo Zhengkui wrote: > On 2022/3/30 20:56, Leon Romanovsky wrote: > > On Wed, Mar 30, 2022 at 12:26:51PM +0000, Haakon Bugge wrote: > > > > > > > > > > On 30 Mar 2022, at 13:32, Leon Romanovsky wrote: > > > > > > > > On Wed, Mar 30, 2022 at 11:06:03AM +0000, Haakon Bugge wrote: > > > > > > > > > > > > > > > > On 30 Mar 2022, at 13:02, Leon Romanovsky wrote: > > > > > > > > > > > > On Mon, Mar 28, 2022 at 09:08:59PM +0800, Guo Zhengkui wrote: > > > > > > > `if (!ret)` can be replaced with `else` for simplification. > > > > > > > > > > > > > > Signed-off-by: Guo Zhengkui > > > > > > > --- > > > > > > > drivers/infiniband/hw/irdma/puda.c | 4 ++-- > > > > > > > drivers/infiniband/hw/mlx4/mcg.c | 3 +-- > > > > > > > 2 files changed, 3 insertions(+), 4 deletions(-) > > > > > > > > > > > > > > > > > > > Thanks, > > > > > > Reviewed-by: Leon Romanovsky > > > > > > > > > > Fix the unbalanced curly brackets at the same time? > > > > > > > > I think that it is ok to have if () ... else { ... } code. > > > > > > > > > Hmm, doesn't the kernel coding style say: > > > > > > "Do not unnecessarily use braces where a single statement will do." > > > > > > [snip] > > > > > > "This does not apply if only one branch of a conditional statement is a single statement; in the latter case use braces in both branches" > > > > ok, if it is written in documentation, let's follow it. > > > > Thanks for pointing that out. > > Should I resubmit the patch including unbalanced curly brackets fixing? If > not, I can submit another patch to fix this problem. Your patch wasn't merged yet, so new version should be sent. Thanks > > > > > > > > > > > > Thxs, H?kon > > > > > > > > > > > > > > There is one place that needs an indentation fix, in mlx4, but it is > > > > faster to fix when applying the patch instead of asking to resubmit. > > > > > > > > thanks > > > > > > > > > > > > > > > > > > > Thxs, H?kon > > > > > Thanks, > > Zhengkui