[patch] alpha compile warnings cleanup

From: Ivan Kokshaysky (ink@jurassic.park.msu.ru)
Date: Thu Jul 06 2000 - 14:37:41 EST


Also disables OSF syscalls debugging messages.

The only arch independent fix is in serial.c.
Perhaps it reveals GCC 64-bit bug:
long = int << 32
produces not only warning: shift count >= width of type
but incorrect code.
long = (long)int << 32
works fine though.

Ivan.

diff -ur 2.4.0t2p4/arch/alpha/kernel/irq.c linux/arch/alpha/kernel/irq.c
--- 2.4.0t2p4/arch/alpha/kernel/irq.c Thu Jun 22 09:30:59 2000
+++ linux/arch/alpha/kernel/irq.c Thu Jul 6 16:23:54 2000
@@ -359,7 +359,9 @@
 static void
 register_irq_proc (unsigned int irq)
 {
+#ifdef CONFIG_SMP
         struct proc_dir_entry *entry;
+#endif
         char name [MAX_NAMELEN];
 
         if (!root_irq_dir || (irq_desc[irq].handler == &no_irq_type))
@@ -389,7 +391,9 @@
 void
 init_irq_proc (void)
 {
+#ifdef CONFIG_SMP
         struct proc_dir_entry *entry;
+#endif
         int i;
 
         /* create /proc/irq */
@@ -512,11 +516,12 @@
 int
 get_irq_list(char *buf)
 {
- int i, j;
         struct irqaction * action;
         char *p = buf;
-
+ int i;
 #ifdef CONFIG_SMP
+ int j;
+
         p += sprintf(p, " ");
         for (i = 0; i < smp_num_cpus; i++)
                 p += sprintf(p, "CPU%d ", i);
diff -ur 2.4.0t2p4/arch/alpha/kernel/irq_alpha.c linux/arch/alpha/kernel/irq_alpha.c
--- 2.4.0t2p4/arch/alpha/kernel/irq_alpha.c Tue Jun 20 04:59:32 2000
+++ linux/arch/alpha/kernel/irq_alpha.c Thu Jul 6 16:29:26 2000
@@ -153,7 +153,7 @@
 #endif
 
         if (expected) {
- int cpu = smp_processor_id();
+ int cpu __attribute__((unused)) = smp_processor_id();
                 mcheck_expected(cpu) = 0;
                 mcheck_taken(cpu) = 1;
                 return;
diff -ur 2.4.0t2p4/arch/alpha/kernel/osf_sys.c linux/arch/alpha/kernel/osf_sys.c
--- 2.4.0t2p4/arch/alpha/kernel/osf_sys.c Thu Jul 6 17:51:26 2000
+++ linux/arch/alpha/kernel/osf_sys.c Thu Jul 6 11:58:55 2000
@@ -74,8 +74,10 @@
         mm = current->mm;
         mm->end_code = bss_start + bss_len;
         mm->brk = bss_start + bss_len;
+#ifdef DEBUG_OSF_SYSCALLS
         printk("set_program_attributes(%lx %lx %lx %lx)\n",
                 text_start, text_len, bss_start, bss_len);
+#endif
         unlock_kernel();
         return 0;
 }
diff -ur 2.4.0t2p4/arch/alpha/kernel/pci_iommu.c linux/arch/alpha/kernel/pci_iommu.c
--- 2.4.0t2p4/arch/alpha/kernel/pci_iommu.c Thu Jun 22 09:30:59 2000
+++ linux/arch/alpha/kernel/pci_iommu.c Thu Jul 6 16:32:47 2000
@@ -416,8 +416,9 @@
         ptes = &arena->ptes[dma_ofs];
         sg = leader;
         do {
+#if DEBUG_ALLOC > 0
                 struct scatterlist *last_sg = sg;
-
+#endif
                 size = sg->length;
                 paddr = virt_to_phys(sg->address);
 
diff -ur 2.4.0t2p4/arch/alpha/kernel/traps.c linux/arch/alpha/kernel/traps.c
--- 2.4.0t2p4/arch/alpha/kernel/traps.c Tue Jun 20 04:59:33 2000
+++ linux/arch/alpha/kernel/traps.c Thu Jul 6 11:58:55 2000
@@ -1093,7 +1093,9 @@
 {
         /* We only get here for OSF system calls, minus #112;
            the rest go to sys_ni_syscall. */
- printk("<sc %ld(%lx,%lx,%lx)>", regs.r0, a0, a1, a2);
+#ifdef DEBUG_OSF_SYSCALLS
+ printk("<sc %ld(%lx,%lx,%lx)>\n", regs.r0, a0, a1, a2);
+#endif
         return -ENOSYS;
 }
 
diff -ur 2.4.0t2p4/arch/alpha/mm/extable.c linux/arch/alpha/mm/extable.c
--- 2.4.0t2p4/arch/alpha/mm/extable.c Tue Jun 20 04:59:33 2000
+++ linux/arch/alpha/mm/extable.c Thu Jul 6 16:49:58 2000
@@ -88,7 +88,7 @@
          */
         ret = search_exception_table_without_gp(addr);
         if (ret) {
- printk(KERN_ALERT, "%s: [%lx] EX_TABLE search fail with"
+ printk(KERN_ALERT "%s: [%lx] EX_TABLE search fail with "
                        "exc frame GP, success with raw GP\n",
                        current->comm, addr);
                 return ret;
diff -ur 2.4.0t2p4/drivers/char/serial.c linux/drivers/char/serial.c
--- 2.4.0t2p4/drivers/char/serial.c Thu Jul 6 17:51:30 2000
+++ linux/drivers/char/serial.c Thu Jul 6 12:16:02 2000
@@ -2048,7 +2048,7 @@
 
         new_port = new_serial.port;
         if (HIGH_BITS_OFFSET)
- new_port += new_serial.port_high << HIGH_BITS_OFFSET;
+ new_port += (long)new_serial.port_high << HIGH_BITS_OFFSET;
 
         change_irq = new_serial.irq != state->irq;
         change_port = (new_port != ((int) state->port)) ||
@@ -5172,7 +5172,7 @@
 
         port = req->port;
         if (HIGH_BITS_OFFSET)
- port += req->port_high << HIGH_BITS_OFFSET;
+ port += (long)req->port_high << HIGH_BITS_OFFSET;
 
         save_flags(flags); cli();
         for (i = 0; i < NR_PORTS; i++) {
diff -ur 2.4.0t2p4/include/asm-alpha/elf.h linux/include/asm-alpha/elf.h
--- 2.4.0t2p4/include/asm-alpha/elf.h Thu Apr 13 19:11:49 2000
+++ linux/include/asm-alpha/elf.h Thu Jul 6 16:12:19 2000
@@ -127,7 +127,7 @@
 
 #ifdef __KERNEL__
 #define SET_PERSONALITY(EX, IBCS2) \
- set_personality((EX).e_flags & EF_ALPHA_32BIT \
+ set_personality(((EX).e_flags & EF_ALPHA_32BIT) \
            ? PER_LINUX_32BIT : (IBCS2) ? PER_SVR4 : PER_LINUX)
 #endif
 
diff -ur 2.4.0t2p4/include/asm-alpha/posix_types.h linux/include/asm-alpha/posix_types.h
--- 2.4.0t2p4/include/asm-alpha/posix_types.h Sun Jan 16 09:08:28 2000
+++ linux/include/asm-alpha/posix_types.h Thu Jul 6 15:56:53 2000
@@ -12,7 +12,7 @@
 typedef unsigned int __kernel_mode_t;
 typedef unsigned int __kernel_nlink_t;
 typedef long __kernel_off_t;
-typedef long __kernel_loff_t;
+typedef long long __kernel_loff_t;
 typedef int __kernel_pid_t;
 typedef int __kernel_ipc_pid_t;
 typedef unsigned int __kernel_uid_t;

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Jul 07 2000 - 21:00:19 EST