Received: by 2002:ab2:3c46:0:b0:1f5:f2ab:c469 with SMTP id x6csp119928lqf; Fri, 26 Apr 2024 01:10:29 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVttfOvHoTV6oFAKHR75+1dQQjR3EHTGzkNaRKZqniniTZnpVR9KFT8N53nfHTbLpOHa/Ln376+zdhKtiu0qIz28a1yvBmXxkMC6uCx4Q== X-Google-Smtp-Source: AGHT+IEuDfUxRGAkDv4hEau/ebik1B+faQ8IqqBEf7PDocVzCXy5IPfq80HttRylduRDV+AxENll X-Received: by 2002:a05:6214:20a5:b0:6a0:5978:40fc with SMTP id 5-20020a05621420a500b006a0597840fcmr2746459qvd.61.1714119028957; Fri, 26 Apr 2024 01:10:28 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714119028; cv=pass; d=google.com; s=arc-20160816; b=CFyRi1ymoo/cDBvseyDuMTVIy30Clv3JoECJkLWQ4lu4ERgoeB0lDnrCIUWl4quf6T Ox62E7X2BZpb0hmohmzDcQopJmA8Mb0p1iyzDssLbn1cgTq6h0IXBhA5woLJn9TfzPYm XibmSsLSzr34oYvbrwB34uylHS2a+hdnB/KW9zpvsixXy7vj29TnREy2GxRb10yF5VeW i4HuYz4FwUlR2tJrCjv4qt2XF4CJJdtmZd5L03b2BSPq1QOXb5lPd3y7DbEQhFSMxzin wdQVKjfNVVUANzURvaAEhYnYc3q9rGSOEv2jsy5xV192AvxgaIskr1d48ycmrhY/QEXe A6Rw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to:subject :user-agent:mime-version:list-unsubscribe:list-subscribe:list-id :precedence:date:message-id:dkim-signature; bh=LqTCDfOvqx5Lob56/bz2l5pUtBO3pVveHPT6+RnNkLw=; fh=qftR1lX04r1lrTfmSwNHt8rO0jp1MtIlg+JFmNQ0oF4=; b=CCUMUUAIhQ7RfK1PF8Y3LadQcYTunQ+fwL4P2hXXhzkocttp9FF/wss51Bm6WxwKMw 6lGptKoCylvGcqMZGqBrJ1oHRzbsxskm/q6P+2hq/kKQemurY9OwXAtfjItB0QI47Fal 14uehV/C6dHa3IOFLnWt0cv0u7AzLksWmtBBwE1gBk4HPJjUxtDJGfZaVW1ixOR5jZzw 81nocxakfQdeCeJCRjJl8QQ9T2ghyXDCRGMahm8xRI8V97e4v2kZftTMbYGs+2bj2qB3 R/g4wC0Yt9lBxMB9gDu6Sn++JmNFw3/02aLXtOFxgoSjjQMUxp2LNL5Aq084ULTfDX0G LxCA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.alibaba.com header.s=default header.b=sm0X5f7R; arc=pass (i=1 spf=pass spfdomain=linux.alibaba.com dkim=pass dkdomain=linux.alibaba.com dmarc=pass fromdomain=linux.alibaba.com); spf=pass (google.com: domain of linux-kernel+bounces-159678-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-159678-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.alibaba.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id jz15-20020a0562140e6f00b006a0b3d42489si15376qvb.454.2024.04.26.01.10.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Apr 2024 01:10:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-159678-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.alibaba.com header.s=default header.b=sm0X5f7R; arc=pass (i=1 spf=pass spfdomain=linux.alibaba.com dkim=pass dkdomain=linux.alibaba.com dmarc=pass fromdomain=linux.alibaba.com); spf=pass (google.com: domain of linux-kernel+bounces-159678-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-159678-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.alibaba.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 92F611C21F7A for ; Fri, 26 Apr 2024 08:10:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2096613C9B0; Fri, 26 Apr 2024 08:10:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b="sm0X5f7R" Received: from out30-113.freemail.mail.aliyun.com (out30-113.freemail.mail.aliyun.com [115.124.30.113]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 14440762EF; Fri, 26 Apr 2024 08:10:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=115.124.30.113 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714119021; cv=none; b=kGHEJWH6HfRsV1KxdBnuL9QYG8d9Yv+2TVM2Oz8BeISlAqK7toRgRxXzWAbF2qLOZlRH3TaQgB4h3cmrnqCO3qin24a2ZFJm5wSZRVYssi5KmEU8CebBKehIfktc/aPwxazdtbU/LxDTwuN4vpxx3mmA91+ceadCD9B6q7qmJ/4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714119021; c=relaxed/simple; bh=oMB+Km3ROuQXEtGaucBP0IGrOeqCJyyO49IIKi+QrCI=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=Hy6biYwZv7fCogfE62Kj5Pz4JnYW5oFJZObuI0p0Oe6neDM10G3p7zDi8/1DxcVa9M8Qc4zUkclV84l5i5saxrDnlmojOJCRFFJyJpYhDIJAk14A1CMryVRcheb1yk7EE/u8/vUwk6T/cB5C+WJkNmVtFmeTP4Uv9f6zB+bTWZs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com; spf=pass smtp.mailfrom=linux.alibaba.com; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b=sm0X5f7R; arc=none smtp.client-ip=115.124.30.113 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.alibaba.com DKIM-Signature:v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.alibaba.com; s=default; t=1714119012; h=Message-ID:Date:MIME-Version:Subject:To:From:Content-Type; bh=LqTCDfOvqx5Lob56/bz2l5pUtBO3pVveHPT6+RnNkLw=; b=sm0X5f7Rvmy8A/Abb6O1/lfgwMo1zfKfvlTyCN40Hc8UP64TbgZaBiUqcMBseLrrQhJZ1eN8/0AgWoW4IW6aksFpRgjQFtTlx+g8jwhb/+XXFIT5Z2E1+N+98Ps8p4DyH7Gqx9XAuZtWH9sYuaOoBdrmiQRpKOt266drOMhGjLE= X-Alimail-AntiSpam:AC=PASS;BC=-1|-1;BR=01201311R821e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=maildocker-contentspam033045046011;MF=guwen@linux.alibaba.com;NM=1;PH=DS;RN=18;SR=0;TI=SMTPD_---0W5IVQN-_1714118996; Received: from 30.221.129.216(mailfrom:guwen@linux.alibaba.com fp:SMTPD_---0W5IVQN-_1714118996) by smtp.aliyun-inc.com; Fri, 26 Apr 2024 16:10:11 +0800 Message-ID: <3279bc99-0dc7-4cbe-b7a4-88e877b84251@linux.alibaba.com> Date: Fri, 26 Apr 2024 16:09:56 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH net-next v6 07/11] net/smc: register loopback-ism into SMC-D device list To: Wenjia Zhang , Alexandra Winter , twinkler@linux.ibm.com, hca@linux.ibm.com, gor@linux.ibm.com, agordeev@linux.ibm.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, jaka@linux.ibm.com Cc: borntraeger@linux.ibm.com, svens@linux.ibm.com, alibuda@linux.alibaba.com, tonylu@linux.alibaba.com, linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org, netdev@vger.kernel.org References: <20240414040304.54255-1-guwen@linux.alibaba.com> <20240414040304.54255-8-guwen@linux.alibaba.com> <23cff564-a65c-4db6-a386-2a7e56be84c8@linux.ibm.com> From: Wen Gu In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 2024/4/26 16:04, Wenjia Zhang wrote: > > > On 25.04.24 15:29, Alexandra Winter wrote: >> >> >> On 25.04.24 13:29, Wenjia Zhang wrote: >>>> +    if (!smcd->pnetid[0]) { >>>> +        fentry = list_first_entry_or_null(&smcd_dev_list.list, >>>> +                          struct smcd_dev, list); >>>> +        if (fentry && smc_ism_is_loopback(fentry)) >>>> +            list_add(&smcd->list, &fentry->list); >>>> +        else >>>> +            list_add(&smcd->list, &smcd_dev_list.list); >>>> +    } else { >>>>            list_add_tail(&smcd->list, &smcd_dev_list.list); >>>> -    else >>>> -        list_add(&smcd->list, &smcd_dev_list.list); >>>> +    } >>> >>> Nit: here the pair of curly brackets are unnecessary. >> >> Actually >> https://www.kernel.org/doc/html/latest/process/coding-style.html#codingstyle >> tells you to use those braces. > Thanks, @Alexandra! > Then @Wen, forget my comments on this pls! OK, Wenjia. Thanks!