i386/pc386: Fix printk formatting warnings.

This commit is contained in:
Chris Johns
2016-05-25 15:47:34 +10:00
parent 24d0ee57a4
commit 1503c1c382
8 changed files with 27 additions and 18 deletions
@@ -54,7 +54,7 @@ rtems_device_driver console_control(
break;
case MW_UID_REGISTER_DEVICE:
printk( "SerialMouse: reg=%s\n", args->buffer );
printk( "SerialMouse: reg=%s\n", (const char*) args->buffer );
register_kbd_msg_queue( args->buffer, 0 );
break;
@@ -166,7 +166,7 @@ rtems_device_driver exar17d15x_initialize(
&conf[instance].base
);
printk(
"Found Exar 17D15x %d at 0x%08x IRQ %d with %d ports\n",
"Found Exar 17D15x %d at 0x%08lx IRQ %d with %d ports\n",
instance,
conf[instance].base,
conf[instance].irq,
@@ -42,6 +42,8 @@
* - RTEMS fb_cirrus.c - Alexandru-Sever Horin (alex.sever.h@gmail.com)
*/
#include <inttypes.h>
#include <bsp.h>
#include <bsp/fb_default_mode.h>
@@ -785,7 +787,7 @@ void vesa_realmode_bootup_init(void)
if ((vbe_ret_val&0xff)!=VBE_functionSupported ||
(vbe_ret_val>>8)!=VBE_callSuccessful)
{
printk(FB_VESA_NAME " Cannot get mode info anymore. ax=0x%x\n",
printk(FB_VESA_NAME " Cannot get mode info anymore. ax=0x%lx\n",
vbe_ret_val);
}
@@ -822,7 +824,7 @@ void vesa_realmode_bootup_init(void)
if ((vbe_ret_val&0xff)!= (VBE_functionSupported | VBE_callSuccessful<<8))
printk(FB_VESA_NAME " Call to function 2h (set VBE mode) failed. "
"ax=0x%x\n", vbe_ret_val);
"ax=0x%" PRIx32 "\n", vbe_ret_val);
vib = (void *) 0;
mib = (void *) 0;
@@ -968,9 +970,9 @@ frame_buffer_control(
{
rtems_libio_ioctl_args_t *args = arg;
printk( FB_VESA_NAME " ioctl called, cmd=%x\n", args->command );
printk("fbxres %d, fbyres %d\n", fb_var.xres, fb_var.yres);
printk("fbbpp %d\n", fb_var.bits_per_pixel);
printk( FB_VESA_NAME " ioctl called, cmd=%" PRIx32 "\n", args->command );
printk("fbxres %lu, fbyres %lu\n", fb_var.xres, fb_var.yres);
printk("fbbpp %lu\n", fb_var.bits_per_pixel);
switch (args->command)
{
@@ -206,9 +206,11 @@ _IBMPC_scankey(char *outChar)
static bool
_IBMPC_chrdy(char *c)
{
#if CCJ_REMOVED_NO_IDEA_ABOUT_THIS_CODE_OR_COMMENT
/* FIX ME!!! It doesn't work without something like the following line.
Find out why! */
printk("");
#endif
/* Check buffer our ISR builds */
if (kbd_first != kbd_last)
@@ -285,14 +285,14 @@ static uint8_t pci_ns16550_io_get_register(uint32_t addr, uint8_t i)
{
uint8_t val = rtems_inb(addr + i);
if (UART_PCI_IO)
printk( "RD(%p -> 0x%02x) ", addr + i, val );
printk( "RD(%p -> 0x%02x) ", (void*) addr + i, val );
return val;
}
static void pci_ns16550_io_set_register(uint32_t addr, uint8_t i, uint8_t val)
{
if (UART_PCI_IO)
printk( "WR(%p <- 0x%02x) ", addr + i, val );
printk( "WR(%p <- 0x%02x) ", (void*) addr + i, val );
rtems_outb(addr + i, val);
}
@@ -453,7 +453,7 @@ void pci_uart_probe(void)
printk(
"%s:%d:%s,%s:0x%x%s%s,irq:%d,clk:%d\n", /* */
"%s:%d:%s,%s:0x%lx%s%s,irq:%d,clk:%lu\n", /* */
name, b, conf[b].desc,
io ? "io" : "mem", base, locatable, prefectable,
conf[b].irq, conf[b].clock
+10 -6
View File
@@ -23,7 +23,10 @@
| 01.14.03 creation doe |
\*===============================================================*/
#include <inttypes.h>
#include <rtems.h>
#include <bsp.h>
#include <libchip/ide_ctrl.h>
#include <libchip/ide_ctrl_cfg.h>
@@ -199,7 +202,7 @@ static void pc386_ide_initialize
uint8_t dev = 0;
if (pc386_ide_show)
printk("IDE%d: port base: %04x\n", minor, port);
printk("IDE%d: port base: %04" PRIu32 "\n", minor, port);
outport_byte(port+IDE_REGISTER_DEVICE_HEAD,
(dev << IDE_REGISTER_DEVICE_HEAD_DEV_POS) | 0xE0);
@@ -303,7 +306,7 @@ static void pc386_ide_initialize
uint16_t word;
if (pc386_ide_show && ((byte % 16) == 0))
printk("\n %04x : ", byte);
printk("\n %04" PRIx32 " : ", byte);
inport_word(port+IDE_REGISTER_DATA, word);
@@ -346,7 +349,7 @@ static void pc386_ide_initialize
}
if (pc386_ide_show)
printk("\nbytes read = %d\n", byte);
printk("\nbytes read = %" PRIu32 "\n", byte);
if (p != &model_number[0])
{
@@ -388,7 +391,7 @@ static void pc386_ide_initialize
p--;
}
printk("IDE%d:%s:%s, %u.%u%c (%u/%u/%u), max blk size:%d\n",
printk("IDE%d:%s:%s, %" PRIu32 ".%" PRIu32 "%c (%" PRIu32 "/%" PRIu32 "/%" PRIu32 "), max blk size:%d\n",
minor, label, model_number, left, right, units,
heads, cylinders, sectors, max_multiple_sectors * 512);
}
@@ -541,7 +544,8 @@ static void pc386_ide_read_block
if (!pc386_ide_status_data_ready (port, pc386_ide_timeout,
&status_val, pc386_ide_tasking_sleep))
{
printk ("pc386_ide_read_block: block=%u cbuf=%u status=%02x, cnt=%d bs=%d\n",
printk ("pc386_ide_read_block: block=%" PRIu32 \
" cbuf=%" PRIu32 " status=%02x, cnt=%" PRIu32 " bs=%" PRIu32 "\n",
bufs[*cbuf].block, *cbuf, status_val, cnt, block_size);
/* FIXME: add an error here. */
return;
@@ -620,7 +624,7 @@ static void pc386_ide_write_block
if (!pc386_ide_status_data_ready (port, pc386_ide_timeout,
&status_val, pc386_ide_tasking_sleep))
{
printk ("pc386_ide_write_block: block=%u status=%02x, cnt=%d bs=%d\n",
printk ("pc386_ide_write_block: block=%" PRIu32 " status=%02x, cnt=%" PRIu32 " bs=%" PRIu32 "\n",
bufs[*cbuf].block, status_val, cnt, block_size);
/* FIXME: add an error here. */
return;
@@ -1032,7 +1032,6 @@ handle_exception (int exceptionVector)
if (*(ptr++) == ',')
{
bool insert = remcomInBuffer[0] == 'Z';
printk("hbreak type\n", insert);
if (hexToInt (&ptr, &addr))
{
if (*(ptr++) == ',')
+3 -1
View File
@@ -16,6 +16,7 @@
****************************************************************************/
#include <inttypes.h>
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
@@ -262,7 +263,8 @@ conSetAttr(int port, int minor, const struct termios *t)
stopbits = 0;
}
printk("Setting attributes, port=%X, baud=%d, linemode = 0x%02x\n", port, baud, databits | parity | stopbits );
printk("Setting attributes, port=%X, baud=%" PRId32 ", linemode = 0x%02" PRIx32 "\n",
port, baud, databits | parity | stopbits );
BSP_uart_set_attributes(port, baud, databits, parity, stopbits);
return 0;
}