Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3DA2BC433F5 for ; Sat, 23 Oct 2021 23:31:19 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B6CB260C4D for ; Sat, 23 Oct 2021 23:31:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org B6CB260C4D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 36452835A6; Sun, 24 Oct 2021 01:30:33 +0200 (CEST) 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="civIiG1k"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id A865083560; Sun, 24 Oct 2021 01:27:17 +0200 (CEST) Received: from mail-ot1-x332.google.com (mail-ot1-x332.google.com [IPv6:2607:f8b0:4864:20::332]) (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 CBA7D8350B for ; Sun, 24 Oct 2021 01:26:58 +0200 (CEST) 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-x332.google.com with SMTP id p6-20020a9d7446000000b0054e6bb223f3so9332126otk.3 for ; Sat, 23 Oct 2021 16:26:58 -0700 (PDT) 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=7r0KuE5HIe2ibnNk6pFdqm0lYP9QNQrF9wUp1sojgkk=; b=civIiG1kvrk7zpMD1aO+2tZJe7S5swU0RGveznuvUJXVry+skj5EeZUpDexKPfoDnX u4FJs9zYRUEEHYgsUa+WuxWRaLcKKkH+nABQPrputuWcGkPSdqACqR5tlMgtuPcYBVRA DzFAG2pUwZJ5pg/pr9E2FOdwME4tEcl+n+H/s= 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=7r0KuE5HIe2ibnNk6pFdqm0lYP9QNQrF9wUp1sojgkk=; b=R9dyzNNDzTy7WvtesjxQlX+oT8jjdcu2w0W1FzOaI23bNPVk7xnFP4wqquZArMBvSM rS2tREy7uucYiAswEel3CFzuqsh1Fz3aj4SHTpX3MjTOr1bpIsm5ydUSV02JmY6Z4bJx y8LcnKtngyWBuo3P828NxWudiJhEQWZsOTHO/Pny5iugeVmVHmU5EZOGh/qVsT3O4Y4N ZfdyKZnXGaooTO5g6df5QSLAjOBmhzctNmkBAiCH6V45TDQlXQAHs0wrzUvmsyJGjpAb c8Xmt1W8zg94NfJ3+RTvXsAXaympNQtpX2KZy1gD93l+E55hdOCK7lZz7J7Z2URaVNZS 5/EA== X-Gm-Message-State: AOAM530pIiUvNbYyHSQZh+ZMZVeS3UBXbKqY2pfREuBq0CWH8ixQILFA j7yeaul+H9odzhWCLAs4J5/23uqJY02ccw== X-Google-Smtp-Source: ABdhPJyhB2rNwu12pvl3IdVywpr+HpPLY66FKw3VE24FhrAYnhH9vdjxkxrGjkcuGys5HbWCTrkChQ== X-Received: by 2002:a05:6830:43a5:: with SMTP id s37mr6854530otv.246.1635031617245; Sat, 23 Oct 2021 16:26:57 -0700 (PDT) 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 l24sm2253885oop.4.2021.10.23.16.26.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Oct 2021 16:26:56 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Michal Simek , Heinrich Schuchardt , Tom Rini , Ilias Apalodimas , Daniel Schwierzeck , Steffen Jaeckel , =?UTF-8?q?Marek=20Beh=C3=BAn?= , Lukas Auer , Dennis Gilmore , Simon Glass , Marek Vasut , Pavel Herrmann Subject: [PATCH v2 12/41] dm: core: Fix up string-function documentation Date: Sat, 23 Oct 2021 17:26:06 -0600 Message-Id: <20211023232635.9195-11-sjg@chromium.org> X-Mailer: git-send-email 2.33.0.1079.g6e70778dc9-goog In-Reply-To: <20211023232635.9195-1-sjg@chromium.org> References: <20211023232635.9195-1-sjg@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.2 at phobos.denx.de X-Virus-Status: Clean The details for of_property_read_string_helper() and ofnode_read_string_index() are a little inaccurate. Fix up the comments to avoid confusion. Signed-off-by: Simon Glass --- (no changes since v1) drivers/core/of_access.c | 3 ++- include/dm/ofnode.h | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/core/of_access.c b/drivers/core/of_access.c index 9960e6b310b..3707143ae66 100644 --- a/drivers/core/of_access.c +++ b/drivers/core/of_access.c @@ -581,7 +581,8 @@ int of_property_match_string(const struct device_node *np, const char *propname, * @propname: name of the property to be searched. * @out_strs: output array of string pointers. * @sz: number of array elements to read. - * @skip: Number of strings to skip over at beginning of list. + * @skip: Number of strings to skip over at beginning of list (cannot be + * negative) * * Don't call this function directly. It is a utility helper for the * of_property_read_string*() family of functions. diff --git a/include/dm/ofnode.h b/include/dm/ofnode.h index 6a714d0c7b5..4faa9bfa563 100644 --- a/include/dm/ofnode.h +++ b/include/dm/ofnode.h @@ -590,11 +590,11 @@ int ofnode_stringlist_search(ofnode node, const char *propname, * * @node: node to check * @propname: name of the property containing the string list - * @index: index of the string to return + * @index: index of the string to return (cannot be negative) * @lenp: return location for the string length or an error code on failure * * @return: - * length of string, if found or -ve error value if not found + * 0 if found or -ve error value if not found */ int ofnode_read_string_index(ofnode node, const char *propname, int index, const char **outp); -- 2.33.0.1079.g6e70778dc9-goog