lkml.org 
[lkml]   [2022]   [Aug]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] x86/sgx: Improve comments for sgx_encl_lookup/alloc_backing()
On Thu, Jul 28, 2022 at 06:47:01AM -0700, Dave Hansen wrote:
> On 7/28/22 00:58, Jarkko Sakkinen wrote:
> > On Wed, Jul 20, 2022 at 11:21:19AM -0700, Kristen Carlson Accardi wrote:
> >> Modify the comments for sgx_encl_lookup_backing() and for
> >> sgx_encl_alloc_backing() to indicate that they take a reference
> >> which must be dropped with a call to sgx_encl_put_backing().
> >> Make sgx_encl_lookup_backing() static for now, and change the
> >> name of sgx_encl_get_backing() to __sgx_encl_get_backing() to
> >> make it more clear that sgx_encl_get_backing() is an internal
> >> function.
> >>
> >> Signed-off-by: Kristen Carlson Accardi <kristen@linux.intel.com>
> > The rename is unnecessary.
>
> Well, it was done to address some reviewer confusion:
>
> https://lore.kernel.org/all/YtUs3MKLzFg+rqEV@zn.tnic/
>
> I wouldn't call it unnecessary. Heck, I'd argue that the one of the
> main reasons that this code leaked memory in the first place was the
> naming and lack of comments.

Maybe the rename should be its own patch with this tag in the commit:

Link: https://lore.kernel.org/all/YtUs3MKLzFg+rqEV@zn.tnic/

BR, Jarkko

\
 
 \ /
  Last update: 2022-08-01 18:42    [W:0.081 / U:0.936 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site