Received: by 2002:a25:5b86:0:0:0:0:0 with SMTP id p128csp1561886ybb; Fri, 29 Mar 2019 07:01:00 -0700 (PDT) X-Google-Smtp-Source: APXvYqwG91Tn2uukEJNBkHsT7jZSQbhWtjttD9pFxCukis2iwzYkIDKcVdD9cM11wlZkw+VTjPz8 X-Received: by 2002:a63:9dc4:: with SMTP id i187mr37649554pgd.259.1553868060477; Fri, 29 Mar 2019 07:01:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553868060; cv=none; d=google.com; s=arc-20160816; b=SMIHha9V2iuWiJr7KcFq8xHdRCCy+c48nqi/2tA4ixJnrdAxPEqp7Ug7i9Bo7GKIUe BWJX5WEqUPN3luZMkJO+ARH7FFrVxbx193mItzLK8NGM9Eoo2k6J/AqyDT3Yqp9qEJOo lb9g1vfduMhogrgPpDQdDigpW6/GQXVzkvBEBpAcepuOsT4GHW6dn02HR0fU5m5b79Qu Njb7OFHU5GfLBNwPZX/2eMZaVdPnnX+kGtFFJZhFBAXeQAWSKWpSVQQ13zji4/Psp0f/ 9slozsIM0BjnKgbcQ+RBNKCH2g2oh5mAlVAhnQXnZkuc1zzjAcEytwl0+0/FFwxJNfQ5 8Niw== 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=MIynPzRe7Z4DAsU/5DCr2hL+bCtnX+Jg0QzX1K4DsGk=; b=LrOVymB1gU3BupftB5MaEj9RCSFYI9KPcttRGqqhAz6HEjfyQ+Q0rd/4MHsuty2F1u eR/cLYRV4pmHSzmgVCC02n/D2w4WnDzco+93JslUPlbPkjCKihZ8yB99JswMdmcw/mWP AO94MPmeotbxpXNPfTC/YW1w9nZg5z05HeP4uHQNuFPeF67GTXFEJ21Ppn/1jnh6Ow38 ECm1FHQXgpc553rHKwzGCeRNKiFAnBQHa4drRxDSUqUvdldKx8i6EsusWZZIdUrsEQwO alK3617VJU6wDZNIlztjPZRqZRoInNDaz/cG8xh74rWJP5IOuWc7fJIzQqGH8bc0NQE3 AZlA== 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r11si1842598pgp.433.2019.03.29.07.00.44; Fri, 29 Mar 2019 07:01:00 -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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729042AbfC2OAE (ORCPT + 99 others); Fri, 29 Mar 2019 10:00:04 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34642 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729010AbfC2OAC (ORCPT ); Fri, 29 Mar 2019 10:00:02 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6A0D930718E8; Fri, 29 Mar 2019 14:00:02 +0000 (UTC) Received: from localhost (ovpn-12-24.pek2.redhat.com [10.72.12.24]) by smtp.corp.redhat.com (Postfix) with ESMTPS id AD6365D9D1; Fri, 29 Mar 2019 14:00:01 +0000 (UTC) Date: Fri, 29 Mar 2019 21:59:58 +0800 From: Baoquan He To: Oscar Salvador Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, rafael@kernel.org, akpm@linux-foundation.org, mhocko@suse.com, rppt@linux.ibm.com, willy@infradead.org, fanc.fnst@cn.fujitsu.com Subject: Re: [PATCH v3 1/2] mm/sparse: Clean up the obsolete code comment Message-ID: <20190329135958.GL7627@MiWiFi-R3L-srv> References: <20190329082915.19763-1-bhe@redhat.com> <20190329103644.ljswr5usslrx7twr@d104.suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190329103644.ljswr5usslrx7twr@d104.suse.de> User-Agent: Mutt/1.10.1 (2018-07-13) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Fri, 29 Mar 2019 14:00:02 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/29/19 at 11:36am, Oscar Salvador wrote: > > +/** > > + * 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. > > I am not really into kernel-doc format, but I thought it was something like: > > <-- > Return: > 0: success > -EEXIST: Section is already present > -ENOMEM: Out of memory > --> > > But as I said, I might very well be wrong. Below is excerpt from doc-guide/kernel-doc.rst. Seems they suggest it like this if format returned values with multi-line style. While the format is not strictly defined. I will use it to update. *Return: * * 0 - Success * * -EEXIST - Section is already present * * -ENOMEM - Out of memory The return value, if any, should be described in a dedicated section named ``Return``. .. note:: #) The multi-line descriptive text you provide does *not* recognize line breaks, so if you try to format some text nicely, as in:: * Return: * 0 - OK * -EINVAL - invalid argument * -ENOMEM - out of memory this will all run together and produce:: Return: 0 - OK -EINVAL - invalid argument -ENOMEM - out of memory So, in order to produce the desired line breaks, you need to use a ReST list, e. g.:: * Return: * * 0 - OK to runtime suspend the device * * -EBUSY - Device should not be runtime suspended