Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1321839 > unrolled thread
| Started by | Matt Fleming <matt@codeblueprint.co.uk> |
|---|---|
| First post | 2016-01-29 16:40 +0100 |
| Last post | 2016-01-29 16:40 +0100 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH v4 20/22] efi: stub: add implementation of efi_random_alloc() Matt Fleming <matt@codeblueprint.co.uk> - 2016-01-29 16:40 +0100
| From | Matt Fleming <matt@codeblueprint.co.uk> |
|---|---|
| Date | 2016-01-29 16:40 +0100 |
| Subject | Re: [PATCH v4 20/22] efi: stub: add implementation of efi_random_alloc() |
| Message-ID | <qWjjs-59f-19@gated-at.bofh.it> |
On Tue, 26 Jan, at 06:10:47PM, Ard Biesheuvel wrote:
> +
> +/*
> + * The UEFI memory descriptors have a virtual address field that is only used
> + * when installing the virtual mapping using SetVirtualAddressMap(). Since it
> + * is unused here, we can reuse it to keep track of each descriptor's slot
> + * count.
> + */
> +#define MD_NUM_SLOTS(md) ((md)->virt_addr)
> +
> +efi_status_t efi_random_alloc(efi_system_table_t *sys_table_arg,
> + unsigned long size,
> + unsigned long align,
> + unsigned long *addr,
> + unsigned long random_seed)
> +{
> + unsigned long map_size, desc_size, total_slots = 0, target_slot;
> + efi_status_t status = EFI_NOT_FOUND;
> + efi_memory_desc_t *memory_map;
> + int map_offset;
The assignment of 'status' is not needed since it gets assigned a new
value immediately.
Otherwise looks good.
Reviewed-by: Matt Fleming <matt@codeblueprint.co.uk>
Back to top | Article view | linux.kernel
csiph-web