All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chaitanya Kulkarni <kch@nvidia.com>
To: <linux-block@vger.kernel.org>
Cc: <axboe@kernel.dk>, <ming.lei@redhat.com>, <damien.lemoal@wdc.com>,
	<jiangguoqing@kylinos.cn>, <shinichiro.kawasaki@wdc.com>,
	Chaitanya Kulkarni <kch@nvidia.com>
Subject: [PATCH 2/4] blk-lib: don't check bdev_get_queue() NULL check
Date: Mon, 14 Feb 2022 02:08:57 -0800	[thread overview]
Message-ID: <20220214100859.9400-3-kch@nvidia.com> (raw)
In-Reply-To: <20220214100859.9400-1-kch@nvidia.com>

Based on the comment present in the bdev_get_queue()
bdev->bd_disk->queue can never be NULL. Remove the NULL check for the
local variabel q that is set from bdev_get_queue() in the function
__blkdev_issue_write_same().

Signed-off-by: Chaitanya Kulkarni <kch@nvidia.com>
---
 block/blk-lib.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/block/blk-lib.c b/block/blk-lib.c
index 08ac56eb3a70..473888d667a1 100644
--- a/block/blk-lib.c
+++ b/block/blk-lib.c
@@ -169,9 +169,6 @@ static int __blkdev_issue_write_same(struct block_device *bdev, sector_t sector,
 	struct bio *bio = *biop;
 	sector_t bs_mask;
 
-	if (!q)
-		return -ENXIO;
-
 	if (bdev_read_only(bdev))
 		return -EPERM;
 
-- 
2.29.0


  parent reply	other threads:[~2022-02-14 10:47 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-14 10:08 [PATCH 0/4] blk-lib: cleanup bdev_get_queue() Chaitanya Kulkarni
2022-02-14 10:08 ` [PATCH 1/4] blk-lib: don't check bdev_get_queue() NULL check Chaitanya Kulkarni
2022-02-14 10:08 ` Chaitanya Kulkarni [this message]
2022-02-14 10:08 ` [PATCH 3/4] " Chaitanya Kulkarni
2022-02-14 10:08 ` [PATCH 4/4] " Chaitanya Kulkarni
2022-02-14 10:19 ` [PATCH 0/4] blk-lib: cleanup bdev_get_queue() Chaitanya Kulkarni
2022-02-14 13:45   ` Jens Axboe

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=20220214100859.9400-3-kch@nvidia.com \
    --to=kch@nvidia.com \
    --cc=axboe@kernel.dk \
    --cc=damien.lemoal@wdc.com \
    --cc=jiangguoqing@kylinos.cn \
    --cc=linux-block@vger.kernel.org \
    --cc=ming.lei@redhat.com \
    --cc=shinichiro.kawasaki@wdc.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.