Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp3651163pxu; Mon, 19 Oct 2020 18:31:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwYxPam12YkZry7C2MLllxz22fgpQmGs4Slch8Bx05ubBq1Ltrd7XeWLSBKrPS3NQTxaGAW X-Received: by 2002:a17:906:bfe2:: with SMTP id vr2mr720789ejb.248.1603157495183; Mon, 19 Oct 2020 18:31:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603157495; cv=none; d=google.com; s=arc-20160816; b=0RFlyNPVgpK66B44dIWBnZx4FmAe2Z8xETS4ex6aZB5pBgFsZgJql82EyYZpkYgqsE flsdpip3WVVPNichBi8i5aGRBMhUhzuZVx2ovyIVRjjeghmfG8a2hcrLqlOH+JxiwptA Oyauof++CR9xmYU0bl0kkc66Xou+O9cW+5RTyrRtVtzuNDLrLtkHRz/2sfXF4YQuPAiz WD4H6iaMxNwZa5C2DBf9Mx7lwMwT59g+m1qLFPKCzvRq8TSDPkeOuWrPQqwasRGL9iyJ zifVBuRWCcoTB0Lr4End7zX5IlplfHGDzc0iH+WA0QNv2uyzx+kXA7/pUeZ6HLuyxYY4 ZJ8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-disposition:mime-version:message-id :subject:to:from:date:dkim-signature; bh=z5YJ8q3sjAt0NsS310V0zZIOMgHG+DxOWwMJx21y6pc=; b=QzStayxHkYE5BHW/LzNq8jxoGCwMEynxQFrTp8F+RIeWQjtZLVLoPc54GS5anSu0Np Fv0LHCaRAH5pjhBsPlKJQzzL7zCXPrNPvzdmk0Ll/VMTAbY50wmiGE0OM6D0L1VkCvnP sH2F2yhZa3Pw6uRl1BZAqElZceg7bXMWij9PARToG60Gkp8KcbYkV1gJ42QSxHpAMz0g g5vUtB3CMQHcSdN64hYs0VhSGODXkGQmx0ygKgZqsT36YCOJT0eOEvsyoMgnIqabfVIE ijG69tSkEkRlqfmiBy3XSnApdt/RbACGVEiMMPsHP6DWPICuSc0bhei/sK0olKoMbWjr K7Lw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@163.com header.s=s110527 header.b=lBHJJuMq; 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=163.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h19si118191edv.197.2020.10.19.18.31.13; Mon, 19 Oct 2020 18:31:35 -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=@163.com header.s=s110527 header.b=lBHJJuMq; 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=163.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728702AbgJSNvF (ORCPT + 99 others); Mon, 19 Oct 2020 09:51:05 -0400 Received: from m12-15.163.com ([220.181.12.15]:45803 "EHLO m12-15.163.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728277AbgJSNvE (ORCPT ); Mon, 19 Oct 2020 09:51:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=Date:From:Subject:Message-ID:MIME-Version; bh=z5YJ8 q3sjAt0NsS310V0zZIOMgHG+DxOWwMJx21y6pc=; b=lBHJJuMqufHWZMODOPJ+6 kYijA760F1LmItPuNLOfq++58BA1ihuB4kC/vL4FaQBD7FE8oaVGjPy8gcE5UW5M gSQp1wSbReaKUf0pCO8nVnH6pdVp6Madb12z0kEIKZVvj0GEe8wsiGQoP+4MNGM4 mT3Dke/33hYpOz3T7SN64o= Received: from localhost (unknown [101.86.214.18]) by smtp11 (Coremail) with SMTP id D8CowAAHhcbDmY1fxoDUDg--.9286S2; Mon, 19 Oct 2020 21:50:59 +0800 (CST) Date: Mon, 19 Oct 2020 21:50:59 +0800 From: Hui Su To: axboe@kernel.dk, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, sh_def@163.com Subject: [PATCH] blk: use REQ_OP_WRITE instead of hard code Message-ID: <20201019135059.GA16475@rlk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-CM-TRANSID: D8CowAAHhcbDmY1fxoDUDg--.9286S2 X-Coremail-Antispam: 1Uf129KBjDUn29KB7ZKAUJUUUU8529EdanIXcx71UUUUU7v73 VFW2AGmfu7bjvjm3AaLaJ3UbIYCTnIWIevJa73UjIFyTuYvjxUFEfoUUUUU X-Originating-IP: [101.86.214.18] X-CM-SenderInfo: xvkbvvri6rljoofrz/1tbiJgPCX1v2ep-rvwAAsk Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org use REQ_OP_WRITE instead of hard code in op_is_write(). Signed-off-by: Hui Su --- 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 7d7c13238fdb..7b9b02378c24 100644 --- a/include/linux/blk_types.h +++ b/include/linux/blk_types.h @@ -440,7 +440,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.25.1