From patchwork Wed Dec 6 05:55:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Randy Dunlap X-Patchwork-Id: 174300 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp3902835vqy; Tue, 5 Dec 2023 21:55:42 -0800 (PST) X-Google-Smtp-Source: AGHT+IE/UiXB6yeR49sjPpRfnflGMA93LPFZYaHxpfA2I0Er+g28GsjOUlV7zJGE6R3Faok57IlH X-Received: by 2002:a05:6808:22a0:b0:3b8:b063:6bba with SMTP id bo32-20020a05680822a000b003b8b0636bbamr503177oib.105.1701842141917; Tue, 05 Dec 2023 21:55:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701842141; cv=none; d=google.com; s=arc-20160816; b=BR3y6g/dgwUYgj7OAinwYyz0yOxJ/xyLQBRuwl2E1KrNgUMgHoGBVB+oVWM2/EmS5p k/ycxGvVYDj3Q+kJlR5vEOawPsdxx6n9FDWds4h/qQ5cIUJIoAHPb3kdvkf4GPosHCuH /9PaPFFQr6w6oqenuWZBWQEY+r3aXfrLYW3KKQcWez4YkR1b7mFDnXT2SCFhrJeUD3A1 Cqo7l3BFsbwWiqTq5flLgAcnK521nCqt8egGGysdk3qjSDabPXTOamHgkJ2zTJ/wI7s8 b0EyO7GZwGdwEE503z7ePyVMSyGfBWk3sXS/ow9csTOT5H9uAP7F/9Hyo1PT5Pjzn4Nk g2Rg== 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=cve8B6slllsHbzs7scFf7ow6SwDdgTLgILnKqEnvrds=; fh=c7VFvrf1iwhrhDwBWi4vk8ya9E1yHI09VyEl/SuZYW8=; b=D3Qx5aVfXK8EIBC0G9F6WA23eHfCV4woyN2rQqrIq5lwDqNIOkTTp0Y1kV4ckm6RDy C97WPpHgzomwdyoT0gsGDvfLnrait55Kx4YSDam2CfQF2TSYecCGtKY0LKo3rTj3rV1v UqlnRRFtdmPieKjJmZBGpKp3UG/1Rx2LH4IeZxYveJ95hEyUcldHFp3uYKavlVm/UOfQ Vphqu3m7pz7J0AVaAAn2X70lfv8a58rpS82HsBf8K4EpfLkQ3Hh3hhYYkERtWrNgvNRz XTfUyhLL9g5139stCGVlmE2/4obF6mECoKe/cbz2h8d5x+VSCBOptHHkIV8Z6Gkbeljz rIaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=YnMQR4dL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id c16-20020a631c50000000b005c6977f9c0dsi3701401pgm.214.2023.12.05.21.55.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 21:55:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=YnMQR4dL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 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 morse.vger.email (Postfix) with ESMTP id 5B3C9801BA9F; Tue, 5 Dec 2023 21:55:39 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1376738AbjLFFzY (ORCPT + 99 others); Wed, 6 Dec 2023 00:55:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54286 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1376643AbjLFFzX (ORCPT ); Wed, 6 Dec 2023 00:55:23 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A5F151BC for ; Tue, 5 Dec 2023 21:55:29 -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=cve8B6slllsHbzs7scFf7ow6SwDdgTLgILnKqEnvrds=; b=YnMQR4dL0al69+lHcV1w4uAIQw omEm+YIyLr9Y8Shy9Kvh6v4Df0ETFWZqk2Y81V380dgm/bSbKYIe6CurIcJU1+xJ84KAb8lkCFHO7 75MGdLRwcoVFpqUQsLB/gTB56J4uzUyTm7/psmDxgGwC36WFvVLiXJsZshr/wfcaFa4xA661fi03E J0g6RqpYn9vNOfF39hpG1tA6CwHOyMhWSZ0WdPhFyhM7+VD7K5HdnlJDvxe3EgjZQ/1spk1vshOp5 /aMo1p4w1Y+Akb1uzMjzS0jYbT+WSoxmYt3v8V11gHxEbOcdlkYhATX1P3eXvDtSWOjB//XLvC89d a3+I0vwg==; Received: from [50.53.46.231] (helo=bombadil.infradead.org) by bombadil.infradead.org with esmtpsa (Exim 4.96 #2 (Red Hat Linux)) id 1rAksb-0098YF-1T; Wed, 06 Dec 2023 05:55:29 +0000 From: Randy Dunlap To: linux-kernel@vger.kernel.org Cc: Randy Dunlap , Alexander Shishkin Subject: [PATCH] intel_th: msu: fix kernel-doc warnings Date: Tue, 5 Dec 2023 21:55:28 -0800 Message-ID: <20231206055528.10176-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 morse.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 (morse.vger.email [0.0.0.0]); Tue, 05 Dec 2023 21:55:39 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784510825709233553 X-GMAIL-MSGID: 1784510825709233553 Correct function comments to prevent kernel-doc warnings found when using "W=1". msu.c:77: warning: Function parameter or member 'msc' not described in 'msc_window' msu.c:122: warning: bad line: msu.c:760: warning: No description found for return value of 'msc_configure' msu.c:1309: warning: Function parameter or member 'nr_pages' not described in 'msc_buffer_alloc' msu.c:1309: warning: Function parameter or member 'nr_wins' not described in 'msc_buffer_alloc' msu.c:1309: warning: Excess function parameter 'size' description in 'msc_buffer_alloc' msu.c:1376: warning: No description found for return value of 'msc_buffer_free_unless_used' msu.c:1444: warning: No description found for return value of 'msc_win_to_user' Signed-off-by: Randy Dunlap Cc: Alexander Shishkin --- drivers/hwtracing/intel_th/msu.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff -- a/drivers/hwtracing/intel_th/msu.c b/drivers/hwtracing/intel_th/msu.c --- a/drivers/hwtracing/intel_th/msu.c +++ b/drivers/hwtracing/intel_th/msu.c @@ -61,6 +61,7 @@ enum lockout_state { * @lo_lock: lockout state serialization * @nr_blocks: number of blocks (pages) in this window * @nr_segs: number of segments in this window (<= @nr_blocks) + * @msc: pointer to the MSC device * @_sgt: array of block descriptors * @sgt: array of block descriptors */ @@ -119,7 +120,6 @@ struct msc_iter { * @user_count: number of users of the buffer * @mmap_count: number of mappings * @buf_mutex: mutex to serialize access to buffer-related bits - * @enabled: MSC is enabled * @wrap: wrapping is enabled * @mode: MSC operating mode @@ -755,6 +755,8 @@ unlock: * Program storage mode, wrapping, burst length and trace buffer address * into a given MSC. Then, enable tracing and set msc::enabled. * The latter is serialized on msc::buf_mutex, so make sure to hold it. + * + * Returns: %0 for success or a negative error code otherwise. */ static int msc_configure(struct msc *msc) { @@ -1291,7 +1293,8 @@ static void msc_buffer_free(struct msc * /** * msc_buffer_alloc() - allocate a buffer for MSC * @msc: MSC device - * @size: allocation size in bytes + * @nr_pages: number of pages for each window + * @nr_wins: number of windows * * Allocate a storage buffer for MSC, depending on the msc::mode, it will be * either done via msc_buffer_contig_alloc() for SINGLE operation mode or @@ -1370,6 +1373,9 @@ static int msc_buffer_unlocked_free_unle * @msc: MSC device * * This is a locked version of msc_buffer_unlocked_free_unless_used(). + * + * Return: 0 on successful deallocation or if there was no buffer to + * deallocate, -EBUSY if there are active users. */ static int msc_buffer_free_unless_used(struct msc *msc) { @@ -1438,6 +1444,8 @@ struct msc_win_to_user_struct { * @data: callback's private data * @src: source buffer * @len: amount of data to copy from the source buffer + * + * Returns: >= %0 for success or -errno for error. */ static unsigned long msc_win_to_user(void *data, void *src, size_t len) {