From: Laurence Oberman <loberman@redhat.com>
To: shao.mingyin@zte.com.cn, mkp@kernel.org,
linux-scsi@vger.kernel.org, target-devel@vger.kernel.org
Cc: James.Bottomley@HansenPartnership.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] target: iblock: drop the dead kmap() NULL check
Date: Thu, 05 Nov 2026 13:58:57 -0500 [thread overview]
Message-ID: <7dccd24b8dc18be694ffca063cd4c13655ff1c9a.camel@redhat.com> (raw)
In-Reply-To: <20261105193351820CRZfBnzFE8zZm2DrNx0T_@zte.com.cn>
On Thu, 2026-11-05 at 19:33 +0800, shao.mingyin@zte.com.cn wrote:
> From: Shao Mingyin <shao.mingyin@zte.com.cn>
>
> kmap() never returns NULL, so the check after it is dead code.
>
> No functional change.
>
> Signed-off-by: Shao Mingyin <shao.mingyin@zte.com.cn>
> ---
> diff --git a/drivers/target/target_core_iblock.c
> b/drivers/target/target_core_iblock.c
> index ea65d39fef88..604fca959f2e 100644
> --- a/drivers/target/target_core_iblock.c
> +++ b/drivers/target/target_core_iblock.c
> @@ -461,8 +461,6 @@ iblock_execute_zero_out(struct block_device
> *bdev, struct se_cmd *cmd)
> int ret;
>
> buf = kmap(sg_page(sg)) + sg->offset;
> - if (!buf)
> - return TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE;
> /*
> * Fall back to block_execute_write_same() slow-path if
> * incoming WRITE_SAME payload does not contain zeros.
Looks good.
Reviewed-by: Laurence Oberman <loberman@redhat.com>
next prev parent reply other threads:[~2026-11-05 18:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-05 11:33 [PATCH 0/2] target: remove dead kmap checks shao.mingyin
2026-11-05 11:33 ` [PATCH 1/2] target: iblock: drop the dead kmap() NULL check shao.mingyin
2026-11-05 18:58 ` Laurence Oberman [this message]
2026-11-05 11:33 ` [PATCH 2/2] target: core: drop the dead kmap_local_page() " shao.mingyin
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=7dccd24b8dc18be694ffca063cd4c13655ff1c9a.camel@redhat.com \
--to=loberman@redhat.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=mkp@kernel.org \
--cc=shao.mingyin@zte.com.cn \
--cc=target-devel@vger.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®