All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: Assorted warnings while building 2.5.73
@ 2003-06-25 21:25 Petr Vandrovec
  2003-06-25 22:13 ` Bob Miller
  0 siblings, 1 reply; 3+ messages in thread
From: Petr Vandrovec @ 2003-06-25 21:25 UTC (permalink / raw)
  To: J.C. Wren; +Cc: linux-kernel

On 25 Jun 03 at 16:25, J.C. Wren wrote:
> drivers/video/matrox/matroxfb_g450.c: In function `g450_compute_bwlevel':
> drivers/video/matrox/matroxfb_g450.c:129: warning: duplicate `const'
> drivers/video/matrox/matroxfb_g450.c:130: warning: duplicate `const'

Fix min/max macros and/or learn gcc that "const typeof(x)" where x
is already const type is OK. Or I can code it with simple if(), but
why we have min/max macros then?

Is there some __attribute__((-Wno-duplicate-const)) ?
                                         Petr Vandrovec
                                         vandrove@vc.cvut.cz
                                         


^ permalink raw reply	[flat|nested] 3+ messages in thread
* Re: [patch] input: Fix CLOCK_TICK_RATE usage ...  [8/13]
@ 2003-06-17 23:31 Vojtech Pavlik
  2003-06-25 17:20 ` David Mosberger
  0 siblings, 1 reply; 3+ messages in thread
From: Vojtech Pavlik @ 2003-06-17 23:31 UTC (permalink / raw)
  To: davidm; +Cc: Vojtech Pavlik, Riley Williams, linux-kernel

On Tue, Jun 17, 2003 at 04:24:04PM -0700, David Mosberger wrote:
> >>>>> On Wed, 18 Jun 2003 01:14:11 +0200, Vojtech Pavlik <vojtech@suse.cz> said:
> 
>   >>  Sounds much better to me.  Wouldn't something along the lines of
>   >> this make the most sense:
> 
>   >> #ifdef __ARCH_PIT_FREQ # define PIT_FREQ __ARCH_PIT_FREQ #else #
>   >> define PIT_FREQ 1193182 #endif
> 
>   >> After all, it seems like the vast majority of legacy-compatible
>   >> hardware _do_ use the standard frequency.
> 
>   Vojtech> Now, if this was in some nice include file, along with the
>   Vojtech> definition of the i8253 PIT spinlock, that'd be
>   Vojtech> great. Because not just the beeper driver uses the PIT,
>   Vojtech> also some joystick code uses it if it is available.
> 
> ftape, too.  The LATCH() macro should also be moved to such a header
> file, I think.  How about just creating asm/pit.h?  Only platforms
> that need to (potentially) support legacy hardware would need to
> define it.  E.g., on ia64, we could do:
> 
>  #ifndef _ASM_IA64_PIT_H
>  #define _ASM_IA64_PIT_H
> 
>  #include <linux/config.h>
> 
>  #ifdef CONFIG_LEGACY_HW
>  # define PIT_FREQ	1193182
>  # define LATCH		((CLOCK_TICK_RATE + HZ/2) / HZ)
>  #endif
> 
>  #endif /* _ASM_IA64_PIT_H */
> 
> This way, machines that support legacy hardware can define
> CONFIG_LEGACY_HW and on others, the macro can be left undefined, so
> that any attempt to compile drivers requiring legacy hw would fail to
> compile upfront (much better than accessing random ports!).

Yes, that looks very good indeed. Riley?

-- 
Vojtech Pavlik
SuSE Labs, SuSE CR

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

end of thread, other threads:[~2003-06-25 21:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-06-25 21:25 Assorted warnings while building 2.5.73 Petr Vandrovec
2003-06-25 22:13 ` Bob Miller
  -- strict thread matches above, loose matches on Subject: below --
2003-06-17 23:31 [patch] input: Fix CLOCK_TICK_RATE usage ... [8/13] Vojtech Pavlik
2003-06-25 17:20 ` David Mosberger
2003-06-25 19:58   ` Vojtech Pavlik
2003-06-25 20:25     ` Assorted warnings while building 2.5.73 J.C. Wren

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.