Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp172878yba; Fri, 5 Apr 2019 04:31:05 -0700 (PDT) X-Google-Smtp-Source: APXvYqzVP9ypWchZyzuz57RHXLl2n5He9EC7ezpoFv4ctNjDTe/lZDzKy4MIrQ50simDjf6/Va0T X-Received: by 2002:a17:902:864b:: with SMTP id y11mr12287104plt.1.1554463865414; Fri, 05 Apr 2019 04:31:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554463865; cv=none; d=google.com; s=arc-20160816; b=TEXX/rvmOPg7nwP7gylwG9qTd5qIwKvgr7pTt7pmgqYXHdaQSoOtcyxVr/otYsfmO6 RmuCYjrKxtu7TRyBvvMPCnGrOK6ufyXBK0KRj5BgDX2OrNaLr6PCi6H5OmlNXYulPJQu 4Pi0WVCo4UHygTaNMNogB1QBzOlh+J+5Ho0bRndpzonXqkq+x8p7ans7htr6/ZOtiF51 X2QT2xZci5uzlNqPLS11PA/fw7azrd6XOpvXkSx1S5zqssTOo5DGCzkg/CTtWWmnEjmQ lGe8w+5vl1L/5IGzYfTaW0tJYnarMH8TEwTWQC5J+8Q3PPrZ80BoIhZjdWkKt3j8C1uJ bgyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=e6g7119O9Jshwu7RGrPbZfdaqIAGKLvIZLc9sohZmig=; b=jIbD1hgSvWh9aphTnNo12vFAuyhw21B/MBUcUPjBgqzpZuRESzrRtyISIHNSXiPLSN v5V5CuY7EBxYDfErF3xRvGPNBGLGb+xqdL16Vf73WtVX9gIi3CUAFTAmXb0/hSshXf/n pLprG8iMowicz7EoGNYl7z9ftfl3xSymjRabsc9YB33Cr0qo/A/dCLDNRalamUFxMV3T NbL9OwzFZaVB6fbHpVk1+r9hl8P+0x2xbDRy8ShlSRKK3VyL6QC022tK5SqOsXjhWLei pXk28EPP/FslRtLNvE1oMDL6UpPSq9457tX/IiyaPmaZ9vSwPQpaRQnGfDwEJ73/tmuk Zd4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b=OnAcZFp3; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l40si19512138plb.164.2019.04.05.04.30.49; Fri, 05 Apr 2019 04:31: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; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b=OnAcZFp3; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731085AbfDEL2m (ORCPT + 99 others); Fri, 5 Apr 2019 07:28:42 -0400 Received: from mout.gmx.net ([212.227.15.15]:46553 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730596AbfDEL2l (ORCPT ); Fri, 5 Apr 2019 07:28:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1554463716; bh=6fHvPidcPyBfB2ec8H5GPO/3TGnHjppQPxknaY/Obas=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=OnAcZFp3hu62iK6UihzCMKP8bpXsumUQoQlHQUWqZk5HxMdw8tNHms1wStuWq0GVY jZv1mSYRbJjuPxzeUrGGTnKPU5PaWfZBeXDdkNV7Px/E75pwI38BRZ1B2O3uICdF78 FGQ+o2G3OLm1JxCpfbyQTPEud04/qhUw++mK4lKQ= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from localhost.localdomain ([218.18.229.179]) by mail.gmx.com (mrgmx003 [212.227.17.184]) with ESMTPSA (Nemesis) id 0MF4iR-1h9HYG2Rel-00GLXh; Fri, 05 Apr 2019 13:28:36 +0200 From: Chengguang Xu To: gregkh@linuxfoundation.org, dan.carpenter@oracle.com Cc: linux-fsdevel@vger.kernel.org, viro@zeniv.linux.org.uk, linux-kernel@vger.kernel.org, Chengguang Xu Subject: [PATCH v3 4/4] chardev: update comment based on the code Date: Fri, 5 Apr 2019 19:27:11 +0800 Message-Id: <20190405112711.25275-4-cgxu519@gmx.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190405112711.25275-1-cgxu519@gmx.com> References: <20190405112711.25275-1-cgxu519@gmx.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:MQAtPIdquU8vizTMTxMqZfkfBrCseOhtvEPbYX5jluClV/SBNhW 64goyVoxlTSbiJt67Nao/ASKpncHA/F/SlUSl0Oy3gW2kXZx79fXsLTMF+3Bf1W/WiAzkbi UUg7b5PeIRAWAP8QGXzzzO0xya6LXCjNKD26Sp6/yyo9BMB8Q2CwJqJ1JeSoHHB3mxUYKoc WIEGVQnqmi2BSzxNDnt0A== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:3j62aQPKGJI=:BEXdWOzFINBZcgqY1MyNec 8k6o6fXHu97i808zRBOm+yOfMSexf/ydKTdReva3b92WECV/EMqrk+OH/JczOV31+J7SFGfD8 KI7MZMFY9FTkwa65cCjEVzs5merJ9hwBjcQi4PSxnZDY8DH1oeMNtxUSjTCU3USnK/RtTGobQ 8ue8Jo/JHHgI7FekoOu74U9y/fT5KzK4brIrcusLmCYWPlOG0S871El2WAVIq3kSI5d8n2lN6 sqdpnzUrZW5Ko5dx4iVj2YZ/hgBaBS011s9OUGEpNxke/CatmbYmxceXEWh3qF8urDOTFfHVY 0pXvlgycpF/fN29f8liNPZmkaovd5Gb0boBZkNRiEsitpJe2s0+zUQu9sC676rYI0z7UctS6a bPRX9RSpcmRrFndovQPEku/nMAVizWalhT9Y8nIK/n7P0MoQCHj90O4PCyKPDotsByovd9FBr K/IFXYwOQtq9FjEjFKDAgBw+TEotEdUzQOjlqL8RCrhfndrOqkzKcMQhoZT9WuSZ3VaAEFnnb 5ZtjC3zOC/zHsy1ILnXpxuZQ/HYPlHLCzTprThyJcxszFPIlinB9ANEtbwAWyYSN7mNLLkATR ehRkL0nu2G4naqdQuLJD0FQrw+DB5D+Jy0YotsJnPXwnSkgF7sgiZ2Jn4CHc6HqAQFeQ4xCX1 ylZc/w8LBb9vaDz3U1smSn3sLjJJSq05G/gupS7Qsp5jQT3ofNzxv0ukXgrcBAlZvHQzszt4w nm82S/x3Q9ob36GCuLGQl3kISae4N+Pn5tPaI50l2k7ijgHx1IVWpl2+LEaki/a4Hp65okij1 CEwKvfkUDwOnX97eqTD5K/a7+jHWKnnxolk9+mzvgYej91eIzsU9krWqgFHR5Gb+WHK3WYT/0 8pzgSoZMPTopmY4YWSats8abMCeHlSr/CFGFfmTbpP5DO8ZQ+cZ18mMlP+EVZp Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The function comment of __register_chrdev_region() is out of date, so update it based on the code. Signed-off-by: Chengguang Xu =2D-- v1->v2: - Split fix and cleanup patches. - Remove printing minor range in chrdev_show(). fs/char_dev.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/fs/char_dev.c b/fs/char_dev.c index 47fd0561b03d..00dfe17871ac 100644 =2D-- a/fs/char_dev.c +++ b/fs/char_dev.c @@ -88,13 +88,10 @@ static int find_dynamic_major(void) /* * Register a single major with a specified minor range. * - * If major =3D=3D 0 this functions will dynamically allocate a major and= return - * its number. - * - * If major > 0 this function will attempt to reserve the passed range of - * minors and will return zero on success. + * If major =3D=3D 0 this function will dynamically allocate an unused ma= jor. + * If major > 0 this function will attempt to reserve the range of minors + * with given major. * - * Returns a -ve errno on failure. */ static struct char_device_struct * __register_chrdev_region(unsigned int major, unsigned int baseminor, =2D- 2.20.1