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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 94414C32771 for ; Mon, 26 Sep 2022 06:54:40 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 6B69D811C5; Mon, 26 Sep 2022 08:54:38 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=gmx.de 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; secure) header.d=gmx.net header.i=@gmx.net header.b="CYqEXV6m"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id DB26C80444; Mon, 26 Sep 2022 08:54:36 +0200 (CEST) Received: from mout.gmx.net (mout.gmx.net [212.227.15.19]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id CCE5480444 for ; Mon, 26 Sep 2022 08:54:33 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=xypron.glpk@gmx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1664175260; bh=yYHYP+W7XBTNgO9mKtvxKsYgQiikiCqp+9A90FLSwwY=; h=X-UI-Sender-Class:Date:Subject:To:Cc:References:From:In-Reply-To; b=CYqEXV6m6AdpH9GL3yYF+FJbglBOCqTr+C2tGyAtOLn/ESAWxnJ6LCEmzaF21VVZr kcrct2rzcO2qhFrFrm+hNO3qQdagFhLtaYfkuUYIwYLOoOcCYHRbgURvUYOcB91q+g ARSnG7C+AY/uXrx0PIDm+5MFq9C4oP7Yqd+eev94= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [192.168.123.94] ([84.118.157.2]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MYNNo-1ohdyT3BxK-00VP8B; Mon, 26 Sep 2022 08:54:19 +0200 Message-ID: Date: Mon, 26 Sep 2022 08:54:18 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.0 Subject: Re: [PATCH 22/45] image: Move comment for fit_conf_find_compat() Content-Language: en-US To: Simon Glass Cc: Tom Rini , Alexandru Gagniuc , Andre Przywara , Chia-Wei Wang , Jan Kiszka , Joe Hershberger , Joel Stanley , Marek Vasut , Philippe Reynes , Sean Anderson , U-Boot Mailing List References: <20220925150248.2524421-1-sjg@chromium.org> <20220925150248.2524421-23-sjg@chromium.org> From: Heinrich Schuchardt In-Reply-To: <20220925150248.2524421-23-sjg@chromium.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:Xj1hJb4KciWFQxKOGKXGm+bNLx8vASQ+sAO2SjzXqXiUTJth0Y8 l5+Y8iT70T8iXJ8SWRM1hJc1CTjqLuFxY6gnhpMbb5BJq4ynh0PHWSkqz8GSz81ukShuwrI 13bLx9/QYYDxWga7it0B7CjiziYUyaFkBxhPTlBmS4PiMV6VYAoc4r1Je6wb7Q7LT2/zCbL 1pevbRcCNcwbScuJg0Ofg== X-UI-Out-Filterresults: notjunk:1;V03:K0:ACtvLNbg2CM=:n9SQRIP0kTSPy2yfWFPabW VPba8hQAwlxkV18iCQBDIM09FlzonVmKvuXI831sItXMjHYCMP0tNYXhndI/kV/Byyy0s81vE YQ+es04/T0G7V42HjrWEOpbtt8rfKnh53hszAJdcWvEt/mcYvDk3k7yNmVrp2oi425mM3NI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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.6 at phobos.denx.de X-Virus-Status: Clean On 9/25/22 17:02, Simon Glass wrote: > Move this comment to the header file, where the APIs should be defined. > > Signed-off-by: Simon Glass > --- > > boot/image-fit.c | 43 ------------------------------------------- > include/image.h | 43 +++++++++++++++++++++++++++++++++++++++++++ > 2 files changed, 43 insertions(+), 43 deletions(-) > > diff --git a/boot/image-fit.c b/boot/image-fit.c > index a7acd762272..94074515258 100644 > --- a/boot/image-fit.c > +++ b/boot/image-fit.c > @@ -1687,49 +1687,6 @@ int fit_check_format(const void *fit, ulong size) > return 0; > } > > -/** > - * fit_conf_find_compat > - * @fit: pointer to the FIT format image header > - * @fdt: pointer to the device tree to compare against > - * > - * fit_conf_find_compat() attempts to find the configuration whose fdt = is the > - * most compatible with the passed in device tree. > - * > - * Example: > - * > - * / o image-tree > - * |-o images > - * | |-o fdt-1 > - * | |-o fdt-2 > - * | > - * |-o configurations > - * |-o config-1 > - * | |-fdt =3D fdt-1 > - * | > - * |-o config-2 > - * |-fdt =3D fdt-2 > - * > - * / o U-Boot fdt > - * |-compatible =3D "foo,bar", "bim,bam" > - * > - * / o kernel fdt1 > - * |-compatible =3D "foo,bar", > - * > - * / o kernel fdt2 > - * |-compatible =3D "bim,bam", "baz,biz" > - * > - * Configuration 1 would be picked because the first string in U-Boot's > - * compatible list, "foo,bar", matches a compatible string in the root = of fdt1. > - * "bim,bam" in fdt2 matches the second string which isn't as good as f= dt1. > - * > - * As an optimization, the compatible property from the FDT's root node= can be > - * copied into the configuration node in the FIT image. This is require= d to > - * match configurations with compressed FDTs. > - * > - * returns: > - * offset to the configuration to use if one was found > - * -1 otherwise > - */ > int fit_conf_find_compat(const void *fit, const void *fdt > { > int ndepth =3D 0; > diff --git a/include/image.h b/include/image.h > index b336cfa0842..ca1c6c5b3c2 100644 > --- a/include/image.h > +++ b/include/image.h > @@ -1136,6 +1136,49 @@ int fit_image_check_comp(const void *fit, int nof= fset, uint8_t comp); > */ > int fit_check_format(const void *fit, ulong size); > > +/** > + * fit_conf_find_compat Please, adjust to style defined in https://docs.kernel.org/doc-guide/kernel-doc.html#function-documentation: fit_conf_find_compat() - Brief description > + * @fit: pointer to the FIT format image header > + * @fdt: pointer to the device tree to compare against > + * > + * fit_conf_find_compat() attempts to find the configuration whose fdt = is the > + * most compatible with the passed in device tree. > + * > + * Example: > + * > + * / o image-tree > + * |-o images > + * | |-o fdt-1 > + * | |-o fdt-2 > + * | > + * |-o configurations > + * |-o config-1 > + * | |-fdt =3D fdt-1 > + * | > + * |-o config-2 > + * |-fdt =3D fdt-2 > + * > + * / o U-Boot fdt > + * |-compatible =3D "foo,bar", "bim,bam" > + * > + * / o kernel fdt1 > + * |-compatible =3D "foo,bar", > + * > + * / o kernel fdt2 > + * |-compatible =3D "bim,bam", "baz,biz" Preformatted text should be indented and preceded by ::. > + * > + * Configuration 1 would be picked because the first string in U-Boot's > + * compatible list, "foo,bar", matches a compatible string in the root = of fdt1. > + * "bim,bam" in fdt2 matches the second string which isn't as good as f= dt1. > + * > + * As an optimization, the compatible property from the FDT's root node= can be > + * copied into the configuration node in the FIT image. This is require= d to > + * match configurations with compressed FDTs. > + * > + * returns: Return: Best regards Heinrich > + * offset to the configuration to use if one was found > + * -1 otherwise > + */ > int fit_conf_find_compat(const void *fit, const void *fdt); > > /**