Received: by 2002:a25:5b86:0:0:0:0:0 with SMTP id p128csp2348259ybb; Sat, 30 Mar 2019 02:51:47 -0700 (PDT) X-Google-Smtp-Source: APXvYqxoVtBnSCoSD4tg3JXBCPbqrJio2djpJf2uq8QZtWlcY00K1yNlIxE+RomqCpL2+OtIB0aX X-Received: by 2002:a65:6259:: with SMTP id q25mr22644808pgv.103.1553939507613; Sat, 30 Mar 2019 02:51:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553939507; cv=none; d=google.com; s=arc-20160816; b=Pwr6gZl20sQSmv3ym/Haei4nxE/MDGUKzAQJZVZg2Jp7dQpfc36w842EZfhCxjf9bu x5Gy8mmz+5rsWF/iBgPcB5nUGXr0+QiwG1tUprYWU6mbeLs0OVWRckK65U+vwjD1aiar JI60+DzTacMdi3vJoFL/K5ptgUA0MXa2oflOCefAiT64jqhmHs3GtpDjmNJJ0jRamPXC DBKGAn8KUe2nHCbiPBGk8E1gA/jjsWCFJeS45B6stAlHuYwUyBedN0Ri4oYjmZhKNfBQ 9g/GfrnJuuwopj474ISn6ar3A3p997/9DMKlc0XLalxATuQJrqYiCBqEY2LdItnAvdwl e7og== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:user-agent:in-reply-to :content-disposition:mime-version:references:subject:cc:to:from:date; bh=uruyKcgs3/AmmfnUT0zmQ28BMUDb6SwCWvNgsHkvi3I=; b=Igh08HgFXYD/n3LaYnVT93rAZqYZ+iFyJ0uuYnNaOBiDpBAKd8PXhxqDglMIo8mKmL lf6x133FbEySX74YThLmO+fCVU6d3wcNnK4PfqHevG0PypcjE9zcI4FVCdrzjmSxZjYi QkcONlKzA8hYbQE+EmA/b6+rmGcQsrYjy9Dvw8COymMFQULHfiw9tyCX2WzXWIi0eTjz NA4g7KVg+oili1YO3u16yVbla1yhxVW+TI4qmSXjfrKtJks6snv53Z7Fw0G6KCabnf2e VkJ9K21dfZbP0vfW/Wmoci0KaU/PuM1gp52EbZ+ggd/Giy0dEArVh27n5otBSPiv6UXg 7yjw== 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=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x4si3901366pgp.370.2019.03.30.02.51.31; Sat, 30 Mar 2019 02:51:47 -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=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730532AbfC3Ju5 (ORCPT + 99 others); Sat, 30 Mar 2019 05:50:57 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:38870 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730384AbfC3Ju4 (ORCPT ); Sat, 30 Mar 2019 05:50:56 -0400 Received: from pps.filterd (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x2U9mxB5061550 for ; Sat, 30 Mar 2019 05:50:55 -0400 Received: from e06smtp02.uk.ibm.com (e06smtp02.uk.ibm.com [195.75.94.98]) by mx0a-001b2d01.pphosted.com with ESMTP id 2rj4f8av9e-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Sat, 30 Mar 2019 05:50:55 -0400 Received: from localhost by e06smtp02.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Sat, 30 Mar 2019 09:50:53 -0000 Received: from b06cxnps3074.portsmouth.uk.ibm.com (9.149.109.194) by e06smtp02.uk.ibm.com (192.168.101.132) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Sat, 30 Mar 2019 09:50:50 -0000 Received: from b06wcsmtp001.portsmouth.uk.ibm.com (b06wcsmtp001.portsmouth.uk.ibm.com [9.149.105.160]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x2U9ooxs59113630 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 30 Mar 2019 09:50:50 GMT Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E43CDA4054; Sat, 30 Mar 2019 09:50:49 +0000 (GMT) Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 04694A405B; Sat, 30 Mar 2019 09:50:49 +0000 (GMT) Received: from rapoport-lnx (unknown [9.148.204.99]) by b06wcsmtp001.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Sat, 30 Mar 2019 09:50:48 +0000 (GMT) Date: Sat, 30 Mar 2019 12:50:47 +0300 From: Mike Rapoport To: Baoquan He Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, rafael@kernel.org, akpm@linux-foundation.org, mhocko@suse.com, osalvador@suse.de, willy@infradead.org, fanc.fnst@cn.fujitsu.com Subject: Re: [PATCH v3 1/2] mm/sparse: Clean up the obsolete code comment References: <20190329082915.19763-1-bhe@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190329082915.19763-1-bhe@redhat.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-TM-AS-GCONF: 00 x-cbid: 19033009-0008-0000-0000-000002D43C17 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19033009-0009-0000-0000-000022403DBC Message-Id: <20190330095046.GA26141@rapoport-lnx> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-03-30_03:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=2 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1903300071 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Mar 29, 2019 at 04:29:14PM +0800, Baoquan He wrote: > The code comment above sparse_add_one_section() is obsolete and > incorrect, clean it up and write new one. > > Signed-off-by: Baoquan He Reviewed-by: Mike Rapoport > --- > v2->v3: > Normalize the code comment to use '/**' at 1st line of doc > above function. > v1-v2: > Add comments to explain what the returned value means for > each error code. > mm/sparse.c | 17 +++++++++++++---- > 1 file changed, 13 insertions(+), 4 deletions(-) > > diff --git a/mm/sparse.c b/mm/sparse.c > index 69904aa6165b..363f9d31b511 100644 > --- a/mm/sparse.c > +++ b/mm/sparse.c > @@ -684,10 +684,19 @@ static void free_map_bootmem(struct page *memmap) > #endif /* CONFIG_MEMORY_HOTREMOVE */ > #endif /* CONFIG_SPARSEMEM_VMEMMAP */ > > -/* > - * returns the number of sections whose mem_maps were properly > - * set. If this is <=0, then that means that the passed-in > - * map was not consumed and must be freed. > +/** > + * sparse_add_one_section - add a memory section > + * @nid: The node to add section on > + * @start_pfn: start pfn of the memory range > + * @altmap: device page map > + * > + * This is only intended for hotplug. > + * > + * Returns: > + * 0 on success. > + * Other error code on failure: > + * - -EEXIST - section has been present. > + * - -ENOMEM - out of memory. > */ > int __meminit sparse_add_one_section(int nid, unsigned long start_pfn, > struct vmem_altmap *altmap) > -- > 2.17.2 > -- Sincerely yours, Mike.