Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp303327imm; Mon, 2 Jul 2018 11:48:55 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfmhc2Fxzd+jG1X72iWUfDKGZG8tBxD07VYQGjBPcQq74mVnPvYk1HInHj1Fep//yVLCIVU X-Received: by 2002:a17:902:b115:: with SMTP id q21-v6mr4448934plr.97.1530557335375; Mon, 02 Jul 2018 11:48:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530557335; cv=none; d=google.com; s=arc-20160816; b=BbiXQr5J5pxLmODQLa8nvRfhLqK+Q1eJb2n5dU/n3ZLXg2cjb19/Z8sHddUdpHSjMZ ykTr/98NvoBRPxFcCsM29ZqlVaJpSEi/abDhhmmKcRno/CJiznrT/EOneFnjrK64sJQ4 LYDycuz7PyvzILfGXb7f11T3V/4VTRI2HW+AYwzUBifcldc/wZjmMID7VjmCqgVj/nQK HmTnHwdMNPuPL4nUI0u41W2S8L5x6TiA5USSYRJN2MMEyA6mtpdnCrgnNBl6cPVufRJK SRuDJh2+zOsbkbg32Y+lAjS6CaEMflzTsnNPSoGF5G5mNQ1xpOngKWpg5G+bQyC6no/8 h93w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature :arc-authentication-results; bh=ZIkE43OsP+f1wxQnMisjMJTu0aHy09tgboJbEKPjTB0=; b=x0gvsOrohYugwEF0WLLjZBgUWGGjFA5hTorXoYl6/bRFuo7tYudzP1NcSkeBqe8ydR y1zdkvwhJs+5dK3fpVpQDeScTI7Bfo0qsp7cpymbA3xCD+os1n6P9URqGmBBMPwm//82 gFUTjn2RVg+HmaunB+xuMXYjke2gNTyOiFVce9DtqIdJS/Jt5qIU1R//WfijsSgVmDWy EM/MSzHAL6Z5XbEC+GkxNqeMOGTPlsrMwYzHeDbpaMtjy8Fd4BbRyV/uYdqXifjJGueD 7SJ81sAca6wmPRb62vvWz1thqeU1SRKIcdVWXXHs8ZAdHnwvwTJFWpquw//tYWWcuDGE EV4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=JvvdVP+Y; 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=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 184-v6si6082489pgj.421.2018.07.02.11.48.41; Mon, 02 Jul 2018 11:48:55 -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; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=JvvdVP+Y; 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=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753341AbeGBSsA (ORCPT + 99 others); Mon, 2 Jul 2018 14:48:00 -0400 Received: from aserp2120.oracle.com ([141.146.126.78]:59358 "EHLO aserp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753162AbeGBSr6 (ORCPT ); Mon, 2 Jul 2018 14:47:58 -0400 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w62Ihi4K045846 for ; Mon, 2 Jul 2018 18:47:58 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : references : in-reply-to : from : date : message-id : subject : to : cc : content-type; s=corp-2017-10-26; bh=ZIkE43OsP+f1wxQnMisjMJTu0aHy09tgboJbEKPjTB0=; b=JvvdVP+Ylyu9lQJ72pjKX1dGLxUHwf8xvEAxt/ZFJVUH4Uosegr44/nMzIz4s17mNHh/ OfS7KqvFACmmZTgU6BGqvl4KI46A7kId0CqbYydpIqhqBmaGrrsLDROMZjHJ84E13/oy TX62t/15Vn6KA1pbRiZC8NF7WhxpfnVOrgp66yyt+r8+KvW8ewD+yCHIz4Xt+1K1Rb4h OCq9IC26JR2bsgFEI2H4l9Y06HFGmnD7hOn7K600PDsKYeji0/v7yZjGLjsD5Zld4GUS Z0J0QQkAlVa2vE28YmwKaqOkKbWCWIuEDKpGzVW1dbdWMi1tsFHN/lh4980Y4HmKBfh2 rA== Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by aserp2120.oracle.com with ESMTP id 2jx1tnwp28-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Mon, 02 Jul 2018 18:47:57 +0000 Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w62Ilu97023014 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Mon, 2 Jul 2018 18:47:57 GMT Received: from abhmp0001.oracle.com (abhmp0001.oracle.com [141.146.116.7]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w62IlucV027851 for ; Mon, 2 Jul 2018 18:47:56 GMT Received: from mail-oi0-f50.google.com (/209.85.218.50) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 02 Jul 2018 11:47:56 -0700 Received: by mail-oi0-f50.google.com with SMTP id w126-v6so10999205oie.7 for ; Mon, 02 Jul 2018 11:47:56 -0700 (PDT) X-Gm-Message-State: APt69E1y21Vw7oY6L24PYjCWarc+foeyJaoa0C2i4sb8LXHuZ8M8L5HT mioNLw7OlwaAhbnW82yZbD403wkSkQYvb/x4Kyg= X-Received: by 2002:aca:db0a:: with SMTP id s10-v6mr18189902oig.339.1530557276529; Mon, 02 Jul 2018 11:47:56 -0700 (PDT) MIME-Version: 1.0 References: <20180702154325.12196-1-osalvador@techadventures.net> In-Reply-To: <20180702154325.12196-1-osalvador@techadventures.net> From: Pavel Tatashin Date: Mon, 2 Jul 2018 14:47:20 -0400 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] mm/sparse: Make sparse_init_one_section void and remove check To: osalvador@techadventures.net Cc: Andrew Morton , Michal Hocko , Vlastimil Babka , bhe@redhat.com, kirill.shutemov@linux.intel.com, dave.hansen@linux.intel.com, Linux Memory Management List , LKML , osalvador@suse.de Content-Type: text/plain; charset="UTF-8" X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8942 signatures=668704 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=3 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=936 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1806210000 definitions=main-1807020209 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 2, 2018 at 11:43 AM wrote: > > From: Oscar Salvador > > sparse_init_one_section() is being called from two sites: > sparse_init() and sparse_add_one_section(). > The former calls it from a for_each_present_section_nr() loop, > and the latter marks the section as present before calling it. > This means that when sparse_init_one_section() gets called, we already know > that the section is present. > So there is no point to double check that in the function. > > This removes the check and makes the function void. > > Signed-off-by: Oscar Salvador Thank you Oscar. Reviewed-by: Pavel Tatashin > --- > mm/sparse.c | 12 +++--------- > 1 file changed, 3 insertions(+), 9 deletions(-)