All of lore.kernel.org
 help / color / mirror / Atom feed
* [2.5.67] gen_rtc compile error
@ 2003-04-08 18:37 Paweł Gołaszewski
  2003-04-08 19:20 ` Michael Buesch
  0 siblings, 1 reply; 7+ messages in thread
From: Paweł Gołaszewski @ 2003-04-08 18:37 UTC (permalink / raw)
  To: linux-kernel

When I try to build my kernel I get:

  gcc -Wp,-MD,drivers/char/.genrtc.o.d -D__KERNEL__ -Iinclude -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2 -march=i686 -malign-functions=4 -Iinclude/asm-i386/mach-default -nostdinc -iwithprefix include -DMODULE   -DKBUILD_BASENAME=genrtc -DKBUILD_MODNAME=genrtc -c -o 
drivers/char/.tmp_genrtc.o drivers/char/genrtc.c
drivers/char/genrtc.c:100: warning: static declaration for `gen_rtc_interrupt' follows non-static
drivers/char/genrtc.c: In function `gen_rtc_timer':
drivers/char/genrtc.c:135: warning: comparison of distinct pointer types lacks a cast
drivers/char/genrtc.c: In function `gen_rtc_proc_output':
drivers/char/genrtc.c:453: void value not ignored as it ought to be
drivers/char/genrtc.c:498: `RTC_BATT_BAD' undeclared (first use in this function)
drivers/char/genrtc.c:498: (Each undeclared identifier is reported only once
drivers/char/genrtc.c:498: for each function it appears in.)
drivers/char/genrtc.c:448: warning: `flags' might be used uninitialized in this function
make[3]: *** [drivers/char/genrtc.o] Error 1
make[2]: *** [drivers/char] Error 2
make[1]: *** [drivers] Error 2
make: *** [modules] Error 2

My kernel configuration:
http://piorun.ds.pg.gda.pl/~blues/config-2.5.67.txt

-- 
pozdr.  Paweł Gołaszewski        
---------------------------------
worth to see: http://www.againsttcpa.com/
CPU not found - software emulation...

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

* Re: [2.5.67] gen_rtc compile error
  2003-04-08 18:37 [2.5.67] gen_rtc compile error Paweł Gołaszewski
@ 2003-04-08 19:20 ` Michael Buesch
  2003-04-08 19:28   ` Paweł Gołaszewski
                     ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Michael Buesch @ 2003-04-08 19:20 UTC (permalink / raw)
  To: Paweł Gołaszewski; +Cc: linux-kernel

On Tuesday 08 April 2003 20:37, Paweł Gołaszewski wrote:
> When I try to build my kernel I get:
>
> [...]
>
> My kernel configuration:
> http://piorun.ds.pg.gda.pl/~blues/config-2.5.67.txt

