mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] drivers/char/hpet.c: integer constant is too large for "long" type
@ 2007-07-21 11:19 S.Çağlar Onur
  2007-07-23 21:59 ` Andrew Morton
  0 siblings, 1 reply; 4+ messages in thread
From: S.Çağlar Onur @ 2007-07-21 11:19 UTC (permalink / raw)
  To: Venki Pallipadi; +Cc: linux-kernel

Hi;

Following trivial patch silents

drivers/char/hpet.c:76: warning: integer constant is too large for "long" type

warning (with gcc-3.4.6)

Signed-off-by: S.Çağlar Onur <caglar@pardus.org.tr>
 
 drivers/char/hpet.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/char/hpet.c b/drivers/char/hpet.c
index ba0e74a..23fadf5 100644
--- a/drivers/char/hpet.c
+++ b/drivers/char/hpet.c
@@ -73,7 +73,7 @@ static struct clocksource clocksource_hpet = {
         .name           = "hpet",
         .rating         = 250,
         .read           = read_hpet,
-        .mask           = 0xffffffffffffffff,
+        .mask           = 0xffffffffffffffffLL,
         .mult           = 0, /*to be caluclated*/
         .shift          = 10,
         .flags          = CLOCK_SOURCE_IS_CONTINUOUS,

Cheers
-- 
S.Çağlar Onur <caglar@pardus.org.tr>
http://cekirdek.pardus.org.tr/~caglar/

Linux is like living in a teepee. No Windows, no Gates and an Apache in house!

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

* Re: [PATCH] drivers/char/hpet.c: integer constant is too large for "long" type
  2007-07-21 11:19 [PATCH] drivers/char/hpet.c: integer constant is too large for "long" type S.Çağlar Onur
@ 2007-07-23 21:59 ` Andrew Morton
  2007-07-23 22:03   ` Gabriel C
  2007-07-23 22:08   ` Thomas Gleixner
  0 siblings, 2 replies; 4+ messages in thread
From: Andrew Morton @ 2007-07-23 21:59 UTC (permalink / raw)
  To: caglar; +Cc: Venki Pallipadi, linux-kernel, Thomas Gleixner, john stultz

On Sat, 21 Jul 2007 14:19:44 +0300
"S.__a__lar Onur" <caglar@pardus.org.tr> wrote:

