microblaze: clean includes
cover microblaze: clean includes
I'm sending this small series separately because cleaning the microblaze files' use of includes requires a manual code fix to disas/microblaze.c. That file manually defines TRUE and FALSE, which clash with the standard defines that osdep.h will pull in. Patch 1 fixes this, and then patch 2 is the usual automated cleanup of the remaining files.
thanks
-- PMM
Peter Maydell (2):
disas/microblaze.c: Don't define TRUE or FALSE
microblaze: Clean up includes
disas/microblaze.c | 5 +---- hw/microblaze/boot.c | 1 + hw/microblaze/petalogix_ml605_mmu.c | 1 + hw/microblaze/petalogix_s3adsp1800_mmu.c | 1 + target-microblaze/cpu.c | 1 + target-microblaze/gdbstub.c | 2 +- target-microblaze/helper.c | 1 + target-microblaze/mmu.c | 1 + target-microblaze/op_helper.c | 1 + target-microblaze/translate.c | 1 + 10 files changed, 10 insertions(+), 5 deletions(-)
Signature · 1 line
1.9.1
PATCH 1/2 disas/microblaze.c: Don't define TRUE or FALSE
Don't define TRUE and FALSE locally or manually include stdio.h; instead use osdep.h which provides them.
This is a necessary prerequisite for moving to "everywhere includes osdep.h", because otherwise there is a compile error due to the redefinition of TRUE and FALSE.
--- disas/microblaze.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
disas/microblaze.c +1 -4
@@ -33,13 +33,10 @@ along with this program; if not, see <http://www.gnu.org/licenses/>. */*/ -#include <stdio.h> +#include "qemu/osdep.h" #define STATIC_TABLE #define DEFINE_TABLE -#define TRUE 1 -#define FALSE 0 -#ifndef MICROBLAZE_OPC #define MICROBLAZE_OPC /* Assembler instructions for Xilinx's microblaze processor
Signature · 1 line
1.9.1
Re: [Qemu-devel] [PATCH 1/2] disas/microblaze.c: Don't define TRUE or FALSE
Quoted 11 lines · Peter Maydell
Don't define TRUE and FALSE locally or manually include
stdio.h; instead useosdep.hwhich provides them.This is a necessary prerequisite for moving to "everywhere includes
osdep.h", because otherwise there is a compile error due to the redefinition of TRUE and FALSE.Signed-off-by Peter Maydell <[email protected]>--- disas/microblaze.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
Signature · 2 lines
Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
PATCH 2/2 microblaze: Clean up includes
In reply to Peter MaydellClean up includes so that osdep.h is included first and headers which it implies are not included manually.
This commit was created with scripts/clean-includes.
--- hw/microblaze/boot.c | 1 + hw/microblaze/petalogix_ml605_mmu.c | 1 + hw/microblaze/petalogix_s3adsp1800_mmu.c | 1 + target-microblaze/cpu.c | 1 + target-microblaze/gdbstub.c | 2 +- target-microblaze/helper.c | 1 + target-microblaze/mmu.c | 1 + target-microblaze/op_helper.c | 1 + target-microblaze/translate.c | 1 + 9 files changed, 9 insertions(+), 1 deletion(-)
hw/microblaze/boot.c +1 -0
@@ -24,6 +24,7 @@* THE SOFTWARE. */ +#include "qemu/osdep.h" #include "qemu/option.h" #include "qemu/config-file.h" #include "qemu/error-report.h"
hw/microblaze/petalogix_ml605_mmu.c +1 -0
@@ -25,6 +25,7 @@* THE SOFTWARE. */ +#include "qemu/osdep.h" #include "hw/sysbus.h" #include "hw/hw.h" #include "net/net.h"
hw/microblaze/petalogix_s3adsp1800_mmu.c +1 -0
@@ -23,6 +23,7 @@* THE SOFTWARE. */ +#include "qemu/osdep.h" #include "hw/sysbus.h" #include "hw/hw.h" #include "net/net.h"
target-microblaze/cpu.c +1 -0
@@ -21,6 +21,7 @@* <http://www.gnu.org/licenses/lgpl-2.1.html> */ +#include "qemu/osdep.h" #include "cpu.h" #include "qemu-common.h" #include "hw/qdev-properties.h"
target-microblaze/gdbstub.c +1 -1
@@ -17,7 +17,7 @@* You should have received a copy of the GNU Lesser General Public * License along with this library; if not, see <http://www.gnu.org/licenses/>. */ -#include "config.h" +#include "qemu/osdep.h" #include "qemu-common.h" #include "exec/gdbstub.h"
target-microblaze/helper.c +1 -0
@@ -18,6 +18,7 @@* License along with this library; if not, see <http://www.gnu.org/licenses/>. */ +#include "qemu/osdep.h" #include "cpu.h" #include "qemu/host-utils.h"
target-microblaze/mmu.c +1 -0
@@ -18,6 +18,7 @@* License along with this library; if not, see <http://www.gnu.org/licenses/>. */ +#include "qemu/osdep.h" #include "cpu.h" #define D (x)
target-microblaze/op_helper.c +1 -0
@@ -18,6 +18,7 @@* License along with this library; if not, see <http://www.gnu.org/licenses/>. */ +#include "qemu/osdep.h" #include "cpu.h" #include "exec/helper-proto.h" #include "qemu/host-utils.h"
target-microblaze/translate.c +1 -0
@@ -18,6 +18,7 @@* License along with this library; if not, see <http://www.gnu.org/licenses/>. */ +#include "qemu/osdep.h" #include "cpu.h" #include "disas/disas.h" #include "tcg-op.h"
Signature · 1 line
1.9.1
Quoted 7 lines · Peter Maydell
I'm sending this small series separately because cleaning the microblaze files' use of includes requires a manual code fix to
disas/microblaze.c. That file manually defines TRUE and FALSE, which clash with the standard defines thatosdep.hwill pull in. Patch 1 fixes this, and then patch 2 is the usual automated cleanup of the remaining files.
Ack on both patches, thanks
Quoted 24 lines
thanks
-- PMMPeter Maydell (2):
disas/microblaze.c: Don't define TRUE or FALSE
microblaze: Clean up includesdisas/microblaze.c | 5 +---- hw/microblaze/boot.c | 1 + hw/microblaze/petalogix_ml605_mmu.c | 1 + hw/microblaze/petalogix_s3adsp1800_mmu.c | 1 + target-microblaze/cpu.c | 1 + target-microblaze/gdbstub.c | 2 +- target-microblaze/helper.c | 1 + target-microblaze/mmu.c | 1 + target-microblaze/op_helper.c | 1 + target-microblaze/translate.c | 1 + 10 files changed, 10 insertions(+), 5 deletions(-)Signature · 1 line
1.9.1
Quoted 10 lines · Edgar E. Iglesias
Quoted 7 lines · Peter Maydell
I'm sending this small series separately because cleaning the microblaze files' use of includes requires a manual code fix to
disas/microblaze.c. That file manually defines TRUE and FALSE, which clash with the standard defines thatosdep.hwill pull in. Patch 1 fixes this, and then patch 2 is the usual automated cleanup of the remaining files.
Quoted 3 lines
Ack on both patches, thanks
thanks; applied to master.
-- PMM