lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <OFE52012B8.B3E39B05-ON00258443.0057F9D5-00258443.005883B6@notes.na.collabserv.com>
Date:   Fri, 26 Jul 2019 16:06:48 +0000
From:   "Bernard Metzler" <BMT@...ich.ibm.com>
To:     "Anders Roxell" <anders.roxell@...aro.org>
Cc:     dledford@...hat.com, jgg@...pe.ca, linux-rdma@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re:  [PATCH] rdma: siw: remove unused variable

-----"Anders Roxell" <anders.roxell@...aro.org> wrote: -----

>To: bmt@...ich.ibm.com, dledford@...hat.com, jgg@...pe.ca
>From: "Anders Roxell" <anders.roxell@...aro.org>
>Date: 07/26/2019 11:26AM
>Cc: linux-rdma@...r.kernel.org, linux-kernel@...r.kernel.org, "Anders
>Roxell" <anders.roxell@...aro.org>
>Subject: [EXTERNAL] [PATCH] rdma: siw: remove unused variable
>
>The variable 'p' si no longer used and the compiler rightly complains
>that it should be removed.
>
>../drivers/infiniband/sw/siw/siw_mem.c: In function ‘siw_free_plist’:
>../drivers/infiniband/sw/siw/siw_mem.c:66:16: warning: unused
>variable
> ‘p’ [-Wunused-variable]
>  struct page **p = chunk->plist;
>                ^
>
>Rework to remove unused variable.
>
>Fixes: 8288d030447f ("mm/gup: add make_dirty arg to
>put_user_pages_dirty_lock()")
>Signed-off-by: Anders Roxell <anders.roxell@...aro.org>
>---
> drivers/infiniband/sw/siw/siw_mem.c | 2 --
> 1 file changed, 2 deletions(-)
>
>diff --git a/drivers/infiniband/sw/siw/siw_mem.c
>b/drivers/infiniband/sw/siw/siw_mem.c
>index 358d440efa11..ab83a9cec562 100644
>--- a/drivers/infiniband/sw/siw/siw_mem.c
>+++ b/drivers/infiniband/sw/siw/siw_mem.c
>@@ -63,8 +63,6 @@ struct siw_mem *siw_mem_id2obj(struct siw_device
>*sdev, int stag_index)
> static void siw_free_plist(struct siw_page_chunk *chunk, int
>num_pages,
> 			   bool dirty)
> {
>-	struct page **p = chunk->plist;
>-
> 	put_user_pages_dirty_lock(chunk->plist, num_pages, dirty);
> }
> 
>-- 
>2.20.1
>
>

If we can cut down siw_free_plist() to just calling
put_user_pages_dirty_lock(), we shall better call it directly
and not obfuscate that by another function. 

Reviewed-by: Bernard Metzler <bmt@...ich.ibm.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