Module Name: src Committed By: tsutsui Date: Fri Feb 3 23:21:18 UTC 2023
Modified Files: src/sys/arch/next68k/dev: nextdisplay.c src/sys/arch/next68k/include: bus_space.h src/sys/arch/next68k/next68k: machdep.c Log Message: Use proper C99 int types. To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/sys/arch/next68k/dev/nextdisplay.c cvs rdiff -u -r1.21 -r1.22 src/sys/arch/next68k/include/bus_space.h cvs rdiff -u -r1.118 -r1.119 src/sys/arch/next68k/next68k/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/next68k/dev/nextdisplay.c diff -u src/sys/arch/next68k/dev/nextdisplay.c:1.26 src/sys/arch/next68k/dev/nextdisplay.c:1.27 --- src/sys/arch/next68k/dev/nextdisplay.c:1.26 Fri Feb 3 23:13:00 2023 +++ src/sys/arch/next68k/dev/nextdisplay.c Fri Feb 3 23:21:17 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: nextdisplay.c,v 1.26 2023/02/03 23:13:00 tsutsui Exp $ */ +/* $NetBSD: nextdisplay.c,v 1.27 2023/02/03 23:21:17 tsutsui Exp $ */ /* * Copyright (c) 1998 Matt DeBergalis @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: nextdisplay.c,v 1.26 2023/02/03 23:13:00 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nextdisplay.c,v 1.27 2023/02/03 23:21:17 tsutsui Exp $"); #include <sys/cdefs.h> /* RCS ID & Copyright macro defns */ @@ -197,7 +197,7 @@ nextdisplay_init(struct nextdisplay_conf #endif /* clear the screen */ - for (i = 0; i < dc->dc_ht * dc->dc_rowbytes; i += sizeof(u_int32_t)) + for (i = 0; i < dc->dc_ht * dc->dc_rowbytes; i += sizeof(uint32_t)) *(uint32_t *)(dc->dc_videobase + i) = color ? 0x0 : 0xffffffff; @@ -205,7 +205,7 @@ nextdisplay_init(struct nextdisplay_conf rap->width = dc->dc_wid; rap->height = dc->dc_ht; rap->depth = color ? 16 : 2; - rap->linelongs = dc->dc_rowbytes / sizeof(u_int32_t); + rap->linelongs = dc->dc_rowbytes / sizeof(uint32_t); rap->pixels = (uint32_t *)dc->dc_videobase; /* initialize the raster console blitter */ Index: src/sys/arch/next68k/include/bus_space.h diff -u src/sys/arch/next68k/include/bus_space.h:1.21 src/sys/arch/next68k/include/bus_space.h:1.22 --- src/sys/arch/next68k/include/bus_space.h:1.21 Fri Feb 3 23:13:01 2023 +++ src/sys/arch/next68k/include/bus_space.h Fri Feb 3 23:21:18 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: bus_space.h,v 1.21 2023/02/03 23:13:01 tsutsui Exp $ */ +/* $NetBSD: bus_space.h,v 1.22 2023/02/03 23:21:18 tsutsui Exp $ */ /*- * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc. @@ -131,7 +131,7 @@ typedef u_long bus_space_handle_t; m68k_btop((t)+((a)-COLORBASE)) : (-1)))) /* - * u_intN_t bus_space_read_N(bus_space_tag_t tag, + * uintN_t bus_space_read_N(bus_space_tag_t tag, * bus_space_handle_t bsh, bus_size_t offset); * * Read a 1, 2, 4, or 8 byte quantity from bus space @@ -139,18 +139,18 @@ typedef u_long bus_space_handle_t; */ #define bus_space_read_1(t, h, o) \ - ((void) t, (*(volatile u_int8_t *)((h) + (o)))) + ((void) t, (*(volatile uint8_t *)((h) + (o)))) #define bus_space_read_2(t, h, o) \ - ((void) t, (*(volatile u_int16_t *)((h) + (o)))) + ((void) t, (*(volatile uint16_t *)((h) + (o)))) #define bus_space_read_4(t, h, o) \ - ((void) t, (*(volatile u_int32_t *)((h) + (o)))) + ((void) t, (*(volatile uint32_t *)((h) + (o)))) /* * void bus_space_read_multi_N(bus_space_tag_t tag, * bus_space_handle_t bsh, bus_size_t offset, - * u_intN_t *addr, size_t count); + * uintN_t *addr, size_t count); * * Read `count' 1, 2, 4, or 8 byte quantities from bus space * described by tag/handle/offset and copy into buffer provided. @@ -201,7 +201,7 @@ typedef u_long bus_space_handle_t; /* * void bus_space_read_region_N(bus_space_tag_t tag, * bus_space_handle_t bsh, bus_size_t offset, - * u_intN_t *addr, size_t count); + * uintN_t *addr, size_t count); * * Read `count' 1, 2, 4, or 8 byte quantities from bus space * described by tag/handle and starting at `offset' and copy into @@ -253,25 +253,25 @@ typedef u_long bus_space_handle_t; /* * void bus_space_write_N(bus_space_tag_t tag, * bus_space_handle_t bsh, bus_size_t offset, - * u_intN_t value); + * uintN_t value); * * Write the 1, 2, 4, or 8 byte value `value' to bus space * described by tag/handle/offset. */ #define bus_space_write_1(t, h, o, v) \ - ((void) t, ((void)(*(volatile u_int8_t *)((h) + (o)) = (v)))) + ((void) t, ((void)(*(volatile uint8_t *)((h) + (o)) = (v)))) #define bus_space_write_2(t, h, o, v) \ - ((void) t, ((void)(*(volatile u_int16_t *)((h) + (o)) = (v)))) + ((void) t, ((void)(*(volatile uint16_t *)((h) + (o)) = (v)))) #define bus_space_write_4(t, h, o, v) \ - ((void) t, ((void)(*(volatile u_int32_t *)((h) + (o)) = (v)))) + ((void) t, ((void)(*(volatile uint32_t *)((h) + (o)) = (v)))) /* * void bus_space_write_multi_N(bus_space_tag_t tag, * bus_space_handle_t bsh, bus_size_t offset, - * const u_intN_t *addr, size_t count); + * const uintN_t *addr, size_t count); * * Write `count' 1, 2, 4, or 8 byte quantities from the buffer * provided to bus space described by tag/handle/offset. @@ -322,7 +322,7 @@ typedef u_long bus_space_handle_t; /* * void bus_space_write_region_N(bus_space_tag_t tag, * bus_space_handle_t bsh, bus_size_t offset, - * const u_intN_t *addr, size_t count); + * const uintN_t *addr, size_t count); * * Write `count' 1, 2, 4, or 8 byte quantities from the buffer provided * to bus space described by tag/handle starting at `offset'. @@ -372,7 +372,7 @@ typedef u_long bus_space_handle_t; /* * void bus_space_set_multi_N(bus_space_tag_t tag, - * bus_space_handle_t bsh, bus_size_t offset, u_intN_t val, + * bus_space_handle_t bsh, bus_size_t offset, uintN_t val, * size_t count); * * Write the 1, 2, 4, or 8 byte value `val' to bus space described @@ -423,7 +423,7 @@ typedef u_long bus_space_handle_t; /* * void bus_space_set_region_N(bus_space_tag_t tag, - * bus_space_handle_t bsh, bus_size_t offset, u_intN_t val, + * bus_space_handle_t bsh, bus_size_t offset, uintN_t val, * size_t count); * * Write `count' 1, 2, 4, or 8 byte value `val' to bus space described Index: src/sys/arch/next68k/next68k/machdep.c diff -u src/sys/arch/next68k/next68k/machdep.c:1.118 src/sys/arch/next68k/next68k/machdep.c:1.119 --- src/sys/arch/next68k/next68k/machdep.c:1.118 Fri Feb 3 22:57:05 2023 +++ src/sys/arch/next68k/next68k/machdep.c Fri Feb 3 23:21:18 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.118 2023/02/03 22:57:05 tsutsui Exp $ */ +/* $NetBSD: machdep.c,v 1.119 2023/02/03 23:21:18 tsutsui Exp $ */ /* * Copyright (c) 1998 Darrin B. Jewell @@ -40,7 +40,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.118 2023/02/03 22:57:05 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.119 2023/02/03 23:21:18 tsutsui Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -525,7 +525,7 @@ cpu_init_kcore_hdr(void) /* * Initialize pointer to kernel segment table. */ - m->sysseg_pa = (u_int32_t)(pmap_kernel()->pm_stpa); + m->sysseg_pa = (uint32_t)(pmap_kernel()->pm_stpa); /* * Initialize relocation value such that: @@ -537,7 +537,7 @@ cpu_init_kcore_hdr(void) /* * Define the end of the relocatable range. */ - m->relocend = (u_int32_t)end; + m->relocend = (uint32_t)end; /* * The next68k has multiple memory segments. @@ -591,7 +591,7 @@ cpu_dump(int (*dump)(dev_t, daddr_t, voi /* * These variables are needed by /sbin/savecore */ -u_int32_t dumpmag = 0x8fca0101; /* magic number */ +uint32_t dumpmag = 0x8fca0101; /* magic number */ int dumpsize = 0; /* pages */ long dumplo = 0; /* blocks */