Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755150AbdCBSSF (ORCPT ); Thu, 2 Mar 2017 13:18:05 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:50318 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754021AbdCBSQp (ORCPT ); Thu, 2 Mar 2017 13:16:45 -0500 Subject: Re: [RFC 02/11] mm: remove unncessary ret in page_referenced To: Minchan Kim , Andrew Morton References: <1488436765-32350-1-git-send-email-minchan@kernel.org> <1488436765-32350-3-git-send-email-minchan@kernel.org> Cc: kernel-team@lge.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Johannes Weiner , Michal Hocko From: Anshuman Khandual Date: Thu, 2 Mar 2017 20:03:16 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <1488436765-32350-3-git-send-email-minchan@kernel.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 17030214-0024-0000-0000-000003ABA117 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17030214-0025-0000-0000-00001127D155 Message-Id: <2baf1168-0f84-b80d-5fb9-9d13c618c9f1@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-03-02_13:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1612050000 definitions=main-1703020133 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 910 Lines: 35 On 03/02/2017 12:09 PM, Minchan Kim wrote: > Anyone doesn't use ret variable. Remove it. > This change is correct. But not sure how this is related to try_to_unmap() clean up though. > Signed-off-by: Minchan Kim > --- > mm/rmap.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/mm/rmap.c b/mm/rmap.c > index bb45712..8076347 100644 > --- a/mm/rmap.c > +++ b/mm/rmap.c > @@ -805,7 +805,6 @@ int page_referenced(struct page *page, > struct mem_cgroup *memcg, > unsigned long *vm_flags) > { > - int ret; > int we_locked = 0; > struct page_referenced_arg pra = { > .mapcount = total_mapcount(page), > @@ -839,7 +838,7 @@ int page_referenced(struct page *page, > rwc.invalid_vma = invalid_page_referenced_vma; > } > > - ret = rmap_walk(page, &rwc); > + rmap_walk(page, &rwc); > *vm_flags = pra.vm_flags; > > if (we_locked) >