* [KJ] KERNEL_VERSION #ifs
@ 2005-12-18 22:00 Eric Sesterhenn / snakebyte
2005-12-18 22:16 ` Matthew Wilcox
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Eric Sesterhenn / snakebyte @ 2005-12-18 22:00 UTC (permalink / raw)
To: kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 383 bytes --]
hi,
the kerneljanitor TODO states the following:
"- Code that depends on LINUX_VERSION_CODE & KERNEL_VERSION < 2.6 can be
deleted in most cases. (Mostly/all? done)"
does this mean that an if like this
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,2,0)
in arch/cris/arch-v32/kernel/fasttimer.c should also be
removed (Of course just the if, not the code inside it)
Thanks, Eric
[-- Attachment #2: Type: text/plain, Size: 168 bytes --]
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [KJ] KERNEL_VERSION #ifs
2005-12-18 22:00 [KJ] KERNEL_VERSION #ifs Eric Sesterhenn / snakebyte
@ 2005-12-18 22:16 ` Matthew Wilcox
2005-12-18 22:41 ` Eric Sesterhenn / snakebyte
2005-12-18 23:18 ` Adrian Bunk
2 siblings, 0 replies; 4+ messages in thread
From: Matthew Wilcox @ 2005-12-18 22:16 UTC (permalink / raw)
To: kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 404 bytes --]
On Sun, Dec 18, 2005 at 11:00:08PM +0100, Eric Sesterhenn / snakebyte wrote:
> #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,2,0)
>
> in arch/cris/arch-v32/kernel/fasttimer.c should also be
> removed (Of course just the if, not the code inside it)
Yes, but beware that the architecture hasn't been updated in any
meaningful way since July 27th. I think cris is pretty much a
patch-and-run architecture.
[-- Attachment #2: Type: text/plain, Size: 168 bytes --]
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [KJ] KERNEL_VERSION #ifs
2005-12-18 22:00 [KJ] KERNEL_VERSION #ifs Eric Sesterhenn / snakebyte
2005-12-18 22:16 ` Matthew Wilcox
@ 2005-12-18 22:41 ` Eric Sesterhenn / snakebyte
2005-12-18 23:18 ` Adrian Bunk
2 siblings, 0 replies; 4+ messages in thread
From: Eric Sesterhenn / snakebyte @ 2005-12-18 22:41 UTC (permalink / raw)
To: kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 2433 bytes --]
hi,
> Yes, but beware that the architecture hasn't been updated in any
> meaningful way since July 27th. I think cris is pretty much a
> patch-and-run architecture.
here is the patch to remove the #ifs
Signed-of-by: Eric Sesterhenn <snakebyte@gmx.de>
--- linux-2.6.15-rc5-git5/arch/cris/arch-v32/kernel/fasttimer.c.orig 2005-12-18 23:36:19.000000000 +0100
+++ linux-2.6.15-rc5-git5/arch/cris/arch-v32/kernel/fasttimer.c 2005-12-18 23:38:37.000000000 +0100
@@ -604,23 +604,8 @@ void schedule_usleep(unsigned long us)
#ifdef CONFIG_PROC_FS
static int proc_fasttimer_read(char *buf, char **start, off_t offset, int len
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,2,0)
- ,int *eof, void *data_unused
-#else
- ,int unused
-#endif
- );
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,2,0)
+ ,int *eof, void *data_unused);
static struct proc_dir_entry *fasttimer_proc_entry;
-#else
-static struct proc_dir_entry fasttimer_proc_entry =
-{
- 0, 9, "fasttimer",
- S_IFREG | S_IRUGO, 1, 0, 0,
- 0, NULL /* ops -- default to array */,
- &proc_fasttimer_read /* get_info */,
-};
-#endif
#endif /* CONFIG_PROC_FS */
#ifdef CONFIG_PROC_FS
@@ -629,12 +614,7 @@ static struct proc_dir_entry fasttimer_p
#define BIG_BUF_SIZE (500 + NUM_TIMER_STATS * 300)
static int proc_fasttimer_read(char *buf, char **start, off_t offset, int len
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,2,0)
- ,int *eof, void *data_unused
-#else
- ,int unused
-#endif
- )
+ ,int *eof, void *data_unused)
{
unsigned long flags;
int i = 0;
@@ -809,9 +789,7 @@ static int proc_fasttimer_read(char *buf
memcpy(buf, bigbuf + offset, len);
*start = buf;
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,2,0)
*eof = 1;
-#endif
return len;
}
@@ -975,12 +953,8 @@ void fast_timer_init(void)
printk("fast_timer_init()\n");
#ifdef CONFIG_PROC_FS
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,2,0)
if ((fasttimer_proc_entry = create_proc_entry( "fasttimer", 0, 0 )))
fasttimer_proc_entry->read_proc = proc_fasttimer_read;
-#else
- proc_register_dynamic(&proc_root, &fasttimer_proc_entry);
-#endif
#endif /* PROC_FS */
if(request_irq(TIMER_INTR_VECT, timer_trig_interrupt, SA_INTERRUPT,
"fast timer int", NULL))
[-- Attachment #2: Type: text/plain, Size: 168 bytes --]
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [KJ] KERNEL_VERSION #ifs
2005-12-18 22:00 [KJ] KERNEL_VERSION #ifs Eric Sesterhenn / snakebyte
2005-12-18 22:16 ` Matthew Wilcox
2005-12-18 22:41 ` Eric Sesterhenn / snakebyte
@ 2005-12-18 23:18 ` Adrian Bunk
2 siblings, 0 replies; 4+ messages in thread
From: Adrian Bunk @ 2005-12-18 23:18 UTC (permalink / raw)
To: kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 866 bytes --]
On Sun, Dec 18, 2005 at 03:16:29PM -0700, Matthew Wilcox wrote:
> On Sun, Dec 18, 2005 at 11:00:08PM +0100, Eric Sesterhenn / snakebyte wrote:
> > #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,2,0)
> >
> > in arch/cris/arch-v32/kernel/fasttimer.c should also be
> > removed (Of course just the if, not the code inside it)
>
> Yes, but beware that the architecture hasn't been updated in any
> meaningful way since July 27th. I think cris is pretty much a
> patch-and-run architecture.
The cris maintainers respond to emails, and they should at least get
copies of patches touching their architecture code.
cu
Adrian
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
[-- Attachment #2: Type: text/plain, Size: 168 bytes --]
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2005-12-18 23:18 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-12-18 22:00 [KJ] KERNEL_VERSION #ifs Eric Sesterhenn / snakebyte
2005-12-18 22:16 ` Matthew Wilcox
2005-12-18 22:41 ` Eric Sesterhenn / snakebyte
2005-12-18 23:18 ` Adrian Bunk
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.