lkml.org 
[lkml]   [2018]   [Nov]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH] ipc/shm.c: removed 'int err' from shm_get_policy()
On Sun, 18 Nov 2018 23:49:11 +0000 danielijrobson@gmail.com wrote:

> removed unneeded variable in shm_get_policy()
>
> ...
>
> --- a/ipc/shm.c
> +++ b/ipc/shm.c
> @@ -461,11 +461,10 @@ static int shm_set_policy(struct vm_area_struct *vma, struct mempolicy *new)
> {
> struct file *file = vma->vm_file;
> struct shm_file_data *sfd = shm_file_data(file);
> - int err = 0;
>
> if (sfd->vm_ops->set_policy)
> - err = sfd->vm_ops->set_policy(vma, new);
> - return err;
> + return sfd->vm_ops->set_policy(vma, new);
> + return 0;
> }

Sorry, I don't think this is enough of an improvement to justify adding
the patch.

\
 
 \ /
  Last update: 2018-11-22 06:08    [W:0.029 / U:0.300 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site