Battery status seems to be not available on all architectures.
(I don't know the reason for this.)
With this patch, it should compile (against 2.5.67):

--- drivers/char/genrtc.c.orig	2003-04-08 21:15:52.000000000 +0200
+++ drivers/char/genrtc.c	2003-04-08 21:17:33.000000000 +0200
@@ -486,7 +486,9 @@
 		     "update_IRQ\t: %s\n"
 		     "periodic_IRQ\t: %s\n"
 		     "periodic_freq\t: %ld\n"
+#ifdef RTC_BATT_BAD
 		     "batt_status\t: %s\n",
+#endif
 		     (flags & RTC_DST_EN) ? "yes" : "no",
 		     (flags & RTC_DM_BINARY) ? "no" : "yes",
 		     (flags & RTC_24H) ? "yes" : "no",
@@ -494,8 +496,11 @@
 		     (flags & RTC_AIE) ? "yes" : "no",
 		     irq_active ? "yes" : "no",
 		     (flags & RTC_PIE) ? "yes" : "no",
-		     0L /* freq */,
-		     (flags & RTC_BATT_BAD) ? "bad" : "okay");
+		     0L /* freq */
+#ifdef RTC_BATT_BAD
+		     ,(flags & RTC_BATT_BAD) ? "bad" : "okay")
+#endif
+		     ;
 	if (!get_rtc_pll(&pll))
 	    p += sprintf(p,
 			 "PLL adjustment\t: %d\n"


BUT: Is bat-state *really* not supported on all platforms?

Regards
Michael Buesch.


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

* Re: [2.5.67] gen_rtc compile error
  2003-04-08 19:20 ` Michael Buesch
@ 2003-04-08 19:28   ` Paweł Gołaszewski
  2003-04-08 19:30   ` Michael Buesch
  2003-04-08 19:48   ` Geert Uytterhoeven
  2 siblings, 0 replies; 7+ messages in thread
From: Paweł Gołaszewski @ 2003-04-08 19:28 UTC (permalink / raw)
  To: Michael Buesch; +Cc: linux-kernel

On Tue, 8 Apr 2003, Michael Buesch wrote:
> > When I try to build my kernel I get:
> >
> > [...]
> >
> > My kernel configuration:
> > http://piorun.ds.pg.gda.pl/~blues/config-2.5.67.txt
> 
> Battery status seems to be not available on all architectures. (I don't
> know the reason for this.) With this patch, it should compile (against
> 2.5.67):
> 
> --- drivers/char/genrtc.c.orig	2003-04-08 21:15:52.000000000 +0200
> +++ drivers/char/genrtc.c	2003-04-08 21:17:33.000000000 +0200
> @@ -486,7 +486,9 @@
>  		     "update_IRQ\t: %s\n"
>  		     "periodic_IRQ\t: %s\n"
>  		     "periodic_freq\t: %ld\n"
> +#ifdef RTC_BATT_BAD
>  		     "batt_status\t: %s\n",
> +#endif
>  		     (flags & RTC_DST_EN) ? "yes" : "no",
>  		     (flags & RTC_DM_BINARY) ? "no" : "yes",
>  		     (flags & RTC_24H) ? "yes" : "no",
> @@ -494,8 +496,11 @@
>  		     (flags & RTC_AIE) ? "yes" : "no",
>  		     irq_active ? "yes" : "no",
>  		     (flags & RTC_PIE) ? "yes" : "no",
> -		     0L /* freq */,
> -		     (flags & RTC_BATT_BAD) ? "bad" : "okay");
> +		     0L /* freq */
> +#ifdef RTC_BATT_BAD
> +		     ,(flags & RTC_BATT_BAD) ? "bad" : "okay")
> +#endif
> +		     ;
>  	if (!get_rtc_pll(&pll))
>  	    p += sprintf(p,
>  			 "PLL adjustment\t: %d\n"

Thanks for this patch.

-- 
pozdr.  Paweł Gołaszewski        
---------------------------------
worth to see: http://www.againsttcpa.com/
CPU not found - software emulation...

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

* Re: [2.5.67] gen_rtc compile error
  2003-04-08 19:20 ` Michael Buesch
  2003-04-08 19:28   ` Paweł Gołaszewski
@ 2003-04-08 19:30   ` Michael Buesch
  2003-04-08 19:40     ` Andreas Schwab
  2003-04-08 19:48   ` Geert Uytterhoeven
  2 siblings, 1 reply; 7+ messages in thread
From: Michael Buesch @ 2003-04-08 19:30 UTC (permalink / raw)
  To: linux-kernel; +Cc: Paweł Gołaszewski

Correcting my patch: ;)

--- drivers/char/genrtc.c.orig	2003-04-08 21:15:52.000000000 +0200
+++ drivers/char/genrtc.c	2003-04-08 21:28:43.000000000 +0200
@@ -486,16 +486,21 @@
 		     "update_IRQ\t: %s\n"
 		     "periodic_IRQ\t: %s\n"
 		     "periodic_freq\t: %ld\n"
-		     "batt_status\t: %s\n",
-		     (flags & RTC_DST_EN) ? "yes" : "no",
+#ifdef RTC_BATT_BAD
+		     "batt_status\t: %s\n"
+#endif
+		     ,(flags & RTC_DST_EN) ? "yes" : "no",
 		     (flags & RTC_DM_BINARY) ? "no" : "yes",
 		     (flags & RTC_24H) ? "yes" : "no",
 		     (flags & RTC_SQWE) ? "yes" : "no",
 		     (flags & RTC_AIE) ? "yes" : "no",
 		     irq_active ? "yes" : "no",
 		     (flags & RTC_PIE) ? "yes" : "no",
-		     0L /* freq */,
-		     (flags & RTC_BATT_BAD) ? "bad" : "okay");
+		     0L /* freq */
+#ifdef RTC_BATT_BAD
+		     ,(flags & RTC_BATT_BAD) ? "bad" : "okay")
+#endif
+		     ;
 	if (!get_rtc_pll(&pll))
 	    p += sprintf(p,
 			 "PLL adjustment\t: %d\n"


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

* Re: [2.5.67] gen_rtc compile error
  2003-04-08 19:30   ` Michael Buesch
@ 2003-04-08 19:40     ` Andreas Schwab
  2003-04-08 19:46       ` Michael Buesch
  0 siblings, 1 reply; 7+ messages in thread
From: Andreas Schwab @ 2003-04-08 19:40 UTC (permalink / raw)
  To: Michael Buesch; +Cc: linux-kernel, Paweł Gołaszewski

Michael Buesch <freesoftwaredeveloper@web.de> writes:

|> Correcting my patch: ;)

Still not right.

