Commit d30383ee authored by Miles Bader's avatar Miles Bader Committed by Linus Torvalds

[PATCH] Fix some minor type problems in v850 code

Fix some minor type problems in v850 code
[Mostly signed/unsigned mismatches]
parent a746e6ab
...@@ -183,7 +183,7 @@ void __init gbus_int_init_irq_types (struct gbus_int_irq_init *inits, ...@@ -183,7 +183,7 @@ void __init gbus_int_init_irq_types (struct gbus_int_irq_init *inits,
{ {
struct gbus_int_irq_init *init; struct gbus_int_irq_init *init;
for (init = inits; init->name; init++) { for (init = inits; init->name; init++) {
int i; unsigned i;
struct hw_interrupt_type *hwit = hw_irq_types++; struct hw_interrupt_type *hwit = hw_irq_types++;
hwit->typename = init->name; hwit->typename = init->name;
...@@ -200,7 +200,7 @@ void __init gbus_int_init_irq_types (struct gbus_int_irq_init *inits, ...@@ -200,7 +200,7 @@ void __init gbus_int_init_irq_types (struct gbus_int_irq_init *inits,
/* Set the interrupt priorities. */ /* Set the interrupt priorities. */
for (i = 0; i < init->num; i++) { for (i = 0; i < init->num; i++) {
int j; unsigned j;
for (j = 0; j < NUM_USED_GINTS; j++) for (j = 0; j < NUM_USED_GINTS; j++)
if (used_gint[j].priority > init->priority) if (used_gint[j].priority > init->priority)
break; break;
...@@ -222,7 +222,7 @@ static struct hw_interrupt_type gint_hw_itypes[NUM_USED_GINTS]; ...@@ -222,7 +222,7 @@ static struct hw_interrupt_type gint_hw_itypes[NUM_USED_GINTS];
/* GBUS interrupts themselves. */ /* GBUS interrupts themselves. */
__init struct gbus_int_irq_init gbus_irq_inits[] = { struct gbus_int_irq_init gbus_irq_inits[] __initdata = {
/* First set defaults. */ /* First set defaults. */
{ "GBUS_INT", IRQ_GBUS_INT(0), IRQ_GBUS_INT_NUM, 1, 6}, { "GBUS_INT", IRQ_GBUS_INT(0), IRQ_GBUS_INT_NUM, 1, 6},
{ 0 } { 0 }
...@@ -236,7 +236,7 @@ static struct hw_interrupt_type gbus_hw_itypes[NUM_GBUS_IRQ_INITS]; ...@@ -236,7 +236,7 @@ static struct hw_interrupt_type gbus_hw_itypes[NUM_GBUS_IRQ_INITS];
/* Initialize GBUS interrupts. */ /* Initialize GBUS interrupts. */
void __init gbus_int_init_irqs (void) void __init gbus_int_init_irqs (void)
{ {
int i; unsigned i;
/* First initialize the shared gint interrupts. */ /* First initialize the shared gint interrupts. */
for (i = 0; i < NUM_USED_GINTS; i++) { for (i = 0; i < NUM_USED_GINTS; i++) {
......
...@@ -33,7 +33,7 @@ void __init nb85e_intc_init_irq_types (struct nb85e_intc_irq_init *inits, ...@@ -33,7 +33,7 @@ void __init nb85e_intc_init_irq_types (struct nb85e_intc_irq_init *inits,
{ {
struct nb85e_intc_irq_init *init; struct nb85e_intc_irq_init *init;
for (init = inits; init->name; init++) { for (init = inits; init->name; init++) {
int i; unsigned i;
struct hw_interrupt_type *hwit = hw_irq_types++; struct hw_interrupt_type *hwit = hw_irq_types++;
hwit->typename = init->name; hwit->typename = init->name;
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
* include/asm-v850/nb85e_utils.h -- Utility functions associated with * include/asm-v850/nb85e_utils.h -- Utility functions associated with
* the NB85E cpu core * the NB85E cpu core
* *
* Copyright (C) 2001 NEC Corporation * Copyright (C) 2001,02 NEC Corporation
* Copyright (C) 2001 Miles Bader <miles@gnu.org> * Copyright (C) 2001,02 Miles Bader <miles@gnu.org>
* *
* This file is subject to the terms and conditions of the GNU General * This file is subject to the terms and conditions of the GNU General
* Public License. See the file COPYING in the main directory of this * Public License. See the file COPYING in the main directory of this
...@@ -40,7 +40,7 @@ int calc_counter_params (unsigned long base_freq, ...@@ -40,7 +40,7 @@ int calc_counter_params (unsigned long base_freq,
/* Find the lowest clock divider setting that can represent RATE. */ /* Find the lowest clock divider setting that can represent RATE. */
for (_divlog2 = min_divlog2; _divlog2 <= max_divlog2; _divlog2++) { for (_divlog2 = min_divlog2; _divlog2 <= max_divlog2; _divlog2++) {
/* Minimum interrupt rate possible using this divider. */ /* Minimum interrupt rate possible using this divider. */
int min_int_rate unsigned min_int_rate
= (base_freq >> _divlog2) >> counter_size; = (base_freq >> _divlog2) >> counter_size;
if (min_int_rate <= rate) { if (min_int_rate <= rate) {
......
...@@ -61,10 +61,10 @@ void __init mach_early_init (void) ...@@ -61,10 +61,10 @@ void __init mach_early_init (void)
void __init mach_setup (char **cmdline) void __init mach_setup (char **cmdline)
{ {
/* Probe for Mother-A, and print a message if we find it. */ /* Probe for Mother-A, and print a message if we find it. */
*(volatile long *)MB_A_SRAM_ADDR = 0xDEADBEEF; *(volatile unsigned long *)MB_A_SRAM_ADDR = 0xDEADBEEF;
if (*(volatile long *)MB_A_SRAM_ADDR == 0xDEADBEEF) { if (*(volatile unsigned long *)MB_A_SRAM_ADDR == 0xDEADBEEF) {
*(volatile long *)MB_A_SRAM_ADDR = 0x12345678; *(volatile unsigned long *)MB_A_SRAM_ADDR = 0x12345678;
if (*(volatile long *)MB_A_SRAM_ADDR == 0x12345678) if (*(volatile unsigned long *)MB_A_SRAM_ADDR == 0x12345678)
printk (KERN_INFO printk (KERN_INFO
" NEC SolutionGear/Midas lab" " NEC SolutionGear/Midas lab"
" RTE-MOTHER-A motherboard\n"); " RTE-MOTHER-A motherboard\n");
......
...@@ -239,7 +239,7 @@ static void __devinit pcibios_assign_resources (void) ...@@ -239,7 +239,7 @@ static void __devinit pcibios_assign_resources (void)
struct resource *r; struct resource *r;
pci_for_each_dev (dev) { pci_for_each_dev (dev) {
int di_num; unsigned di_num;
unsigned class = dev->class >> 8; unsigned class = dev->class >> 8;
if (class && class != PCI_CLASS_BRIDGE_HOST) { if (class && class != PCI_CLASS_BRIDGE_HOST) {
......
...@@ -512,9 +512,10 @@ int do_signal(struct pt_regs *regs, sigset_t *oldset) ...@@ -512,9 +512,10 @@ int do_signal(struct pt_regs *regs, sigset_t *oldset)
/* Did we come from a system call? */ /* Did we come from a system call? */
if (PT_REGS_SYSCALL (regs)) { if (PT_REGS_SYSCALL (regs)) {
/* Restart the system call - no handlers present */ /* Restart the system call - no handlers present */
if (regs->gpr[GPR_RVAL] == -ERESTARTNOHAND || if (regs->gpr[GPR_RVAL] == (v850_reg_t)-ERESTARTNOHAND ||
regs->gpr[GPR_RVAL] == -ERESTARTSYS || regs->gpr[GPR_RVAL] == (v850_reg_t)-ERESTARTSYS ||
regs->gpr[GPR_RVAL] == -ERESTARTNOINTR) { regs->gpr[GPR_RVAL] == (v850_reg_t)-ERESTARTNOINTR)
{
regs->gpr[12] = PT_REGS_SYSCALL (regs); regs->gpr[12] = PT_REGS_SYSCALL (regs);
regs->pc -= 4; /* Size of `trap 0' insn. */ regs->pc -= 4; /* Size of `trap 0' insn. */
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment