From patchwork Tue Oct 13 11:54:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 11835519 X-Patchwork-Delegate: brendanhiggins@google.com Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3974E109B for ; Tue, 13 Oct 2020 11:56:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1455A20E65 for ; Tue, 13 Oct 2020 11:56:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1602590192; bh=/bHl1yHvnGqPKNbvJvHMSS5pZd7oY1zhfyqb1y94N8k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=HUbzPQK7JXWUaO0BVDF0NPqUX2Tq8h0RjmDb15dowrMCkgSUOSJZThJJE63VI5cgl A7eUiwolFBBa22IEzvhZoOIocYEyq9UwmIiKzerRPbQBEtZslzjV1LS3hqtMQm8Edz /jlJL5S1DzWkhETx8RnfRy9zgW0k2kfRZwExIfT4= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728024AbgJML4b (ORCPT ); Tue, 13 Oct 2020 07:56:31 -0400 Received: from mail.kernel.org ([198.145.29.99]:57432 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727674AbgJMLyt (ORCPT ); Tue, 13 Oct 2020 07:54:49 -0400 Received: from mail.kernel.org (ip5f5ad5b2.dynamic.kabel-deutschland.de [95.90.213.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 643F622522; Tue, 13 Oct 2020 11:54:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1602590081; bh=/bHl1yHvnGqPKNbvJvHMSS5pZd7oY1zhfyqb1y94N8k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qJSDrlV6GRFR/TU/l/hKCldbSIieoO0iSbL/1nxNFEFQL6yHxmlN8TJkgl5VEKNEP aM1GZoG4Lm6eYBxVZyfrhLnfvqYjyPJt+1zwLRYEOg+O+M+CDgCb90iGVqeCoEQ/aJ bv+DGGHi2YM0CtlWVtac6KBCoYD5F84CZ5+SwW28= Received: from mchehab by mail.kernel.org with local (Exim 4.94) (envelope-from ) id 1kSIt5-006CW3-EM; Tue, 13 Oct 2020 13:54:39 +0200 From: Mauro Carvalho Chehab To: Linux Doc Mailing List Cc: Mauro Carvalho Chehab , "Jonathan Corbet" , Brendan Higgins , kunit-dev@googlegroups.com, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: [PATCH v6 61/80] kunit: test.h: solve kernel-doc warnings Date: Tue, 13 Oct 2020 13:54:16 +0200 Message-Id: X-Mailer: git-send-email 2.26.2 In-Reply-To: References: MIME-Version: 1.0 Sender: Mauro Carvalho Chehab Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org There are some warnings there: ./include/kunit/test.h:90: warning: Function parameter or member 'name' not described in 'kunit_resource' ./include/kunit/test.h:353: warning: Function parameter or member 'res' not described in 'kunit_add_resource' ./include/kunit/test.h:367: warning: Function parameter or member 'res' not described in 'kunit_add_named_resource' ./include/kunit/test.h:367: warning: Function parameter or member 'name' not described in 'kunit_add_named_resource' ./include/kunit/test.h:367: warning: Function parameter or member 'data' not described in 'kunit_add_named_resource' ./include/kunit/test.h:367: warning: Excess function parameter 'name_data' description in 'kunit_add_named_resource' Address them, ensuring that all non-private arguments will be properly described. With that regards, at struct kunit_resource, the free argument is described as user-provided. So, this doesn't seem to belong to the "private" part of the struct. Signed-off-by: Mauro Carvalho Chehab --- include/kunit/test.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/include/kunit/test.h b/include/kunit/test.h index 59f3144f009a..41b3a266bf8c 100644 --- a/include/kunit/test.h +++ b/include/kunit/test.h @@ -25,6 +25,7 @@ typedef void (*kunit_resource_free_t)(struct kunit_resource *); /** * struct kunit_resource - represents a *test managed resource* * @data: for the user to store arbitrary data. + * @name: optional name * @free: a user supplied function to free the resource. Populated by * kunit_resource_alloc(). * @@ -80,10 +81,10 @@ typedef void (*kunit_resource_free_t)(struct kunit_resource *); */ struct kunit_resource { void *data; - const char *name; /* optional name */ - - /* private: internal use only. */ + const char *name; kunit_resource_free_t free; + + /* private: internal use only. */ struct kref refcount; struct list_head node; }; @@ -343,6 +344,7 @@ static inline void kunit_put_resource(struct kunit_resource *res) * none is supplied, the resource data value is simply set to @data. * If an init function is supplied, @data is passed to it instead. * @free: a user-supplied function to free the resource (if needed). + * @res: The resource. * @data: value to pass to init function or set in resource data field. */ int kunit_add_resource(struct kunit *test, @@ -356,7 +358,9 @@ int kunit_add_resource(struct kunit *test, * @test: The test context object. * @init: a user-supplied function to initialize the resource data, if needed. * @free: a user-supplied function to free the resource data, if needed. - * @name_data: name and data to be set for resource. + * @res: The resource. + * @name: name to be set for resource. + * @data: value to pass to init function or set in resource data field. */ int kunit_add_named_resource(struct kunit *test, kunit_resource_init_t init, From patchwork Tue Oct 13 11:54:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 11835517 X-Patchwork-Delegate: brendanhiggins@google.com Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B02A1697 for ; Tue, 13 Oct 2020 11:56:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8CD232173E for ; Tue, 13 Oct 2020 11:56:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1602590189; bh=tzgaAgJpIzDjlP2NVIAPK4NTSvcnNtwteXFciBdLZFY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=KrR2fJ4fpgnDSjL9XRW88CKRq7VQ/DB5KbJcHCjpcm+lXgBe6jaZaqn2kdI4fXTgG tzz/+0TBfSozwhZ3Oi2DD6GVXY6Y9kaYZpapKXsqdGabiyAyzV+OubG4dXwYQc7j6a HSamIuut9Gl18vwLk+8mQtPR4BchAkKir1TDEVvA= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727787AbgJML4M (ORCPT ); Tue, 13 Oct 2020 07:56:12 -0400 Received: from mail.kernel.org ([198.145.29.99]:57942 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727681AbgJMLyt (ORCPT ); Tue, 13 Oct 2020 07:54:49 -0400 Received: from mail.kernel.org (ip5f5ad5b2.dynamic.kabel-deutschland.de [95.90.213.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 81C43225AC; Tue, 13 Oct 2020 11:54:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1602590081; bh=tzgaAgJpIzDjlP2NVIAPK4NTSvcnNtwteXFciBdLZFY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Nb6alqc59amhsSKHlBfBaX3FBd5o2g+LMPnJE9KjApg8ajQyCbBkm3ZLE24M62EA7 WL/aCZTzURo1nQoBIu085dqf0HGnbLnjIGNJ8u6qH/kGM54CKIWhufnAWgngBr9A69 VH8X46Q+DjKKCUn32omasTJGH+34szgyEfVxgW5g= Received: from mchehab by mail.kernel.org with local (Exim 4.94) (envelope-from ) id 1kSIt5-006CWC-Gk; Tue, 13 Oct 2020 13:54:39 +0200 From: Mauro Carvalho Chehab To: Linux Doc Mailing List Cc: Mauro Carvalho Chehab , "Jonathan Corbet" , Brendan Higgins , kunit-dev@googlegroups.com, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: [PATCH v6 64/80] kunit: test.h: fix a bad kernel-doc markup Date: Tue, 13 Oct 2020 13:54:19 +0200 Message-Id: <8d3ec9c166ba2697b22a5d47c510946a7005a533.1602589096.git.mchehab+huawei@kernel.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: References: MIME-Version: 1.0 Sender: Mauro Carvalho Chehab Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org As warned by: ./include/kunit/test.h:504: WARNING: Block quote ends without a blank line; unexpected unindent. The right way to describe a function is: name - description Instead, kunit_remove_resource was using: name: description Causing it to be improperly parsed. Signed-off-by: Mauro Carvalho Chehab --- include/kunit/test.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/kunit/test.h b/include/kunit/test.h index 41b3a266bf8c..5c5ed262a950 100644 --- a/include/kunit/test.h +++ b/include/kunit/test.h @@ -498,8 +498,8 @@ static inline int kunit_destroy_named_resource(struct kunit *test, } /** - * kunit_remove_resource: remove resource from resource list associated with - * test. + * kunit_remove_resource() - remove resource from resource list associated with + * test. * @test: The test context object. * @res: The resource to be removed. *