]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] Fix some minor type problems in v850 code
authorMiles Bader <miles@lsi.nec.co.jp>
Tue, 26 Nov 2002 13:19:25 +0000 (05:19 -0800)
committerLinus Torvalds <torvalds@home.transmeta.com>
Tue, 26 Nov 2002 13:19:25 +0000 (05:19 -0800)
Fix some minor type problems in v850 code
[Mostly signed/unsigned mismatches]

arch/v850/kernel/gbus_int.c
arch/v850/kernel/nb85e_intc.c
arch/v850/kernel/nb85e_utils.c
arch/v850/kernel/rte_cb.c
arch/v850/kernel/rte_mb_a_pci.c
arch/v850/kernel/signal.c

index 0b9f796455f6cbae51242688faa9a84f28e9ab50..a1b659ec4e43032fe5056f0d39fb1861e7c4802d 100644 (file)
@@ -183,7 +183,7 @@ void __init gbus_int_init_irq_types (struct gbus_int_irq_init *inits,
 {
        struct gbus_int_irq_init *init;
        for (init = inits; init->name; init++) {
-               int i;
+               unsigned i;
                struct hw_interrupt_type *hwit = hw_irq_types++;
 
                hwit->typename = init->name;
@@ -200,7 +200,7 @@ void __init gbus_int_init_irq_types (struct gbus_int_irq_init *inits,
 
                /* Set the interrupt priorities.  */
                for (i = 0; i < init->num; i++) {
-                       int j;
+                       unsigned j;
                        for (j = 0; j < NUM_USED_GINTS; j++)
                                if (used_gint[j].priority > init->priority)
                                        break;
@@ -222,7 +222,7 @@ static struct hw_interrupt_type gint_hw_itypes[NUM_USED_GINTS];
 
 /* GBUS interrupts themselves.  */
 
-__init struct gbus_int_irq_init gbus_irq_inits[] = {
+struct gbus_int_irq_init gbus_irq_inits[] __initdata = {
        /* First set defaults.  */
        { "GBUS_INT", IRQ_GBUS_INT(0), IRQ_GBUS_INT_NUM, 1, 6},
        { 0 }
@@ -236,7 +236,7 @@ static struct hw_interrupt_type gbus_hw_itypes[NUM_GBUS_IRQ_INITS];
 /* Initialize GBUS interrupts.  */
 void __init gbus_int_init_irqs (void)
 {
-       int i;
+       unsigned i;
 
        /* First initialize the shared gint interrupts.  */
        for (i = 0; i < NUM_USED_GINTS; i++) {
index 98177c1f8c5fd5f92a728384453489565c8c848d..daa543f5e94e5fbbfc3bde188a0f2fe6b9d84336 100644 (file)
@@ -33,7 +33,7 @@ void __init nb85e_intc_init_irq_types (struct nb85e_intc_irq_init *inits,
 {
        struct nb85e_intc_irq_init *init;
        for (init = inits; init->name; init++) {
-               int i;
+               unsigned i;
                struct hw_interrupt_type *hwit = hw_irq_types++;
 
                hwit->typename = init->name;
index 1e6ddcf2d1040812b1960be995e60bd12c9d2b3e..e826cb76d177ba7b6c9929701a38d0d0653833bb 100644 (file)
@@ -2,8 +2,8 @@
  * include/asm-v850/nb85e_utils.h -- Utility functions associated with
  *     the NB85E cpu core
  *
- *  Copyright (C) 2001  NEC Corporation
- *  Copyright (C) 2001  Miles Bader <miles@gnu.org>
+ *  Copyright (C) 2001,02  NEC Corporation
+ *  Copyright (C) 2001,02  Miles Bader <miles@gnu.org>
  *
  * 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
@@ -40,7 +40,7 @@ int calc_counter_params (unsigned long base_freq,
        /* Find the lowest clock divider setting that can represent RATE.  */
        for (_divlog2 = min_divlog2; _divlog2 <= max_divlog2; _divlog2++) {
                /* Minimum interrupt rate possible using this divider.  */
-               int min_int_rate
+               unsigned min_int_rate
                        = (base_freq >> _divlog2) >> counter_size;
 
                if (min_int_rate <= rate) {
index 8f35e93e6974a5ecc206fc9a55def2423cfea547..cea7be3eecb16ce5fa204037931217f408fbe20e 100644 (file)
@@ -61,10 +61,10 @@ void __init mach_early_init (void)
 void __init mach_setup (char **cmdline)
 {
        /* Probe for Mother-A, and print a message if we find it.  */
-       *(volatile long *)MB_A_SRAM_ADDR = 0xDEADBEEF;
-       if (*(volatile long *)MB_A_SRAM_ADDR == 0xDEADBEEF) {
-               *(volatile long *)MB_A_SRAM_ADDR = 0x12345678;
-               if (*(volatile long *)MB_A_SRAM_ADDR == 0x12345678)
+       *(volatile unsigned long *)MB_A_SRAM_ADDR = 0xDEADBEEF;
+       if (*(volatile unsigned long *)MB_A_SRAM_ADDR == 0xDEADBEEF) {
+               *(volatile unsigned long *)MB_A_SRAM_ADDR = 0x12345678;
+               if (*(volatile unsigned long *)MB_A_SRAM_ADDR == 0x12345678)
                        printk (KERN_INFO
                                "          NEC SolutionGear/Midas lab"
                                " RTE-MOTHER-A motherboard\n");
index 5416a50bf070581673324483d9fa532b8cfcb51c..c56b0d28bb981ea92b37c9b29df06ae9b4553764 100644 (file)
@@ -239,7 +239,7 @@ static void __devinit pcibios_assign_resources (void)
        struct resource *r;
 
        pci_for_each_dev (dev) {
-               int di_num;
+               unsigned di_num;
                unsigned class = dev->class >> 8;
 
                if (class && class != PCI_CLASS_BRIDGE_HOST) {
index b0a111d43fda47c6c248cc10ad06d8aeb57caf1a..bab85ab908b66709612e5c6335751d256fe1d0f6 100644 (file)
@@ -512,9 +512,10 @@ int do_signal(struct pt_regs *regs, sigset_t *oldset)
        /* Did we come from a system call? */
        if (PT_REGS_SYSCALL (regs)) {
                /* Restart the system call - no handlers present */
-               if (regs->gpr[GPR_RVAL] == -ERESTARTNOHAND ||
-                   regs->gpr[GPR_RVAL] == -ERESTARTSYS ||
-                   regs->gpr[GPR_RVAL] == -ERESTARTNOINTR) {
+               if (regs->gpr[GPR_RVAL] == (v850_reg_t)-ERESTARTNOHAND ||
+                   regs->gpr[GPR_RVAL] == (v850_reg_t)-ERESTARTSYS ||
+                   regs->gpr[GPR_RVAL] == (v850_reg_t)-ERESTARTNOINTR)
+               {
                        regs->gpr[12] = PT_REGS_SYSCALL (regs);
                        regs->pc -= 4; /* Size of `trap 0' insn.  */
                }