Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp6051058rwl; Mon, 9 Jan 2023 03:39:47 -0800 (PST) X-Google-Smtp-Source: AMrXdXtPOq+LKsZXvmRdGN9kIPqvEcAHL73sgvgxCkBY/hRMMiI8mx6YT9Q15i/LXamVFXV7KyVC X-Received: by 2002:a05:6a21:2d8c:b0:a4:aa40:2260 with SMTP id ty12-20020a056a212d8c00b000a4aa402260mr85370535pzb.60.1673264387234; Mon, 09 Jan 2023 03:39:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673264387; cv=none; d=google.com; s=arc-20160816; b=UZwkC9EFWkwNUfojlWEBD1Qh59Fx8JmERHT8TCAyhNhVODNNheqwYqLKsCUmZxz/oI 6y3PjEgBDI/7nWLcIMroA8TTpbaiMJh/sDzpw2C+7YGERGolwzo6nbpjI8veQ3Mhk4NN sghEprcHsCEUkjrGS0vrydFsWAIrnYG+IPaiFEwDqxE1BNrPfpoUKEYdLlO2UkdvOQBq acFo55kO69ZpX4xUD+HaEdVTZYzETZ0gCxaZC5ApCCQzXCbsqgK2LBg5C2LG4vTZBACw RoHnjBbXbGjXhIhksaXPJfMRHJu9Nz6dUDi+GqzMpSc3NM6oS1uE79eK+3Bv0HUMp8Am Orvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :content-language:references:to:subject:user-agent:mime-version:date :message-id:dkim-signature; bh=EnnvChdqk1Z+ZGVOIW6755zSSpkoc71+R3gbA72lBx8=; b=h12HBjfd+X//iONNtT9CYHhS+x1YB2VO6Dc4H+FcfQthp3YhVUYVqbujL2ZvefYLh8 KONA6cwoaQAVGyf36WLXjbHEHLTmGpxFNMy/qsBda8qq7nHUI9jBIfba7GAsZeiZ7iYI jFLmi7cf6SBbiED2CMELIof0RavTfF4YYOtjG3+6sEruHP0aW+7weSy7mvAPx8YYB9BH tHY83vElwWp5/7qmWa08X1oO/LSD4DsUlIW5QphpttOXv/4Hyk6E66Da7C7PyNl0raXG pAoMxGiLYzNBGFjGC8fPol4VBDHYZA+hSK1ttL/6Y1PEBh5p2D/oykz9FrSDodk9LNoJ lEHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@igalia.com header.s=20170329 header.b=iiYwvY1I; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t1-20020a639541000000b0049bb86670d0si8829279pgn.290.2023.01.09.03.39.40; Mon, 09 Jan 2023 03:39:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail header.i=@igalia.com header.s=20170329 header.b=iiYwvY1I; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233562AbjAIL2z (ORCPT + 53 others); Mon, 9 Jan 2023 06:28:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49808 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236964AbjAIL2u (ORCPT ); Mon, 9 Jan 2023 06:28:50 -0500 Received: from fanzine2.igalia.com (fanzine2.igalia.com [213.97.179.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 39EB218B2B for ; Mon, 9 Jan 2023 03:28:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=igalia.com; s=20170329; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:From: References:To:Subject:MIME-Version:Date:Message-ID:Sender:Reply-To:Cc: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=EnnvChdqk1Z+ZGVOIW6755zSSpkoc71+R3gbA72lBx8=; b=iiYwvY1IGbb7K2olLqk1zhnTf2 ql2WKrHxOXsEOukPeh1p1AjR0fxiY4nLTXguUvvL9Hck9ZHZoU/st1RINj4lp3PboU7uai5Fqna8d SylDSZvjiwT+DUnqjkZIUeCfD/lVNXfbpJpy5/AqG033lcqfSSVuiAh3fLibBjr3vecIh7vVcRtDj xg/JUZHHcxbWvMFeuvAockmtuo5KluoGEpRCUSPNdYeLRuandRULlX5MK7qGdEtibjUukIOPPiTyX 80BX3enLTOBUibTd+SOjsX39pFYr6kYmLv2twp1ShNFTvd74aiP87wMl086oFvP7+IkdNJdUFqsI/ Va0n9xGQ==; Received: from [187.36.234.139] (helo=[192.168.1.195]) by fanzine2.igalia.com with esmtpsa (Cipher TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_128_GCM:128) (Exim) id 1pEqKH-003KdB-QA; Mon, 09 Jan 2023 12:28:26 +0100 Message-ID: Date: Mon, 9 Jan 2023 08:28:20 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.0 Subject: Re: [PATCH 2/2] drm/debugfs: add descriptions to struct parameters To: Stephen Rothwell , Jani Nikula , Maxime Ripard , Maarten Lankhorst , Thomas Zimmermann , David Airlie , Melissa Wen , =?UTF-8?Q?Andr=c3=a9_Almeida?= , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org References: <20230105193039.287677-1-mcanal@igalia.com> <20230105193039.287677-2-mcanal@igalia.com> Content-Language: en-US From: =?UTF-8?Q?Ma=c3=adra_Canal?= In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 1/6/23 17:19, Daniel Vetter wrote: > On Thu, Jan 05, 2023 at 04:30:39PM -0300, Maíra Canal wrote: >> The structs drm_debugfs_info and drm_debugfs_entry don't have >> descriptions for their parameters, which is causing the following warnings: >> >> include/drm/drm_debugfs.h:93: warning: Function parameter or member >> 'name' not described in 'drm_debugfs_info' >> include/drm/drm_debugfs.h:93: warning: Function parameter or member >> 'show' not described in 'drm_debugfs_info' >> include/drm/drm_debugfs.h:93: warning: Function parameter or member >> 'driver_features' not described in 'drm_debugfs_info' >> include/drm/drm_debugfs.h:93: warning: Function parameter or member >> 'data' not described in 'drm_debugfs_info' >> include/drm/drm_debugfs.h:105: warning: Function parameter or member >> 'dev' not described in 'drm_debugfs_entry' >> include/drm/drm_debugfs.h:105: warning: Function parameter or member >> 'file' not described in 'drm_debugfs_entry' >> include/drm/drm_debugfs.h:105: warning: Function parameter or member >> 'list' not described in 'drm_debugfs_entry' >> >> Therefore, fix the warnings by adding descriptions to all struct >> parameters. >> >> Reported-by: Stephen Rothwell >> Signed-off-by: Maíra Canal >> --- >> include/drm/drm_debugfs.h | 18 ++++++++++++++++++ >> 1 file changed, 18 insertions(+) >> >> diff --git a/include/drm/drm_debugfs.h b/include/drm/drm_debugfs.h >> index 53b7297260a5..7616f457ce70 100644 >> --- a/include/drm/drm_debugfs.h >> +++ b/include/drm/drm_debugfs.h >> @@ -86,9 +86,22 @@ struct drm_info_node { >> * core. >> */ >> struct drm_debugfs_info { >> + /** @name: File name */ >> const char *name; >> + >> + /** >> + * @show: >> + * >> + * Show callback. &seq_file->private will be set to the &struct >> + * drm_debugfs_entry corresponding to the instance of this info >> + * on a given &struct drm_device. > > So this is a bit late, but why don't we pass that drm_debugfs_entry as an > explicit parameter? Or maybe just the struct drm_device, because that and > the void *data is really all there is to pass along. Would give us more > type-safety, which really is the main reason for having drm-specific > debugfs functions. It seems like a better idea to pass the drm_debugfs_entry as an explicit parameter. I can work on it, but I guess it is a better idea to finish the conversion of all drm_debugfs_create_files() to drm_debugfs_add_files() and then perform the change in the show() signature. Best Regards, - Maíra Canal > > Either way, on the series: Reviewed-by: Daniel Vetter > >> + */ >> int (*show)(struct seq_file*, void*); >> + >> + /** @driver_features: Required driver features for this entry. */ >> u32 driver_features; >> + >> + /** @data: Driver-private data, should not be device-specific. */ >> void *data; >> }; >> >> @@ -99,8 +112,13 @@ struct drm_debugfs_info { >> * drm_debugfs_info on a &struct drm_device. >> */ >> struct drm_debugfs_entry { >> + /** @dev: &struct drm_device for this node. */ >> struct drm_device *dev; >> + >> + /** @file: Template for this node. */ >> struct drm_debugfs_info file; >> + >> + /** @list: Linked list of all device nodes. */ >> struct list_head list; >> }; >> >> -- >> 2.39.0 >> >