lkml.org 
[lkml]   [2021]   [May]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] scsi: target: iscsi: Drop unnecessary container_of
From
Date

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

\
 
 \ /
  Last update: 2021-05-15 04:43    [W:0.040 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site