From: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: Marcos Paulo de Souza <marcos.souza.org@gmail.com>,
Jens Axboe <axboe@kernel.dk>, Tejun Heo <tj@kernel.org>,
Josef Bacik <jbacik@fb.com>, Mike Snitzer <snitzer@redhat.com>,
Michael Callahan <michaelcallahan@fb.com>,
Omar Sandoval <osandov@fb.com>,
Mikulas Patocka <mpatocka@redhat.com>,
Keith Busch <keith.busch@intel.com>,
Ming Lei <ming.lei@redhat.com>,
"Dennis Zhou (Facebook)" <dennisszhou@gmail.com>
Subject: [PATCH] blk_types.h: Use REQ_OP_WRITE in op_is_write
Date: Sat, 22 Dec 2018 08:03:54 -0200 [thread overview]
Message-ID: <20181222100356.559995-1-marcos.souza.org@gmail.com> (raw)
Instead of just using plain '1', as it improves readability.
Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
---
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);
}
/*
--
2.16.4
next reply other threads:[~2018-12-22 17:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-22 10:03 Marcos Paulo de Souza [this message]
2019-01-11 2:17 ` Marcos Paulo de Souza
2019-01-11 10:09 ` Omar Sandoval
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181222100356.559995-1-marcos.souza.org@gmail.com \
--to=marcos.souza.org@gmail.com \
--cc=axboe@kernel.dk \
--cc=dennisszhou@gmail.com \
--cc=jbacik@fb.com \
--cc=keith.busch@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=michaelcallahan@fb.com \
--cc=ming.lei@redhat.com \
--cc=mpatocka@redhat.com \
--cc=osandov@fb.com \
--cc=snitzer@redhat.com \
--cc=tj@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®