|> --- drivers/char/genrtc.c.orig	2003-04-08 21:15:52.000000000 +0200
|> +++ drivers/char/genrtc.c	2003-04-08 21:28:43.000000000 +0200
|> @@ -486,16 +486,21 @@
|>  		     "update_IRQ\t: %s\n"
|>  		     "periodic_IRQ\t: %s\n"
|>  		     "periodic_freq\t: %ld\n"
|> -		     "batt_status\t: %s\n",
|> -		     (flags & RTC_DST_EN) ? "yes" : "no",
|> +#ifdef RTC_BATT_BAD
|> +		     "batt_status\t: %s\n"
|> +#endif
|> +		     ,(flags & RTC_DST_EN) ? "yes" : "no",
|>  		     (flags & RTC_DM_BINARY) ? "no" : "yes",
|>  		     (flags & RTC_24H) ? "yes" : "no",
|>  		     (flags & RTC_SQWE) ? "yes" : "no",
|>  		     (flags & RTC_AIE) ? "yes" : "no",
|>  		     irq_active ? "yes" : "no",
|>  		     (flags & RTC_PIE) ? "yes" : "no",
|> -		     0L /* freq */,
|> -		     (flags & RTC_BATT_BAD) ? "bad" : "okay");
|> +		     0L /* freq */
|> +#ifdef RTC_BATT_BAD
|> +		     ,(flags & RTC_BATT_BAD) ? "bad" : "okay")
|> +#endif
|> +		     ;

Lacks a close paren if !RTC_BATT_BAD.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

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

* Re: [2.5.67] gen_rtc compile error
  2003-04-08 19:40     ` Andreas Schwab
@ 2003-04-08 19:46       ` Michael Buesch
  0 siblings, 0 replies; 7+ messages in thread
From: Michael Buesch @ 2003-04-08 19:46 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: linux-kernel, Paweł Gołaszewski

On Tuesday 08 April 2003 21:40, Andreas Schwab wrote:
> Michael Buesch <freesoftwaredeveloper@web.de> writes:
> |> Correcting my patch: ;)
>
> Still not right.
>
> [...]
>
> Lacks a close paren if !RTC_BATT_BAD.
>
> Andreas.

Uhh, must be *very* hard to post the correct patch at first time
trying it. :)


--- drivers/char/genrtc.c.orig	2003-04-08 21:15:52.000000000 +0200
+++ drivers/char/genrtc.c	2003-04-08 21:43:37.000000000 +0200
@@ -486,16 +486,21 @@
 		     "update_IRQ\t: %s\n"
 		     "periodic_IRQ\t: %s\n"
 		     "periodic_freq\t: %ld\n"
-		     "batt_status\t: %s\n",
-		     (flags & RTC_DST_EN) ? "yes" : "no",
+#ifdef RTC_BATT_BAD
+		     "batt_status\t: %s\n"
+#endif
+		     ,(flags & RTC_DST_EN) ? "yes" : "no",
 		     (flags & RTC_DM_BINARY) ? "no" : "yes",
 		     (flags & RTC_24H) ? "yes" : "no",
 		     (flags & RTC_SQWE) ? "yes" : "no",
 		     (flags & RTC_AIE) ? "yes" : "no",
 		     irq_active ? "yes" : "no",
 		     (flags & RTC_PIE) ? "yes" : "no",
-		     0L /* freq */,
-		     (flags & RTC_BATT_BAD) ? "bad" : "okay");
+		     0L /* freq */
+#ifdef RTC_BATT_BAD
+		     ,(flags & RTC_BATT_BAD) ? "bad" : "okay"
+#endif
+		     );
 	if (!get_rtc_pll(&pll))
 	    p += sprintf(p,
 			 "PLL adjustment\t: %d\n"


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

* Re: [2.5.67] gen_rtc compile error
  2003-04-08 19:20 ` Michael Buesch
  2003-04-08 19:28   ` Paweł Gołaszewski
  2003-04-08 19:30   ` Michael Buesch
@ 2003-04-08 19:48   ` Geert Uytterhoeven
  2 siblings, 0 replies; 7+ messages in thread
From: Geert Uytterhoeven @ 2003-04-08 19:48 UTC (permalink / raw)
  To: Michael Buesch; +Cc: Paweł Gołaszewski, Linux Kernel Development

On Tue, 8 Apr 2003, Michael Buesch wrote:
> On Tuesday 08 April 2003 20:37, Pawe³ Go³aszewski wrote:
> > When I try to build my kernel I get:
> >
> > [...]
> >
> > My kernel configuration:
> > http://piorun.ds.pg.gda.pl/~blues/config-2.5.67.txt
> 
> Battery status seems to be not available on all architectures.
> (I don't know the reason for this.)
> With this patch, it should compile (against 2.5.67):

Please use the patch I mailed to lkml last month, and which got reposted by
other people.

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds


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

end of thread, other threads:[~2003-04-08 19:37 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-04-08 18:37 [2.5.67] gen_rtc compile error Paweł Gołaszewski
2003-04-08 19:20 ` Michael Buesch
2003-04-08 19:28   ` Paweł Gołaszewski
2003-04-08 19:30   ` Michael Buesch
2003-04-08 19:40     ` Andreas Schwab
2003-04-08 19:46       ` Michael Buesch
2003-04-08 19:48   ` Geert Uytterhoeven

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.