[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <yq17dk0btvt.fsf@ca-mkp.ca.oracle.com>
Date: Fri, 14 May 2021 22:42:08 -0400
From: "Martin K. Petersen" <martin.petersen@...cle.com>
To: Guenter Roeck <linux@...ck-us.net>
Cc: "Martin K . Petersen" <martin.petersen@...cle.com>,
linux-scsi@...r.kernel.org, target-devel@...r.kernel.org,
linux-kernel@...r.kernel.org, Hou Pu <houpu@...edance.com>,
Mike Christie <michael.christie@...cle.com>
Subject: Re: [PATCH] scsi: target: iscsi: Drop unnecessary container_of
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
Powered by blists - more mailing lists