public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
* Kill warnings in 2.6.6
@ 2004-05-19  1:10 Peter Chubb
  2004-05-19 21:02 ` David Mosberger
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Peter Chubb @ 2004-05-19  1:10 UTC (permalink / raw)
  To: linux-ia64


Here're four patches to get rid of warnings in Linux 2.6.6, IA64.

The first is a copy of a fix four lines up; the second declares some
structures (that aren't used anyway), the third hides a function
that's used only for SMP, and the fourth makes cond_syscall use a real
prototype.  It's safe to make the conditional system call have the
same signature as the thing it's aliased to.

=== arch/ia64/ia32/ia32_signal.c 1.27 vs edited ==--- 1.27/arch/ia64/ia32/ia32_signal.c	Fri Apr 23 16:38:17 2004
+++ edited/arch/ia64/ia32/ia32_signal.c	Tue May 18 13:18:25 2004
@@ -173,7 +173,8 @@
 		case __SI_MESGQ >> 16:
 			err |= __put_user(from->si_uid, &to->si_uid);
 			err |= __put_user(from->si_pid, &to->si_pid);
-			err |= __put_user(from->si_ptr, &to->si_ptr);
+			addr = (unsigned long)from->si_ptr;
+			err |= __put_user(addr, &to->si_ptr);
 			break;
 		}
 	}


=== arch/ia64/kernel/machvec.c 1.7 vs edited ==--- 1.7/arch/ia64/kernel/machvec.c	Thu Mar 18 16:57:15 2004
+++ edited/arch/ia64/kernel/machvec.c	Tue May 18 13:00:35 2004
@@ -61,6 +61,9 @@
 }
 EXPORT_SYMBOL(machvec_timer_interrupt);
 
+struct device;
+struct scatterlist;
+
 void
 machvec_dma_sync_single (struct device *hwdev, dma_addr_t dma_handle, size_t size, int dir)
 {


=== arch/ia64/kernel/perfmon.c 1.73 vs edited ==--- 1.73/arch/ia64/kernel/perfmon.c	Fri Apr  9 02:28:59 2004
+++ edited/arch/ia64/kernel/perfmon.c	Tue May 18 13:01:03 2004
@@ -4559,6 +4559,7 @@
 	return 0;
 }
 
+#ifdef CONFIG_SMP
 static void
 pfm_force_cleanup(pfm_context_t *ctx, struct pt_regs *regs)
 {
@@ -4582,7 +4583,7 @@
 
 	DPRINT(("force cleanupf for [%d]\n",  task->pid));
 }
-
+#endif
 
 
 /*


=== include/asm-ia64/unistd.h 1.40 vs edited ==--- 1.40/include/asm-ia64/unistd.h	Thu Apr 15 18:26:53 2004
+++ edited/include/asm-ia64/unistd.h	Tue May 18 12:52:06 2004
@@ -367,12 +367,12 @@
 /*
  * "Conditional" syscalls
  *
- * Note, this macro can only be used in the file which defines sys_ni_syscall, i.e., in
- * kernel/sys.c.  This version causes warnings because the declaration isn't a
- * proper prototype, but we can't use __typeof__ either, because not all cond_syscall()
- * declarations have prototypes at the moment.
+ * Note, this macro can only be used in the file which defines
+ * sys_ni_syscall, i.e., in kernel/sys.c.  It is used to provide
+ * addresses for system call functions for entry.S, where the
+ * functions could be configured out.
  */
-#define cond_syscall(x) asmlinkage long x() __attribute__((weak,alias("sys_ni_syscall")));
+#define cond_syscall(x) asmlinkage long x(void) __attribute__((weak,alias("sys_ni_syscall")));
 
 #endif /* !__ASSEMBLY__ */
 #endif /* __KERNEL__ */

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Kill warnings in 2.6.6
  2004-05-19  1:10 Kill warnings in 2.6.6 Peter Chubb
@ 2004-05-19 21:02 ` David Mosberger
  2004-05-20  1:10 ` David Mosberger
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: David Mosberger @ 2004-05-19 21:02 UTC (permalink / raw)
  To: linux-ia64

>>>>> On Wed, 19 May 2004 11:10:00 +1000, Peter Chubb <peterc@gelato.unsw.edu.au> said:

 Peter> === arch/ia64/ia32/ia32_signal.c 1.27 vs edited == Peter> --- 1.27/arch/ia64/ia32/ia32_signal.c	Fri Apr 23 16:38:17 2004
 Peter> +++ edited/arch/ia64/ia32/ia32_signal.c	Tue May 18 13:18:25 2004
 Peter> @@ -173,7 +173,8 @@
 Peter>  		case __SI_MESGQ >> 16:
 Peter>  			err |= __put_user(from->si_uid, &to->si_uid);
 Peter>  			err |= __put_user(from->si_pid, &to->si_pid);
 Peter> -			err |= __put_user(from->si_ptr, &to->si_ptr);
 Peter> +			addr = (unsigned long)from->si_ptr;
 Peter> +			err |= __put_user(addr, &to->si_ptr);
 Peter>  			break;
 Peter>  		}
 Peter>  	}

Hmmh, this one is already in my tree.

  Peter> === arch/ia64/kernel/perfmon.c 1.73 vs edited === ---

I'll leave that to Stephane.

=== include/asm-ia64/unistd.h 1.40 vs edited ==--- 1.40/include/asm-ia64/unistd.h	Thu Apr 15 18:26:53 2004
+++ edited/include/asm-ia64/unistd.h	Tue May 18 12:52:06 2004
@@ -367,12 +367,12 @@
  */
-#define cond_syscall(x) asmlinkage long x() __attribute__((weak,alias("sys_ni_syscall")));
+#define cond_syscall(x) asmlinkage long x(void) __attribute__((weak,alias("sys_ni_syscall")));

Hmmh, the reason the warning got introduced was that there was an
issue that got triggered with the Intel compiler and the stubs
probably should have been delcared properly in a header-file anyhow.
I haven't looked into it recently, but I was hoping that the
introduction of syscall.h would fix this in a clean fashion (i.e.,
without introducing potentionally conflicting declarations).

	--david

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Kill warnings in 2.6.6
  2004-05-19  1:10 Kill warnings in 2.6.6 Peter Chubb
  2004-05-19 21:02 ` David Mosberger
