From patchwork Tue Dec 5 17:32:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Randy Dunlap X-Patchwork-Id: 174148 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp3589316vqy; Tue, 5 Dec 2023 09:32:42 -0800 (PST) X-Google-Smtp-Source: AGHT+IF4+d3Jfi+DFDf98pPsG4HzAhHV9MgPGk/eqnirRAKIbVwrrTHUNJQjyu5uYinFj8EXTIUc X-Received: by 2002:a05:6a20:841e:b0:188:444e:2b74 with SMTP id c30-20020a056a20841e00b00188444e2b74mr3595458pzd.50.1701797562230; Tue, 05 Dec 2023 09:32:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701797562; cv=none; d=google.com; s=arc-20160816; b=llIpVlxEH3YnCtqbMprGaJTrziuKSR9Olg3cZn8qoWrAsHTnTgCHWVH28uVOZf/EIT k9yjgYy/mohfrH1clrPOrg6+Gdt+Si9703X/ZJIIQzJqeA6vYO85+9cO+8AkRafeCo6L JeWdiDBJ7mJyoHhjJm+jgIrcd+qsGsZNC7Tq8usnOg7ljsi7gyE4gOmOaU+eJvDdONhY 2rNFXZtOmTeuq69TyVOcRl1+yGVMJsQfcLgwuYjjCVrSVf7z6B1zhvHzxDTyjevNQoYE JPUUkHvEgpGekN5pllHW3liSoekFNEnIcxQ10WiVVd8A84z6gX+XF1DCRjty1S6JKV/U gRnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=OrfTo/Owz4NrJFfbfU9QR1N7TorNMwrOqn5rTcm+KvY=; fh=zccTYD++6TLChXlIHXXW4gDsParL7hI/hTItoVpkjl0=; b=rynkwclpaUZzsI7yHbGkOlcCdqzHanNGMiwEiPPVaAO4ot4J+VSClC6HdSysuJ9rTv 2kMThVV0x47HyUpvp3X7HOa3L6UjIRFkyJn/wG60nllPaw1o1hNyN2mxjA2cdjuXuRLD Ezb0m5Yg5Ve8WV5qFsWG/JlgXfT+zmUTw9nb1D1Pm2CADKsXd35m6ZSlWoeNmUwX0k0z 7XGK/hpeWnoZfes21u4dfDJcdWY+4ETcRCVXNAzeLCkMxjrexWmLQj6nTdxYl6u4bNb+ sMjYPDnMQhpRxMkFxvFF9JbO4l3gXHx+hqZcS8ROim+qJg+Hx5ZdQCRfwXT+1/O3vBiT optA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=ardZfDHd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id a14-20020a17090a70ce00b00286d8ebf7f2si1729449pjm.164.2023.12.05.09.32.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 09:32:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=ardZfDHd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id F13018059D80; Tue, 5 Dec 2023 09:32:34 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232240AbjLERcS (ORCPT + 99 others); Tue, 5 Dec 2023 12:32:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47958 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231910AbjLERcR (ORCPT ); Tue, 5 Dec 2023 12:32:17 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 73614188 for ; Tue, 5 Dec 2023 09:32:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:In-Reply-To:References; bh=OrfTo/Owz4NrJFfbfU9QR1N7TorNMwrOqn5rTcm+KvY=; b=ardZfDHdXsZ8ibLlXJF8/V9Djg 3jt+g2oQseqBarq9O1OBc0vya59u9N0gSJf6sgwjjlVfbY0UdBW0ZfEph4W1R+7RJfpLZaXefIEKf jxiiNQIv99KM42Ki2xXCEk2YNQXfvAQEYI5xMc8k0YXuoRn0a5Hvo2r1vlgJ1s7+g5ydkqfLv7jdJ X0dSqSKl0HMNtDmLtSYDeSkHD8kUsdwqgdG4aWWaKR2FS2IUoWeyodP2hCXVOEB7hXb1knozzsqsi SED+OP20BcV9JG4QbyeolxljsLYsRt/LdBR1AdmEAghuxzrt/Am5dk/edTj13d5+XarXFZS7q91lI hXyIT/zQ==; Received: from [50.53.46.231] (helo=bombadil.infradead.org) by bombadil.infradead.org with esmtpsa (Exim 4.96 #2 (Red Hat Linux)) id 1rAZHS-0082ez-1z; Tue, 05 Dec 2023 17:32:22 +0000 From: Randy Dunlap To: linux-kernel@vger.kernel.org Cc: Randy Dunlap , David Woodhouse , Richard Weinberger , linux-mtd@lists.infradead.org Subject: [PATCH] jffs2: nodemgmt: fix kernel-doc comments Date: Tue, 5 Dec 2023 09:32:22 -0800 Message-ID: <20231205173222.12575-1-rdunlap@infradead.org> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Tue, 05 Dec 2023 09:32:35 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784464080237901891 X-GMAIL-MSGID: 1784464080237901891 Update the end of one sentence where a comment was truncated. (dwmw2) Fix a bunch of kernel-doc warnings: nodemgmt.c:72: warning: Function parameter or member 'sumsize' not described in 'jffs2_do_reserve_space' nodemgmt.c:72: warning: expecting prototype for jffs2_reserve_space(). Prototype was for jffs2_do_reserve_space() instead nodemgmt.c:76: warning: Function parameter or member 'sumsize' not described in 'jffs2_reserve_space' nodemgmt.c:76: warning: No description found for return value of 'jffs2_reserve_space' nodemgmt.c:503: warning: Function parameter or member 'ofs' not described in 'jffs2_add_physical_node_ref' nodemgmt.c:503: warning: Function parameter or member 'ic' not described in 'jffs2_add_physical_node_ref' nodemgmt.c:503: warning: Excess function parameter 'new' description in 'jffs2_add_physical_node_ref' nodemgmt.c:503: warning: No description found for return value of 'jffs2_add_physical_node_ref' Signed-off-by: Randy Dunlap Cc: David Woodhouse Cc: Richard Weinberger Cc: linux-mtd@lists.infradead.org Reviewed-by: Zhihao Cheng --- fs/jffs2/nodemgmt.c | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff -- a/fs/jffs2/nodemgmt.c b/fs/jffs2/nodemgmt.c --- a/fs/jffs2/nodemgmt.c +++ b/fs/jffs2/nodemgmt.c @@ -49,28 +49,31 @@ static int jffs2_rp_can_write(struct jff return 0; } +static int jffs2_do_reserve_space(struct jffs2_sb_info *c, uint32_t minsize, + uint32_t *len, uint32_t sumsize); + /** * jffs2_reserve_space - request physical space to write nodes to flash * @c: superblock info * @minsize: Minimum acceptable size of allocation * @len: Returned value of allocation length * @prio: Allocation type - ALLOC_{NORMAL,DELETION} + * @sumsize: summary size requested or JFFS2_SUMMARY_NOSUM_SIZE for no summary + * + * Requests a block of physical space on the flash. * - * Requests a block of physical space on the flash. Returns zero for success - * and puts 'len' into the appropriate place, or returns -ENOSPC or other - * error if appropriate. Doesn't return len since that's + * Returns: %0 for success and puts 'len' into the appropriate place, + * or returns -ENOSPC or other error if appropriate. + * Doesn't return len since that's already returned in @len. * - * If it returns zero, jffs2_reserve_space() also downs the per-filesystem + * If it returns %0, jffs2_reserve_space() also downs the per-filesystem * allocation semaphore, to prevent more than one allocation from being - * active at any time. The semaphore is later released by jffs2_commit_allocation() + * active at any time. The semaphore is later released by jffs2_commit_allocation(). * * jffs2_reserve_space() may trigger garbage collection in order to make room * for the requested allocation. */ -static int jffs2_do_reserve_space(struct jffs2_sb_info *c, uint32_t minsize, - uint32_t *len, uint32_t sumsize); - int jffs2_reserve_space(struct jffs2_sb_info *c, uint32_t minsize, uint32_t *len, int prio, uint32_t sumsize) { @@ -488,13 +491,16 @@ static int jffs2_do_reserve_space(struct /** * jffs2_add_physical_node_ref - add a physical node reference to the list * @c: superblock info - * @new: new node reference to add + * @ofs: offset in the block * @len: length of this physical node + * @ic: inode cache pointer * * Should only be used to report nodes for which space has been allocated * by jffs2_reserve_space. * * Must be called with the alloc_sem held. + * + * Returns: pointer to new node on success or -errno code on error */ struct jffs2_raw_node_ref *jffs2_add_physical_node_ref(struct jffs2_sb_info *c,