> Following trivial patch silents
> 
> drivers/char/hpet.c:76: warning: integer constant is too large for "long" type
> 
> warning (with gcc-3.4.6)
> 
> Signed-off-by: S.__a__lar Onur <caglar@pardus.org.tr>
>  
>  drivers/char/hpet.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/char/hpet.c b/drivers/char/hpet.c
> index ba0e74a..23fadf5 100644
> --- a/drivers/char/hpet.c
> +++ b/drivers/char/hpet.c
> @@ -73,7 +73,7 @@ static struct clocksource clocksource_hpet = {
>          .name           = "hpet",
>          .rating         = 250,
>          .read           = read_hpet,
> -        .mask           = 0xffffffffffffffff,
> +        .mask           = 0xffffffffffffffffLL,
>          .mult           = 0, /*to be caluclated*/
>          .shift          = 10,
>          .flags          = CLOCK_SOURCE_IS_CONTINUOUS,

hm, well, this does assume that cycle_t is implemented as long long (or
unsigned long long, actually).  Which in turn assumes that u64 is
implemented as [unsigned] long long.

Not all architectures use unsigned long long for u64: some use unsigned
long.  They'll probably be OK with this change but I think I'll convert
that into plain old "-1", which just works everywhere.



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

* Re: [PATCH] drivers/char/hpet.c: integer constant is too large for "long" type
  2007-07-23 21:59 ` Andrew Morton
@ 2007-07-23 22:03   ` Gabriel C
  2007-07-23 22:08   ` Thomas Gleixner
  1 sibling, 0 replies; 4+ messages in thread
From: Gabriel C @ 2007-07-23 22:03 UTC (permalink / raw)
  To: Andrew Morton
  Cc: caglar, Venki Pallipadi, linux-kernel, Thomas Gleixner, john stultz

Andrew Morton wrote:
> On Sat, 21 Jul 2007 14:19:44 +0300
> "S.__a__lar Onur" <caglar@pardus.org.tr> wrote:
> 
>> Following trivial patch silents
>>
>> drivers/char/hpet.c:76: warning: integer constant is too large for "long" type
>>
>> warning (with gcc-3.4.6)
>>
>> Signed-off-by: S.__a__lar Onur <caglar@pardus.org.tr>
>>  
>>  drivers/char/hpet.c |    2 +-
>>  1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/drivers/char/hpet.c b/drivers/char/hpet.c
>> index ba0e74a..23fadf5 100644
>> --- a/drivers/char/hpet.c
>> +++ b/drivers/char/hpet.c
>> @@ -73,7 +73,7 @@ static struct clocksource clocksource_hpet = {
>>          .name           = "hpet",
>>          .rating         = 250,
>>          .read           = read_hpet,
>> -        .mask           = 0xffffffffffffffff,
>> +        .mask           = 0xffffffffffffffffLL,
>>          .mult           = 0, /*to be caluclated*/
>>          .shift          = 10,
>>          .flags          = CLOCK_SOURCE_IS_CONTINUOUS,
> 
> hm, well, this does assume that cycle_t is implemented as long long (or
> unsigned long long, actually).  Which in turn assumes that u64 is
> implemented as [unsigned] long long.
> 
> Not all architectures use unsigned long long for u64: some use unsigned
> long.  They'll probably be OK with this change but I think I'll convert
> that into plain old "-1", which just works everywhere.
> 

Bob Picco fixed this already -> http://lkml.org/lkml/2007/7/23/242


Regards,

Gabriel

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

* Re: [PATCH] drivers/char/hpet.c: integer constant is too large for "long" type
  2007-07-23 21:59 ` Andrew Morton
  2007-07-23 22:03   ` Gabriel C
@ 2007-07-23 22:08   ` Thomas Gleixner
  1 sibling, 0 replies; 4+ messages in thread
From: Thomas Gleixner @ 2007-07-23 22:08 UTC (permalink / raw)
  To: Andrew Morton; +Cc: caglar, Venki Pallipadi, linux-kernel, john stultz

On Mon, 2007-07-23 at 14:59 -0700, Andrew Morton wrote:
> On Sat, 21 Jul 2007 14:19:44 +0300
> "S.__a__lar Onur" <caglar@pardus.org.tr> wrote:
> 
> > Following trivial patch silents
> > 
> > drivers/char/hpet.c:76: warning: integer constant is too large for "long" type
> > 
> > warning (with gcc-3.4.6)
> > 
> > Signed-off-by: S.__a__lar Onur <caglar@pardus.org.tr>
> >  
> >  drivers/char/hpet.c |    2 +-
> >  1 files changed, 1 insertions(+), 1 deletions(-)
> > 
> > diff --git a/drivers/char/hpet.c b/drivers/char/hpet.c
> > index ba0e74a..23fadf5 100644
> > --- a/drivers/char/hpet.c
> > +++ b/drivers/char/hpet.c
> > @@ -73,7 +73,7 @@ static struct clocksource clocksource_hpet = {
> >          .name           = "hpet",
> >          .rating         = 250,
> >          .read           = read_hpet,
> > -        .mask           = 0xffffffffffffffff,
> > +        .mask           = 0xffffffffffffffffLL,
> >          .mult           = 0, /*to be caluclated*/
> >          .shift          = 10,
> >          .flags          = CLOCK_SOURCE_IS_CONTINUOUS,
> 
> hm, well, this does assume that cycle_t is implemented as long long (or
> unsigned long long, actually).  Which in turn assumes that u64 is
> implemented as [unsigned] long long.
> 
> Not all architectures use unsigned long long for u64: some use unsigned
> long.  They'll probably be OK with this change but I think I'll convert
> that into plain old "-1", which just works everywhere.

	.mask = CLOCKSOURCE_MASK(64)

should work

	tglx





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

end of thread, other threads:[~2007-07-23 22:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-07-21 11:19 [PATCH] drivers/char/hpet.c: integer constant is too large for "long" type S.Çağlar Onur
2007-07-23 21:59 ` Andrew Morton
2007-07-23 22:03   ` Gabriel C
2007-07-23 22:08   ` Thomas Gleixner

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

Powered by JetHome