Received: by 10.223.185.116 with SMTP id b49csp1705216wrg; Wed, 14 Feb 2018 23:38:34 -0800 (PST) X-Google-Smtp-Source: AH8x226GW34xpbasgFuf0xxYukbRcTrFRHytPfuCgyhKbIF3QAre6N1zC/G3C4nY7OQ/SuPz7NKp X-Received: by 2002:a17:902:43e4:: with SMTP id j91-v6mr1669662pld.153.1518680314396; Wed, 14 Feb 2018 23:38:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518680314; cv=none; d=google.com; s=arc-20160816; b=0D2EMJSG3fJQDf8cpQ/ZTsFuBo5q1+EP0TPV5dNmxgZNNd56V9C4hDZZ403eepaGzy 6dBNniFluQkWtg8nvyiJdfgxuKuWANesY0sRth7b5WnW9kjkv1bdpioJVvoR4LVIoyn4 up+IK/kDGEahQ5g4W1ltJpLFMJlZJJELi6Jh0B0o7tnN5HfvdajA6Kzw04oTKFuHkoR5 Y7OrF7bvZ4OlZNsvEmwBjkH/B0TIr5r1dJW699CQ4sFtoWvqRAc/PQIBR6ZBny1/XO+Z 6ZI2t5/P6zshijVSOUu/Kd7TNZngDTNLgoVIvvrEE3/YPeojNZTFajwsIaDyRPsS14oC 32Xg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:subject:user-agent:message-id :references:cc:in-reply-to:from:to:content-transfer-encoding :mime-version:arc-authentication-results; bh=aoMC3LiFQs+U1KcbwEJ2yGhyNZ2QWE1j5r3WHRMjIoU=; b=A2P7+c+xGQSPJwbLZ4Fe2vLokMLv+1zC507Iz2GK6450ojOdd8zXhTS0PJ4Pi0icJD I1ojJmhsVrKMRSeAyTCd5QFs3JMcYzmXTSnJzLxGC7X7P8rt+8gZf8UuFlkfspX9ZJHc HNMrfXc84D+jqzg94TykRGEkt4LelEI97DCltKZatF6sNU/sboi/oppmnrqhUcXBRqZF Dig3bg2x+kvTC6Sn7PLeWIBdQlizgL1znPOtzYLgPt703qJC2BFwEIBmhDYl43Ad9r5e Ht9XC11lfL9wgBm3TZD7EXgWmdzbMAcw+ErITWU+Zzbl8BoSel1M+mLTgU4OgTcIaXkQ Z31g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g12-v6si1223780pla.226.2018.02.14.23.38.20; Wed, 14 Feb 2018 23:38:34 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754950AbeBOHh3 convert rfc822-to-8bit (ORCPT + 99 others); Thu, 15 Feb 2018 02:37:29 -0500 Received: from mail.fireflyinternet.com ([109.228.58.192]:49484 "EHLO fireflyinternet.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754927AbeBOHh2 (ORCPT ); Thu, 15 Feb 2018 02:37:28 -0500 X-Default-Received-SPF: pass (skip=forwardok (res=PASS)) x-ip-name=78.156.65.138; Received: from localhost (unverified [78.156.65.138]) by fireflyinternet.com (Firefly Internet (M1)) with ESMTP (TLS) id 10694903-1500050 for multiple; Thu, 15 Feb 2018 07:37:00 +0000 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8BIT To: Anshuman Khandual , linux-kernel@vger.kernel.org, gregkh@linuxfoundation.org, bart.vanassche@wdc.com, jthumshirn@suse.de, axboe@kernel.dk, tvrtko.ursulin@intel.com From: Chris Wilson In-Reply-To: <20180215033356.6978-1-khandual@linux.vnet.ibm.com> Cc: khandual@linux.vnet.ibm.com References: <20180215033356.6978-1-khandual@linux.vnet.ibm.com> Message-ID: <151868021710.15373.766697204394848595@mail.alporthouse.com> User-Agent: alot/0.3.6 Subject: Re: [PATCH V2] lib/scatterlist: Add SG_CHAIN and SG_END macros for LSB encodings Date: Thu, 15 Feb 2018 07:36:57 +0000 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Anshuman Khandual (2018-02-15 03:33:56) > This replaces scatterlist->page_link LSB encodings with SG_CHAIN and > SG_END definitions without any functional change. > > Signed-off-by: Anshuman Khandual > --- > Changes in V2: > - Changed SG_EMARK as SG_END as per Johannes and Tvrtko > - Added 'UL' to the constants as per Bart > > include/linux/scatterlist.h | 23 +++++++++++++---------- > 1 file changed, 13 insertions(+), 10 deletions(-) > > diff --git a/include/linux/scatterlist.h b/include/linux/scatterlist.h > index 22b2131bcdcd..b6fe1815f5c4 100644 > --- a/include/linux/scatterlist.h > +++ b/include/linux/scatterlist.h > @@ -65,16 +65,18 @@ struct sg_table { > */ > > #define SG_MAGIC 0x87654321 > +#define SG_CHAIN 0x01UL > +#define SG_END 0x02UL The alternative would be BIT(0) and BIT(1), which by the time you write the constant out in full, as above, become clearer. I think you also want whitespace between the MAGIC and CHAIN,END so that the reader doesn't think they refer to some magic encoding of SG_MAGIC. -Chris