* 2.6.22-rc2 built on ppc (1)
@ 2007-05-20 11:06 Elimar Riesebieter
2007-05-20 11:36 ` Rafael J. Wysocki
2007-06-09 13:55 ` Pavel Machek
0 siblings, 2 replies; 7+ messages in thread
From: Elimar Riesebieter @ 2007-05-20 11:06 UTC (permalink / raw)
To: pavel; +Cc: linux-pm
[-- Attachment #1.1: Type: text/plain, Size: 511 bytes --]
Hi,
FYI, building 2.6.22-rc2 with
gcc (GCC) 4.1.3 20070514 (prerelease) (Debian 4.1.2-7)
on my powerbook (PPC) gives:
...
kernel/power/swsusp.c: In function 'swsusp_show_speed':
kernel/power/swsusp.c:193: warning: comparison of distinct pointer types lacks a cast
...
If more info is needed, please contact me via PM, as I am not
subscribed.
Thanks for your patience
Elimar
--
Never make anything simple and efficient when a way
can be found to make it complex and wonderful ;-)
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: 2.6.22-rc2 built on ppc (1)
2007-05-20 11:06 2.6.22-rc2 built on ppc (1) Elimar Riesebieter
@ 2007-05-20 11:36 ` Rafael J. Wysocki
2007-05-20 11:43 ` Johannes Berg
2007-06-09 13:55 ` Pavel Machek
1 sibling, 1 reply; 7+ messages in thread
From: Rafael J. Wysocki @ 2007-05-20 11:36 UTC (permalink / raw)
To: Elimar Riesebieter; +Cc: linux-pm
Hi,
On Sunday, 20 May 2007 13:06, Elimar Riesebieter wrote:
> Hi,
>
> FYI, building 2.6.22-rc2 with
> gcc (GCC) 4.1.3 20070514 (prerelease) (Debian 4.1.2-7)
> on my powerbook (PPC) gives:
>
> ...
> kernel/power/swsusp.c: In function 'swsusp_show_speed':
> kernel/power/swsusp.c:193: warning: comparison of distinct pointer types lacks a cast
Well, this warning doesn't make sense. In 2.6.22-rc2 line 193 of swsusp.c is
do_div(elapsed_centisecs64, NSEC_PER_SEC / 100);
where elapsed_centisecs64 is s64.
Greetings,
Rafael
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: 2.6.22-rc2 built on ppc (1)
2007-05-20 11:36 ` Rafael J. Wysocki
@ 2007-05-20 11:43 ` Johannes Berg
2007-06-09 14:14 ` Pavel Machek
0 siblings, 1 reply; 7+ messages in thread
From: Johannes Berg @ 2007-05-20 11:43 UTC (permalink / raw)
To: Rafael J. Wysocki; +Cc: linux-pm, Elimar Riesebieter
[-- Attachment #1.1: Type: text/plain, Size: 561 bytes --]
Hi,
> > kernel/power/swsusp.c: In function 'swsusp_show_speed':
> > kernel/power/swsusp.c:193: warning: comparison of distinct pointer types lacks a cast
>
> Well, this warning doesn't make sense. In 2.6.22-rc2 line 193 of swsusp.c is
>
> do_div(elapsed_centisecs64, NSEC_PER_SEC / 100);
>
> where elapsed_centisecs64 is s64.
yeah, and the do_div64 macro is then comparing (s64*) == (u64*) in a
null-statement and tells you that the types are different. I tracked
this a long time ago and figured it wasn't worth thinking about.
johannes
[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 190 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: 2.6.22-rc2 built on ppc (1)
2007-05-20 11:43 ` Johannes Berg
@ 2007-06-09 14:14 ` Pavel Machek
2007-06-09 17:06 ` Elimar Riesebieter
2007-06-11 8:26 ` Johannes Berg
0 siblings, 2 replies; 7+ messages in thread
From: Pavel Machek @ 2007-06-09 14:14 UTC (permalink / raw)
To: Johannes Berg; +Cc: linux-pm, Elimar Riesebieter
Hi!
> > > kernel/power/swsusp.c: In function 'swsusp_show_speed':
> > > kernel/power/swsusp.c:193: warning: comparison of distinct pointer types lacks a cast
> >
> > Well, this warning doesn't make sense. In 2.6.22-rc2 line 193 of swsusp.c is
> >
> > do_div(elapsed_centisecs64, NSEC_PER_SEC / 100);
> >
> > where elapsed_centisecs64 is s64.
>
> yeah, and the do_div64 macro is then comparing (s64*) == (u64*) in a
> null-statement and tells you that the types are different. I tracked
> this a long time ago and figured it wasn't worth thinking about.
Elimar, can you modify the code to
do_div(elapsed_centisecs64, (s64) NSEC_PER_SEC / 100);
...to see if the warning goes away?
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: 2.6.22-rc2 built on ppc (1)
2007-06-09 14:14 ` Pavel Machek
@ 2007-06-09 17:06 ` Elimar Riesebieter
2007-06-11 8:26 ` Johannes Berg
1 sibling, 0 replies; 7+ messages in thread
From: Elimar Riesebieter @ 2007-06-09 17:06 UTC (permalink / raw)
To: Pavel Machek; +Cc: Johannes Berg, linux-pm
[-- Attachment #1.1: Type: text/plain, Size: 921 bytes --]
On Sat, 09 Jun 2007 the mental interface of
Pavel Machek told:
> Hi!
>
> > > > kernel/power/swsusp.c: In function 'swsusp_show_speed':
> > > > kernel/power/swsusp.c:193: warning: comparison of distinct pointer types lacks a cast
> > >
> > > Well, this warning doesn't make sense. In 2.6.22-rc2 line 193 of swsusp.c is
> > >
> > > do_div(elapsed_centisecs64, NSEC_PER_SEC / 100);
> > >
> > > where elapsed_centisecs64 is s64.
> >
> > yeah, and the do_div64 macro is then comparing (s64*) == (u64*) in a
> > null-statement and tells you that the types are different. I tracked
> > this a long time ago and figured it wasn't worth thinking about.
>
> Elimar, can you modify the code to
>
> do_div(elapsed_centisecs64, (s64) NSEC_PER_SEC / 100);
>
> ...to see if the warning goes away?
Same warning :(
Elimar
--
It's a good thing we don't get all
the government we pay for.
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: 2.6.22-rc2 built on ppc (1)
2007-06-09 14:14 ` Pavel Machek
2007-06-09 17:06 ` Elimar Riesebieter
@ 2007-06-11 8:26 ` Johannes Berg
1 sibling, 0 replies; 7+ messages in thread
From: Johannes Berg @ 2007-06-11 8:26 UTC (permalink / raw)
To: Pavel Machek; +Cc: linux-pm, Elimar Riesebieter
[-- Attachment #1.1: Type: text/plain, Size: 329 bytes --]
On Sat, 2007-06-09 at 16:14 +0200, Pavel Machek wrote:
> Elimar, can you modify the code to
>
> do_div(elapsed_centisecs64, (s64) NSEC_PER_SEC / 100);
That wouldn't help since the u64 is hardcoded. Changing
elapsed_centisecs64 to s64 should help but doesn't seem right either.
The warning is just bogus.
johannes
[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 190 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: 2.6.22-rc2 built on ppc (1)
2007-05-20 11:06 2.6.22-rc2 built on ppc (1) Elimar Riesebieter
2007-05-20 11:36 ` Rafael J. Wysocki
@ 2007-06-09 13:55 ` Pavel Machek
1 sibling, 0 replies; 7+ messages in thread
From: Pavel Machek @ 2007-06-09 13:55 UTC (permalink / raw)
To: Elimar Riesebieter; +Cc: linux-pm
Hi!
> FYI, building 2.6.22-rc2 with
> gcc (GCC) 4.1.3 20070514 (prerelease) (Debian 4.1.2-7)
> on my powerbook (PPC) gives:
>
> ...
> kernel/power/swsusp.c: In function 'swsusp_show_speed':
> kernel/power/swsusp.c:193: warning: comparison of distinct pointer types lacks a cast
> ...
>
>
> If more info is needed, please contact me via PM, as I am not
> subscribed.
void swsusp_show_speed(struct timeval *start, struct timeval *stop,
unsigned nr_pages, char *msg)
{
s64 elapsed_centisecs64;
int centisecs;
int k;
int kps;
elapsed_centisecs64 = timeval_to_ns(stop) - timeval_to_ns(start);
do_div(elapsed_centisecs64, NSEC_PER_SEC / 100);
centisecs = elapsed_centisecs64;
if (centisecs == 0)
centisecs = 1; /* avoid div-by-zero */
Hmm, which line triggers that? do_div? Can you add some casts to work
around this?
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2007-06-11 8:26 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-20 11:06 2.6.22-rc2 built on ppc (1) Elimar Riesebieter
2007-05-20 11:36 ` Rafael J. Wysocki
2007-05-20 11:43 ` Johannes Berg
2007-06-09 14:14 ` Pavel Machek
2007-06-09 17:06 ` Elimar Riesebieter
2007-06-11 8:26 ` Johannes Berg
2007-06-09 13:55 ` Pavel Machek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox