From: "Martin K. Petersen" <martin.petersen@oracle.com>
To: Guenter Roeck <linux@roeck-us.net>
Cc: "Martin K . Petersen" <martin.petersen@oracle.com>,
linux-scsi@vger.kernel.org, target-devel@vger.kernel.org,
linux-kernel@vger.kernel.org, Hou Pu <houpu@bytedance.com>,
Mike Christie <michael.christie@oracle.com>
Subject: Re: [PATCH] scsi: target: iscsi: Drop unnecessary container_of
Date: Fri, 14 May 2021 22:42:08 -0400 [thread overview]
Message-ID: <yq17dk0btvt.fsf@ca-mkp.ca.oracle.com> (raw)
In-Reply-To: <20210510040817.2050266-1-linux@roeck-us.net> (Guenter Roeck's message of "Sun, 9 May 2021 21:08:17 -0700")
Guenter,
> The structure pointer passed to container_of() is never NULL; that was
> already checked. That means that the result of container_of()
> operations on it is also never NULL, even though se_node_acl is the
> first element of the structure embedding it. On top of that, it is
> misleading to perform a NULL check on the result of container_of()
> because the position of the contained element could change, which
> would make the test invalid. Remove the unnecessary NULL check.
Applied to 5.14/scsi-staging, thanks!
--
Martin K. Petersen Oracle Linux Engineering
prev parent reply other threads:[~2021-05-15 2:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-10 4:08 [PATCH] scsi: target: iscsi: Drop unnecessary container_of Guenter Roeck
2021-05-15 2:42 ` Martin K. Petersen [this message]
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=yq17dk0btvt.fsf@ca-mkp.ca.oracle.com \
--to=martin.petersen@oracle.com \
--cc=houpu@bytedance.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=michael.christie@oracle.com \
--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