From patchwork Mon Feb 28 19:08:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1599120 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=TsTTo4K1; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4K7D6P1958z9tlX for ; Tue, 1 Mar 2022 21:30:37 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 08A1F83CF7; Mon, 28 Feb 2022 20:11:34 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="TsTTo4K1"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 8A9C483BE2; Mon, 28 Feb 2022 20:09:38 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.2 Received: from mail-ot1-x329.google.com (mail-ot1-x329.google.com [IPv6:2607:f8b0:4864:20::329]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 0AD0683C75 for ; Mon, 28 Feb 2022 20:09:18 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-ot1-x329.google.com with SMTP id j8-20020a056830014800b005ad00ef6d5dso10320711otp.0 for ; Mon, 28 Feb 2022 11:09:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=SHVIHMdJjWuKdCkA8h8d+T+DqflbvkdMCEso9L/syhc=; b=TsTTo4K16GQqITCHYumdocOi/gN5g/p9pZRvDRLJtHYct4ZG6bogSpCedpIbFomMwb noR7QWwvfCzi9HSb4R/XQCDptcyFXWhg3oynR22g2mAbnwQws4LPAQMNvQ8zXrIQgB13 73FW7h7W+epcBxXXLod8AxftNFtrcuI3ncxqE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=SHVIHMdJjWuKdCkA8h8d+T+DqflbvkdMCEso9L/syhc=; b=QKpKWpiWwIhhlkD1ku1lLHdP0kfl6NZrPYoGYXXZ6MJIxzEGyuZ9PtmxGlcM/LOrUn jYR8lOH0HDZcIuQLWcjYBkKkcn5mj3by7xt1965HwSPD8oS1tXjCTfh+AOaiK1wtQxY9 n7hTnXcWk01u1Uwr84FpwuZAFMqjAJYVWkxvwMS+3ZVi7+uMw6AMpktRBGnoQFb4Npgh e9PcIvuAV0n/AN1Vs8UcPlhMwEJeV+oR5PT+b4y3w1GEZJV81lYg/Umo5/kfEhw08pov QcGbeijTCmjc1XW+iD0Sd+S6WSiLskdAfH3klkAbNGGxDOcRpnF4R7GzwIQp/pTWDf5S fTZg== X-Gm-Message-State: AOAM530wZyxYEB8znEh4TQSiMDj3fH1xleGJp69F1HjjyMZY2aMhMYFW /z6f48FpVXORAzTcmr+1yMrohjfmiyt2pg== X-Google-Smtp-Source: ABdhPJznXn7hTn429aNz6/xdP8P5KXYO/fYhJxLDJt7OputmUFYdmvl1D57/A0z+pTj5G+C0mRRyVA== X-Received: by 2002:a05:6830:1087:b0:5af:3e61:509c with SMTP id y7-20020a056830108700b005af3e61509cmr10084393oto.57.1646075356421; Mon, 28 Feb 2022 11:09:16 -0800 (PST) Received: from kiwi.bld.corp.google.com (c-67-190-101-114.hsd1.co.comcast.net. [67.190.101.114]) by smtp.gmail.com with ESMTPSA id f188-20020a4a58c5000000b0031ccb8272f1sm5290577oob.33.2022.02.28.11.09.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Feb 2022 11:09:16 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Simon Glass , Marek Vasut , Pavel Herrmann Subject: [PATCH 17/18] dm: core: Tidy up comments in uclass headers Date: Mon, 28 Feb 2022 12:08:34 -0700 Message-Id: <20220228190835.1480772-18-sjg@chromium.org> X-Mailer: git-send-email 2.35.1.574.g5d30c73bfb-goog In-Reply-To: <20220228190835.1480772-1-sjg@chromium.org> References: <20220228190835.1480772-1-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean Improve some of the comments in these files, which don't follow the correct style. Signed-off-by: Simon Glass --- include/dm/uclass-internal.h | 18 +++++++++--------- include/dm/uclass.h | 13 ++++++------- 2 files changed, 15 insertions(+), 16 deletions(-) diff --git a/include/dm/uclass-internal.h b/include/dm/uclass-internal.h index e71b86a973..daf856c03c 100644 --- a/include/dm/uclass-internal.h +++ b/include/dm/uclass-internal.h @@ -55,7 +55,7 @@ * * @_name: Name of the uclass. This must be a valid C identifier, used by the * linker_list - * @returns struct uclass * for the device + * Return: struct uclass * for the device */ #define DM_UCLASS_REF(_name) \ ll_entry_ref(struct uclass, _name, uclass) @@ -120,7 +120,7 @@ int dev_get_uclass_index(struct udevice *dev, struct uclass **ucp); * uclass_find_device() - Return n-th child of uclass * @id: Id number of the uclass * @index: Position of the child in uclass's list - * #devp: Returns pointer to device, or NULL on error + * @devp: Returns pointer to device, or NULL on error * * The device is not prepared for use - this is an internal function. * The function uclass_get_device_tail() can be used to probe the device. @@ -133,7 +133,7 @@ int uclass_find_device(enum uclass_id id, int index, struct udevice **devp); /** * uclass_find_first_device() - Return the first device in a uclass * @id: Id number of the uclass - * #devp: Returns pointer to device, or NULL on error + * @devp: Returns pointer to device, or NULL on error * * The device is not prepared for use - this is an internal function. * The function uclass_get_device_tail() can be used to probe the device. @@ -239,7 +239,7 @@ int uclass_find_device_by_phandle(enum uclass_id id, struct udevice *parent, * Connect the device into uclass's list of devices. * * @dev: Pointer to the device - * #return 0 on success, -ve on error + * Return: 0 on success, -ve on error */ int uclass_bind_device(struct udevice *dev); @@ -250,7 +250,7 @@ int uclass_bind_device(struct udevice *dev); * Call any handled needed before uclass_unbind_device() is called * * @dev: Pointer to the device - * #return 0 on success, -ve on error + * Return: 0 on success, -ve on error */ int uclass_pre_unbind_device(struct udevice *dev); @@ -260,7 +260,7 @@ int uclass_pre_unbind_device(struct udevice *dev); * Disconnect the device from uclass's list of devices. * * @dev: Pointer to the device - * #return 0 on success, -ve on error + * Return: 0 on success, -ve on error */ int uclass_unbind_device(struct udevice *dev); @@ -277,7 +277,7 @@ static inline int uclass_unbind_device(struct udevice *dev) { return 0; } * uclass' child_pre_probe() method. * * @dev: Pointer to the device - * #return 0 on success, -ve on error + * Return: 0 on success, -ve on error */ int uclass_pre_probe_device(struct udevice *dev); @@ -288,7 +288,7 @@ int uclass_pre_probe_device(struct udevice *dev); * uclass. * * @dev: Pointer to the device - * #return 0 on success, -ve on error + * Return: 0 on success, -ve on error */ int uclass_post_probe_device(struct udevice *dev); @@ -298,7 +298,7 @@ int uclass_post_probe_device(struct udevice *dev); * Perform any pre-processing of a device that is about to be removed. * * @dev: Pointer to the device - * #return 0 on success, -ve on error + * Return: 0 on success, -ve on error */ #if CONFIG_IS_ENABLED(DM_DEVICE_REMOVE) int uclass_pre_remove_device(struct udevice *dev); diff --git a/include/dm/uclass.h b/include/dm/uclass.h index 7f33c34214..aafe652288 100644 --- a/include/dm/uclass.h +++ b/include/dm/uclass.h @@ -435,7 +435,7 @@ int uclass_probe_all(enum uclass_id id); int uclass_id_count(enum uclass_id id); /** - * uclass_id_foreach_dev() - Helper function to iteration through devices + * uclass_id_foreach_dev() - iterate through devices of a given uclass ID * * This creates a for() loop which works through the available devices in * a uclass ID in order from start to end. @@ -452,20 +452,20 @@ int uclass_id_count(enum uclass_id id); list_for_each_entry(pos, &uc->dev_head, uclass_node) /** - * uclass_foreach_dev() - Helper function to iteration through devices + * uclass_foreach_dev() - iterate through devices of a given uclass * * This creates a for() loop which works through the available devices in * a uclass in order from start to end. * * @pos: struct udevice * to hold the current device. Set to NULL when there * are no more devices. - * @uc: uclass to scan + * @uc: uclass to scan (`struct uclass *`) */ #define uclass_foreach_dev(pos, uc) \ list_for_each_entry(pos, &uc->dev_head, uclass_node) /** - * uclass_foreach_dev_safe() - Helper function to safely iteration through devs + * uclass_foreach_dev_safe() - safely iterate through devices of a given uclass * * This creates a for() loop which works through the available devices in * a uclass in order from start to end. Inside the loop, it is safe to remove @@ -474,14 +474,13 @@ int uclass_id_count(enum uclass_id id); * @pos: struct udevice * to hold the current device. Set to NULL when there * are no more devices. * @next: struct udevice * to hold the next next - * @uc: uclass to scan + * @uc: uclass to scan (`struct uclass *`) */ #define uclass_foreach_dev_safe(pos, next, uc) \ list_for_each_entry_safe(pos, next, &uc->dev_head, uclass_node) /** - * uclass_foreach_dev_probe() - Helper function to iteration through devices - * of given uclass + * uclass_foreach_dev_probe() - iterate through devices of a given uclass ID * * This creates a for() loop which works through the available devices in * a uclass in order from start to end. Devices are probed if necessary,