@ 2004-05-20  1:10 ` David Mosberger
  2004-05-20  4:55 ` Peter Chubb
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: David Mosberger @ 2004-05-20  1:10 UTC (permalink / raw)
  To: linux-ia64


 Peter> === arch/ia64/kernel/machvec.c 1.7 vs edited == Peter> --- 1.7/arch/ia64/kernel/machvec.c	Thu Mar 18 16:57:15 2004
 Peter> +++ edited/arch/ia64/kernel/machvec.c	Tue May 18 13:00:35 2004
 Peter> @@ -61,6 +61,9 @@
 Peter>  }
 Peter>  EXPORT_SYMBOL(machvec_timer_interrupt);
 Peter>  
 Peter> +struct device;
 Peter> +struct scatterlist;
 Peter> +
 Peter>  void
 Peter>  machvec_dma_sync_single (struct device *hwdev, dma_addr_t dma_handle, size_t size, int dir)

Where does this get rid of a warning?  A driver or something else?

	--david

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Kill warnings in 2.6.6
  2004-05-19  1:10 Kill warnings in 2.6.6 Peter Chubb
  2004-05-19 21:02 ` David Mosberger
  2004-05-20  1:10 ` David Mosberger
@ 2004-05-20  4:55 ` Peter Chubb
  2004-05-20  5:10 ` David Mosberger
  2004-05-21 20:23 ` David Mosberger
  4 siblings, 0 replies; 6+ messages in thread
From: Peter Chubb @ 2004-05-20  4:55 UTC (permalink / raw)
  To: linux-ia64

>>>>> "David" = David Mosberger <davidm@napali.hpl.hp.com> writes:

Peter> === arch/ia64/kernel/machvec.c 1.7 vs edited === ---
Peter> 1.7/arch/ia64/kernel/machvec.c Thu Mar 18 16:57:15 2004 +++
Peter> edited/arch/ia64/kernel/machvec.c Tue May 18 13:00:35 2004 @@
Peter> -61,6 +61,9 @@ } EXPORT_SYMBOL(machvec_timer_interrupt);
Peter> 
Peter> +struct device; +struct scatterlist; + void
Peter> machvec_dma_sync_single (struct device *hwdev, dma_addr_t
Peter> dma_handle, size_t size, int dir)

David> Where does this get rid of a warning?  A driver or something
David> else?

Building in ../build/ia64/linux-2.6-quickfix
  Using /home/peterc/kernels/linux-2.6-quickfix as source for kernel
make[2]: `arch/ia64/kernel/asm-offsets.s' is up to date.
  CHK     include/asm-ia64/offsets.h
  CHK     include/linux/compile.h
  CC      arch/ia64/kernel/machvec.o
