KERNEL_VERSION #ifs
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
_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors
Quoted 4 lines · Eric Sesterhenn / snakebyte
#if
LINUX_VERSION_CODE>=KERNEL_VERSION(2,2,0)in
arch/cris/arch-v32/kernel/fasttimer.cshould 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.
_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors
hi,
Quoted 3 lines
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
arch/cris/arch-v32/kernel/fasttimer.c renamed from arch/cris/arch-v32/kernel/fasttimer.c.orig +2 -28
@@ -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 *bufmemcpy (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 ))
_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors
Quoted 9 lines · Matthew Wilcox
Quoted 4 lines · Eric Sesterhenn / snakebyte
#if
LINUX_VERSION_CODE>=KERNEL_VERSION(2,2,0)in
arch/cris/arch-v32/kernel/fasttimer.cshould 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
Signature · 4 lines
"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_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors