Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp266151ybt; Tue, 7 Jul 2020 22:40:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwscst3Xt527D/IFlRasvkmJev8VBZKe3rZq/0mK+T2NqYua/Md/DE+AQMoPYhLz1T2IOwM X-Received: by 2002:a17:907:405e:: with SMTP id ns22mr48835632ejb.6.1594186841567; Tue, 07 Jul 2020 22:40:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594186841; cv=none; d=google.com; s=arc-20160816; b=hfczOIOb4h4Z6iv5yhqgxaMedf7a/+/0jwUFsN6TgscsXYKA9guullRLZk3oxqV+op 9gukJrXzmNs7MDgAqLk7kCZNpy/WRbiSj3lNbOqpsGdvtkG8C4a/dpdOaE2DERp6Nycy fcWv0pMES6dlATcxZ0FsePPiWEhjFD1lrM5j7sWoVBpDBCgMUMl31MyOJxvYnd5Yo4Px JGPRdqr4Zjwkgmyd4WL0Kil8Ns0HF+vTVvXM/xZJuc9Twm0A/pqpIgxcqesEdfE+1y9d 9hFhfAUrX+gqkWM7WNNbIxtGgkNpmT8T2/JRM0KFAtzcp8VLiM4Z5vE4bAjwM/e3wMCS yWsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=z6OXzBIY3v6E519CMuvXjj3JtFg6fdccwGcSJNO+mlQ=; b=bmWRHjMqw/z0j1iUCMVRotkJG4bN6s/NlGKocMMLXzpCBqtUy6ApS8X5wQyckLWeDK sKQEhCHHyhFyqZJmVQQEJWu/OF4AOoSWC4l7R5Gd4BdKYf2uZg43k7FYmmr8ScSqR/dK 2uzEQrpv1f7/Tw1I/ulLekWbi/bCY2RoSdAl0vD2WLucWyuOHzdwoBku1URIIN/llAF2 lq+00vpXn54YaCy4X0IElmSMqeNPlETpX7bH10hBuexuRVU2vTkofiLEw55mvc1BqQan QZ+P8XHMBLnQUVrJBy5GTdaSHlXHltBZkD/ulkR0NKe/1VKh4bRIqkUK7eAuLyPtieJo YFCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=H+a540DU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g10si582399edv.400.2020.07.07.22.40.18; Tue, 07 Jul 2020 22:40:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=H+a540DU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1729527AbgGHFeY (ORCPT + 99 others); Wed, 8 Jul 2020 01:34:24 -0400 Received: from mail.kernel.org ([198.145.29.99]:33390 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726206AbgGHFeX (ORCPT ); Wed, 8 Jul 2020 01:34:23 -0400 Received: from localhost (unknown [213.57.247.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9888120774; Wed, 8 Jul 2020 05:34:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1594186463; bh=SW6LMFRk9VIGcXiCDtCnGrDRmznPD9lQVczLeids3Bo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=H+a540DUwEUaR//CGkO2iMZGe5VIBKEdWrswDaaTal/dMh6YCExYECfR/TJGHWcDc 8HpRuYg6nrtCgvD/7SGu8dYh2AL6bwoYVZoBgSJyJpy71lvQnJqU8YI/cU3Ufq/Vpa QjqWaB89RIrqrPKVPF+WL8dbyZ2npdl+VEZM2xvk= Date: Wed, 8 Jul 2020 08:34:18 +0300 From: Leon Romanovsky To: Xu Wang Cc: santosh.shilimkar@oracle.com, davem@davemloft.net, kuba@kernel.org, netdev@vger.kernel.org, linux-rdma@vger.kernel.org, rds-devel@oss.oracle.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH] rds: send: Replace sg++ with sg = sg_next(sg) Message-ID: <20200708053418.GP207186@unreal> References: <20200708034252.17408-1-vulab@iscas.ac.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200708034252.17408-1-vulab@iscas.ac.cn> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 08, 2020 at 03:42:52AM +0000, Xu Wang wrote: > Replace sg++ with sg = sg_next(sg). > > Signed-off-by: Xu Wang > --- > net/rds/send.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/net/rds/send.c b/net/rds/send.c > index 68e2bdb08fd0..57d03a6753de 100644 > --- a/net/rds/send.c > +++ b/net/rds/send.c > @@ -387,7 +387,7 @@ int rds_send_xmit(struct rds_conn_path *cp) > ret -= tmp; > if (cp->cp_xmit_data_off == sg->length) { > cp->cp_xmit_data_off = 0; > - sg++; > + sg = sg_next(sg); What about rest cases? ➜ kernel git:(rdma-next) git grep "sg++" net/rds/ net/rds/message.c: sg++; net/rds/message.c: sg++; net/rds/message.c: sg++; net/rds/send.c: sg++; net/rds/tcp_send.c: sg++; Thanks > cp->cp_xmit_sg++; > BUG_ON(ret != 0 && cp->cp_xmit_sg == > rm->data.op_nents); > -- > 2.17.1 >