From: Stefan Hajnoczi <stefanha@gmail.com>
To: Stefano Garzarella <sgarzare@redhat.com>
Cc: qemu-devel@nongnu.org, Eduardo Habkost <ehabkost@redhat.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
Stefan Hajnoczi <stefanha@redhat.com>,
George Kennedy <george.kennedy@oracle.com>,
Gerd Hoffmann <kraxel@redhat.com>,
Marc-Andre Lureau <marcandre.lureau@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>,
Boris Ostrovsky <boris.ostrovsky@oracle.com>,
Maran Wilson <maran.wilson@oracle.com>,
Richard Henderson <rth@twiddle.net>
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 [thread overview]
Message-ID: <20190111162649.GC14776@stefanha-x1.localdomain> (raw)
In-Reply-To: <20190111131836.107549-3-sgarzare@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 2021 bytes --]
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í <marc.mari.barcelo@gmail.com>
> + * Richard W.M. Jones <rjones@redhat.com>
> + * Stefano Garzarella <sgarzare@redhat.com>
> + */
> +
> +#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 #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 455 bytes --]
next prev parent reply other threads:[~2019-01-11 16:27 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-11 13:18 [Qemu-devel] [PATCH 0/4] pvh: add new PVH option rom Stefano Garzarella
2019-01-11 13:18 ` [Qemu-devel] [PATCH 1/4] linuxboot_dma: remove duplicate definitions of FW_CFG Stefano Garzarella
2019-01-11 16:32 ` Stefan Hajnoczi
2019-01-11 13:18 ` [Qemu-devel] [PATCH 2/4] linuxboot_dma: move common functions in a new header Stefano Garzarella
2019-01-11 16:26 ` Stefan Hajnoczi [this message]
2019-01-11 17:42 ` Stefano Garzarella
2019-01-11 17:48 ` Michael S. Tsirkin
2019-01-11 17:55 ` Eric Blake
2019-01-12 18:25 ` Stefano Garzarella
2019-01-13 2:31 ` Eric Blake
2019-01-12 18:18 ` Stefano Garzarella
2019-01-11 13:18 ` [Qemu-devel] [PATCH 3/4] optionrom: add new PVH option rom Stefano Garzarella
2019-01-11 16:31 ` Stefan Hajnoczi
2019-01-11 13:18 ` [Qemu-devel] [PATCH 4/4] hw/i386/pc: use " Stefano Garzarella
2019-01-11 16:34 ` Stefan Hajnoczi
2019-01-14 9:48 ` Stefano Garzarella
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=20190111162649.GC14776@stefanha-x1.localdomain \
--to=stefanha@gmail.com \
--cc=boris.ostrovsky@oracle.com \
--cc=ehabkost@redhat.com \
--cc=george.kennedy@oracle.com \
--cc=kraxel@redhat.com \
--cc=maran.wilson@oracle.com \
--cc=marcandre.lureau@redhat.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
--cc=sgarzare@redhat.com \
--cc=stefanha@redhat.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).