/home/peterc/kernels/linux-2.6-quickfix/arch/ia64/kernel/machvec.c:65:
warning: `struct device' declared inside parameter list
/home/peterc/kernels/linux-2.6-quickfix/arch/ia64/kernel/machvec.c:65:
warning: its scope is only this definition or declaration, which is
probably not what you want
/home/peterc/kernels/linux-2.6-quickfix/arch/ia64/kernel/machvec.c:72:
warning: `struct scatterlist' declared inside parameter list
/home/peterc/kernels/linux-2.6-quickfix/arch/ia64/kernel/machvec.c:72:
warning: `struct device' declared inside parameter list

Using gcc 3.3.3, configured as ZX1, McKinley.

If you configure with GENERIC, then asm/machvec.h is included which
has declarations for struct device, etc, but without GENERIC the
definitions are missing.
-- 
Dr Peter Chubb  http://www.gelato.unsw.edu.au  peterc AT gelato.unsw.edu.au
The technical we do immediately,  the political takes *forever*

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Kill warnings in 2.6.6
  2004-05-19  1:10 Kill warnings in 2.6.6 Peter Chubb
                   ` (2 preceding siblings ...)
  2004-05-20  4:55 ` Peter Chubb
@ 2004-05-20  5:10 ` David Mosberger
  2004-05-21 20:23 ` David Mosberger
  4 siblings, 0 replies; 6+ messages in thread
From: David Mosberger @ 2004-05-20  5:10 UTC (permalink / raw)
  To: linux-ia64

>>>>> On Thu, 20 May 2004 14:55:06 +1000, Peter Chubb <peterc@gelato.unsw.edu.au> said:

  David> Where does this get rid of a warning?  A driver or something
  David> else?

  Peter> If you configure with GENERIC, then asm/machvec.h is included
  Peter> which has declarations for struct device, etc, but without
  Peter> GENERIC the definitions are missing.

Ah, that explains why I didn't see the warnings: I had already fixed
them by including machvec.h in machvec.c.

Thanks,

	--david

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Kill warnings in 2.6.6
  2004-05-19  1:10 Kill warnings in 2.6.6 Peter Chubb
                   ` (3 preceding siblings ...)
  2004-05-20  5:10 ` David Mosberger
@ 2004-05-21 20:23 ` David Mosberger
  4 siblings, 0 replies; 6+ messages in thread
From: David Mosberger @ 2004-05-21 20:23 UTC (permalink / raw)
  To: linux-ia64


 > -#define cond_syscall(x) asmlinkage long x() __attribute__((weak,alias("sys_ni_syscall")));
 > +#define cond_syscall(x) asmlinkage long x(void) __attribute__((weak,alias("sys_ni_syscall")));

I made this change now.  The Intel compiler certainly compiles it fine
and it gets rid of the last remaining large blob of annoying warning
messages in sys.c.  I didn't try building the entire kernel with the
Intel compiler, but in the unlikely event that Peter's version leads
to link-time-problems, we can fix that later, when Intel makes the
script available needed to compile the kernel (hint, hint... ;-).

	--david

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2004-05-21 20:23 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-05-19  1:10 Kill warnings in 2.6.6 Peter Chubb
2004-05-19 21:02 ` David Mosberger
2004-05-20  1:10 ` David Mosberger
2004-05-20  4:55 ` Peter Chubb
2004-05-20  5:10 ` David Mosberger
2004-05-21 20:23 ` David Mosberger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox