lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20181222100356.559995-1-marcos.souza.org@gmail.com>
Date:   Sat, 22 Dec 2018 08:03:54 -0200
From:   Marcos Paulo de Souza <marcos.souza.org@...il.com>
To:     linux-kernel@...r.kernel.org
Cc:     Marcos Paulo de Souza <marcos.souza.org@...il.com>,
        Jens Axboe <axboe@...nel.dk>, Tejun Heo <tj@...nel.org>,
        Josef Bacik <jbacik@...com>, Mike Snitzer <snitzer@...hat.com>,
        Michael Callahan <michaelcallahan@...com>,
        Omar Sandoval <osandov@...com>,
        Mikulas Patocka <mpatocka@...hat.com>,
        Keith Busch <keith.busch@...el.com>,
        Ming Lei <ming.lei@...hat.com>,
        "Dennis Zhou (Facebook)" <dennisszhou@...il.com>
Subject: [PATCH] blk_types.h: Use REQ_OP_WRITE in op_is_write

Instead of just using plain '1', as it improves readability.

Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@...il.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