Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp424294yba; Sat, 4 May 2019 05:23:05 -0700 (PDT) X-Google-Smtp-Source: APXvYqxw/zzY03rHRNtGds6j7EjNynaBz1UI2Mkegubhjqf1Q+YlY2xinPO9Rg2NVLmh5MByXgGT X-Received: by 2002:a63:d908:: with SMTP id r8mr18486892pgg.268.1556972585502; Sat, 04 May 2019 05:23:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556972585; cv=none; d=google.com; s=arc-20160816; b=BE/L0xhEoG8qp3Fc055pv7QZBEW7bt9KkVlo5gLb3sMs2B0w1GLLehlYg2xuuWJO5N f7yMgZzy3ptmTZuIFhWzqmLyuhLob29/hn0V3GrT7DyLPgcIeEnoBRIFSyKLZwurL3BA BWEwQ0rUtqQ81t8NTMy4/xmUNadM0s9Xtr0tfeN6dBCCYhR3aN5g0hBIIWyXzJMTmTh2 IgbXZ/yu5X3jnQHNRkq0iyuhsBGRxVjMf721+0qWJZ8BVMWtldPqy4rRWDVHQrjVviWM jaT+lxuaNIfhMngUsNuk+Wvns5iSb14z3/1LxubHypbVeV55R0bVSvhP5BDlDxEDOR7C MPTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=5Wdh0FJKVeYjmbj20dJOg90UqFKzzdTdNFeUcpzq3UA=; b=NS947e1pBNWiwLEg5uBsttlFur7EBpsvDjUIxYx6ZEu6UUY5P+GMuCG3k42qPqMZvW 3oqVrWguFb992jjfC7yroe1rEWROipkhl4ni+z58vu9UseImlHB8dFPLfMQfAnBuvFi5 IB4+9DSzttQe+K9V7VEbG3Fzeyafj2iY0nOAAU5bK7vSgZkkC9fMde6aP/LAaTGOI7pc SZlW28W2ZZhCCuEoxRphY5xvI2n7xNA2CrGmLDIhpCx0DSa88vRoD8gnMJMR2xk+vxba T/ccUz9jyBWViXZ+28tKdN6MUfliwNYZ4s127AI/i2t0p9sYkZ089upJPcQOP3jC14+Q HGWQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g68si7642733plb.362.2019.05.04.05.22.50; Sat, 04 May 2019 05:23:05 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727509AbfEDLyu (ORCPT + 99 others); Sat, 4 May 2019 07:54:50 -0400 Received: from mx2.suse.de ([195.135.220.15]:57566 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727266AbfEDLyt (ORCPT ); Sat, 4 May 2019 07:54:49 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 8C168AC4A; Sat, 4 May 2019 11:54:48 +0000 (UTC) Date: Sat, 4 May 2019 07:54:46 -0400 From: Michal Hocko To: Bharath Vedartham Cc: akpm@linux-foundation.org, kirill.shutemov@linux.intel.com, vbabka@suse.cz, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mm/huge_memory.c: Make __thp_get_unmapped_area static Message-ID: <20190504115446.GP29835@dhcp22.suse.cz> References: <20190504102353.GA22525@bharath12345-Inspiron-5559> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190504102353.GA22525@bharath12345-Inspiron-5559> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat 04-05-19 15:53:54, Bharath Vedartham wrote: > __thp_get_unmapped_area is only used in mm/huge_memory.c. Make it > static. Makes sense. Looks like an omission. > Tested by building and booting the kernel. Testing by git grep __thp_get_unmapped_area would give you a better picture. Build test migh not hit paths that are config specific and static aspect of a functions should not have any functionality related side effects AFAICS. > Signed-off-by: Bharath Vedartham Acked-by: Michal Hocko > --- > mm/huge_memory.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/mm/huge_memory.c b/mm/huge_memory.c > index 165ea46..75fe2b7 100644 > --- a/mm/huge_memory.c > +++ b/mm/huge_memory.c > @@ -509,7 +509,7 @@ void prep_transhuge_page(struct page *page) > set_compound_page_dtor(page, TRANSHUGE_PAGE_DTOR); > } > > -unsigned long __thp_get_unmapped_area(struct file *filp, unsigned long len, > +static unsigned long __thp_get_unmapped_area(struct file *filp, unsigned long len, > loff_t off, unsigned long flags, unsigned long size) > { > unsigned long addr; > -- > 2.7.4 > -- Michal Hocko SUSE Labs