qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 2/4] linuxboot_dma: move common functions in a n


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH 2/4] linuxboot_dma: move common functions in a new header
Date: Fri, 11 Jan 2019 16:26:49 +0000
User-agent: Mutt/1.10.1 (2018-07-13)

On Fri, Jan 11, 2019 at 02:18:34PM +0100, Stefano Garzarella wrote:
> In order to allow other option roms to use these common
> useful functions and definitions, this patch put them
> in a new C header file called optrom.h, and also add
> useful out*() in*() functions for different size.

It's usually helpful to modify code in a one patch and move it in a
separate patch.  This patch does both, so it's a harder to review.
Don't worry about changing it now, but something to try in the future.

> +#include <stdint.h>
> +#include "optrom.h"
> +#include "optrom_fw_cfg.h"

Can these be moved to the top of the file like a regular C source file?

> diff --git a/pc-bios/optionrom/optrom.h b/pc-bios/optionrom/optrom.h
> new file mode 100644
> index 0000000000..36f43b43fd
> --- /dev/null
> +++ b/pc-bios/optionrom/optrom.h
> @@ -0,0 +1,109 @@
> +/*
> + * Common Option ROM Functions for C code
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License as published by
> + * the Free Software Foundation; either version 2 of the License, or
> + * (at your option) any later version.
> + *
> + * This program is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> + * GNU General Public License for more details.
> + *
> + * You should have received a copy of the GNU General Public License
> + * along with this program; if not, see <http://www.gnu.org/licenses/>.
> + *
> + * Copyright (c) 2015-2019 Red Hat Inc.
> + *   Authors:
> + *     Marc MarĂ­ <address@hidden>
> + *     Richard W.M. Jones <address@hidden>
> + *     Stefano Garzarella <address@hidden>
> + */
> +
> +#ifndef OPTROM_H
> +#define OPTROM_H
> +
> +#include "../../include/standard-headers/linux/qemu_fw_cfg.h"

This depends on <stdint.h>, please include it first.

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]