All of lore.kernel.org
 help / color / mirror / Atom feed
From: Heinrich Schuchardt <xypron.glpk@gmx.de>
To: u-boot@lists.denx.de
Subject: [PATCH 1/3] efi_loader: Add guidcpy function
Date: Tue, 24 Dec 2019 18:06:54 +0100	[thread overview]
Message-ID: <30dd29df-f73f-f25f-0a7e-9ea1b175bbde@gmx.de> (raw)
In-Reply-To: <1577202865-1215-2-git-send-email-sughosh.ganu@linaro.org>

On 12/24/19 4:54 PM, Sughosh Ganu wrote:
> Add guidcpy function to copy the source guid to the destination
> guid.
>
> Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
> ---
>   include/efi_loader.h | 5 +++++
>   1 file changed, 5 insertions(+)
>
> diff --git a/include/efi_loader.h b/include/efi_loader.h
> index 16a1b25..bec7873 100644
> --- a/include/efi_loader.h
> +++ b/include/efi_loader.h
> @@ -17,6 +17,11 @@ static inline int guidcmp(const void *g1, const void *g2)
>   	return memcmp(g1, g2, sizeof(efi_guid_t));
>   }
>
> +static inline void *guidcpy(efi_guid_t *dst, const efi_guid_t *src)
> +{
> +	return memcpy(dst, src, sizeof(*dst));

If we introduce this function, here are other places to use it:

lib/efi_loader/efi_boottime.c:1404:
memcpy(&item->protocol, protocol, sizeof(efi_guid_t));
lib/efi_loader/efi_boottime.c:1635:
memcpy(&systab.tables[i].guid, guid, sizeof(*guid));

Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>

> +}
> +
>   /* No need for efi loader support in SPL */
>   #if CONFIG_IS_ENABLED(EFI_LOADER)
>
>

  reply	other threads:[~2019-12-24 17:06 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-24 15:54 [PATCH 0/3] qemu: arm64: Add support for efi_rng_protocol Sughosh Ganu
2019-12-24 15:54 ` [PATCH 1/3] efi_loader: Add guidcpy function Sughosh Ganu
2019-12-24 17:06   ` Heinrich Schuchardt [this message]
2019-12-25  5:23     ` Sughosh Ganu
2019-12-24 15:54 ` [PATCH 2/3] efi: qemu: arm64: Add efi_rng_protocol implementation for the platform Sughosh Ganu
2019-12-24 17:05   ` Heinrich Schuchardt
2019-12-25  6:21     ` Sughosh Ganu
2019-12-25  8:15       ` Heinrich Schuchardt
2019-12-25 13:31         ` Sughosh Ganu
2019-12-24 15:54 ` [PATCH 3/3] efi_rng_protocol: Install the efi_rng_protocol on the root node Sughosh Ganu
2019-12-25  8:26   ` Heinrich Schuchardt
2019-12-25 12:40     ` Sughosh Ganu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=30dd29df-f73f-f25f-0a7e-9ea1b175bbde@gmx.de \
    --to=xypron.glpk@gmx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.