Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp538531imu; Fri, 11 Jan 2019 04:59:00 -0800 (PST) X-Google-Smtp-Source: ALg8bN41F573ase0M181lvloTNPP9j1vJkJZCrXEhvgk7rNSv9sxFOEmVshi5A8hs+gkPHJ8TtjP X-Received: by 2002:a17:902:6bc7:: with SMTP id m7mr14858947plt.106.1547211540559; Fri, 11 Jan 2019 04:59:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547211540; cv=none; d=google.com; s=arc-20160816; b=nBaIkerZZbkX5n4/8Fwhz8rW0Sa3RQIwH+OWxeXunhzCsqTf5GhxsXgG2n7LqhLJ7X iwnduHo4ZwkO96RBiQc5miQGu0pfMUP1z+Y6I+krZHooyfxXoS5sbICojB4sxl43TEqV Nc66ze1LFhy8qYiPLppbxl9gmPy/UylJOtLsCbTfkzni/1fc9jgBXIAluKcbT+4M/f3R EnNj22OWt5ZFd8rPGOEkRxbmFc4HXxqxkTHfjgqha0kHDzG3VUGQvPCuPkQUtm48i9+r NjEFLin+ShKqbM3aM7hAylukiWxPRigRsnB7tTfVFzkziTKSIiZOFReP5uzze2rDaPZs qgFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=/fePBMHbq1MNaDWeh3nGl51fvOHFrGFYS71p5Qq34y4=; b=Ja44orGWZL8yH3frN9FHk9PjLcEG7DhfMuQYo1ysNITB/2QAkYWiLYLKzxspm5aFXH Dd28Y+WFrTSBZAGjXaIkS3zI0YJc5hRRDnAfQeX2emjq6px/XZ7d/u3D/a/2Qqe821eU 5LTT77bh0IggHPyQXZyaI/Hlrf7yzKu31PCHqRz5uti+CRGEUywAfpRcYVu6r1qPemXB fok/EM21Vhveun9/IVj3PI2ryJk/hAV2ZIVrEqY/nDpl05S/DQb5dEBl/rqw2sr8jZ+H hl6GKopG8c3LUWHrY1ToqHITdw3fwmP752l0iNXhdBbtghPsbO0Pq5Kr+csALWTY+SLt ZQrA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@osandov-com.20150623.gappssmtp.com header.s=20150623 header.b=JdX3cXqS; 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 69si35576666pgc.164.2019.01.11.04.58.45; Fri, 11 Jan 2019 04:59:00 -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; dkim=pass header.i=@osandov-com.20150623.gappssmtp.com header.s=20150623 header.b=JdX3cXqS; 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 S1731675AbfAKKJz (ORCPT + 99 others); Fri, 11 Jan 2019 05:09:55 -0500 Received: from mail-pl1-f194.google.com ([209.85.214.194]:41027 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727653AbfAKKJy (ORCPT ); Fri, 11 Jan 2019 05:09:54 -0500 Received: by mail-pl1-f194.google.com with SMTP id u6so6565787plm.8 for ; Fri, 11 Jan 2019 02:09:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osandov-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=/fePBMHbq1MNaDWeh3nGl51fvOHFrGFYS71p5Qq34y4=; b=JdX3cXqS8Zs0QnDfq9dECYZWRBvIQWd2UUsdJzOSq+AngI8AW1Vu7p6Ylpo5QY0PIY fCB81D5Ssu12KY+HgMa5yqudyCxxzJXoZjDHGDxCA++1FXINQKk8630cT471BnQxCLq7 Jak/vjAnKtWLX26oLaG3V0OgNLtSVmedVHhAlo86bx0FerbUi2qLQ9KqgM+z1UHOZ0ax xGJKuWWbZ5kQtStTNxiU8viRX7pPLXTZ8GmN2n9GsCIQF1XpT7q7vS36yeiYl+m1ULTz hFi5U5hQeOziEpHTjt6bONuV3AdHtwi8znoOlMSCfxSJeVECsKliCtWCOh8WRkKmscRA fVGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=/fePBMHbq1MNaDWeh3nGl51fvOHFrGFYS71p5Qq34y4=; b=RX6y2vFxJS7kFOVYf6WgwYLliv91zP5mxoIiy053TbZWYSDoNPU9REt44OXvvvcOlt 6XWoDtRZO2OJQZc9udcwxLjLyrhTYT8HpV/k0INHyc3tUGHzX/i4Tz0wGTJBqfV6vFBG /ttvVQ8q0RuxcoL4vNqTgKSv/pa4MhRbi9oh5jIyvqlU+kxNbcC6nx6jHYF+//pphdIl TxSjaZnPnxYq6JzTBbOfKyJcHlcZzvZ41f12LgTvPAmL6fE1U55rUCxIDHhUD4AXAm/6 74473uA2OeCXuYErLq8aJ/sv7IviASDu+2FgKrSGjYMexr/5J10j0g7JfQrAbISbX1XJ L1yw== X-Gm-Message-State: AJcUukcvmzynVPRnWVGkB4GPbPeyaEeXv1J5YMHSiweuOQWzJD2OPpgq HcrA9C2V80BOwlBZYR381onegg== X-Received: by 2002:a17:902:3283:: with SMTP id z3mr14293576plb.76.1547201392779; Fri, 11 Jan 2019 02:09:52 -0800 (PST) Received: from vader ([2601:602:8b00:55d3:e6a7:a0ff:fe0b:c9a8]) by smtp.gmail.com with ESMTPSA id p7sm157429433pfj.72.2019.01.11.02.09.51 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 11 Jan 2019 02:09:52 -0800 (PST) Date: Fri, 11 Jan 2019 02:09:50 -0800 From: Omar Sandoval To: Marcos Paulo de Souza Cc: linux-kernel@vger.kernel.org, Jens Axboe , Tejun Heo , Josef Bacik , Mike Snitzer , Michael Callahan , Omar Sandoval , Mikulas Patocka , Keith Busch , Ming Lei , "Dennis Zhou (Facebook)" Subject: Re: [PATCH] blk_types.h: Use REQ_OP_WRITE in op_is_write Message-ID: <20190111100950.GA14142@vader> References: <20181222100356.559995-1-marcos.souza.org@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181222100356.559995-1-marcos.souza.org@gmail.com> User-Agent: Mutt/1.11.2 (2019-01-07) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Dec 22, 2018 at 08:03:54AM -0200, Marcos Paulo de Souza wrote: > Instead of just using plain '1', as it improves readability. > > Signed-off-by: Marcos Paulo de Souza > --- > include/linux/blk_types.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/include/linux/blk_types.h b/include/linux/blk_types.h > index 1dcf652ba0aa..905c666a0101 100644 > --- a/include/linux/blk_types.h > +++ b/include/linux/blk_types.h > @@ -377,7 +377,7 @@ static inline void bio_set_op_attrs(struct bio *bio, unsigned op, > > static inline bool op_is_write(unsigned int op) > { > - return (op & 1); > + return (op & REQ_OP_WRITE); > } > > /* Nak. Conceptually, an operation is a write if the least significant bit is set. The 1 here doesn't mean REQ_OP_WRITE, it means the least significant bit.