radio/radio-maestro: replace
Quoted 2 lines
I would appreciate any comments from the janitors list.
sure looks ok to me.
Review
Quoted 9 lines
(quoted diff) +0
-9-static void udelay2(void) -{ - udelay(2); -} - -static void udelay4(void) -{ - udelay(4); -}
wow.
- z
_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors
Quoted 5 lines · Zach Brown
Quoted 2 lines
I would appreciate any comments from the janitors list.
sure looks ok to me.
Quoted 11 lines
Review
Quoted 9 lines
(quoted diff) +0
-9-static void udelay2(void) -{ - udelay(2); -} - -static void udelay4(void) -{ - udelay(4); -}wow.
Yeah. Just to make sure, the change from TASK_INTERRUPTIBLE in sleep125ms() to TASK_UNINTERRUPTIBLE in msleep() is ok?
-Nish
_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors
Quoted 3 lines
Yeah. Just to make sure, the change from
TASK_INTERRUPTIBLEinsleep125ms()toTASK_UNINTERRUPTIBLEinmsleep()is ok?
I suspect so, but I don't know for sure. I wasn't really involved in the radio bits.
_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors
[Kernel-janitors] Re: [PATCH] radio/radio-sf16fmi: replace
In reply to Zach BrownQuoted 4 lines · Nishanth Aravamudan
I would appreciate any comments from the janitors list.
Description: Replaced
schedule_timeout()withmsleep()to guarantee the task delays the desired time.
I do not agree. Delay is here just to make sure that we do not talk to chip too quickly after sending previous command (it is important especially for get signal strength; I think that it is not needed at all in set frequency), and as such it does not matter whether we wait 100ms, 143ms, or one second. I find busy loop with mdelay unacceptable.
If your architecture has HZ less than 7, then just replace HZ/7 with HZ/7 + 1...
Best regards,
Petr Vandrovec
Quoted 16 lines
Signed-off-by Nishanth Aravamudan <[email protected]>drivers/media/radio/radio-sf16fmi.c 2004-07-02 20:46:57.000000000 +0000 renamed from drivers/media/radio/radio-sf16fmi.c 2004-06-16 05:20:03.000000000 +0000 +1
-2@@ -89,8 +89,7 @@ static inline int fmi_setfreq(struct fmi outbits(16, RSF16_ENCODE(freq), myport); outbits(8, 0xC0, myport); - current->state = TASK_UNINTERRUPTIBLE; - schedule_timeout(HZ/7); + msleep(143); /* was schedule_timeout(HZ/7) */ up(&lock); if (dev->curvol) fmi_unmute(myport); return 0;
drivers/media/radio/radio-sf16fmi.c 2004-07-02 20:46:57.000000000 +0000 static inline int fmi_getsigstr(struct f · line 111
Quoted 8 lines
drivers/media/radio/radio-sf16fmi.c 2004-07-02 20:46:57.000000000 +0000 renamed from drivers/media/radio/radio-sf16fmi.c 2004-06-16 05:20:03.000000000 +0000 +1
-2@@ -107,8 +106,7 @@ static inline int fmi_getsigstr(struct f val = dev->curvol ? 0x08 : 0x00; /* unmute/mute */ outb(val, myport); outb(val | 0x10, myport); - set_current_state(TASK_UNINTERRUPTIBLE); - schedule_timeout(HZ/7); + msleep(143); /* was schedule_timeout(HZ/7) */ res = (int)inb(myport+1); outb(val, myport);
_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors
Re: [Kernel-janitors] Re: [PATCH] radio/radio-sf16fmi: replace
In reply to Zach BrownQuoted 6 lines · Petr Vandrovec
I do not agree. Delay is here just to make sure that we do not talk to chip too quickly after sending previous command (it is important especially for get signal strength; I think that it is not needed at all in set frequency), and as such it does not matter whether we wait 100ms, 143ms, or one second. I find busy loop with mdelay unacceptable.
This is msleep, not mdelay, and _not_ a busywait.
_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors
Re: [Kernel-janitors] Re: [PATCH] radio/radio-sf16fmi: repl
In reply to Zach BrownQuoted 9 lines · Christoph Hellwig
Quoted 6 lines · Petr Vandrovec
I do not agree. Delay is here just to make sure that we do not talk to chip too quickly after sending previous command (it is important especially for get signal strength; I think that it is not needed at all in set frequency), and as such it does not matter whether we wait 100ms, 143ms, or one second. I find busy loop with mdelay unacceptable.
This is msleep, not mdelay, and _not_ a busywait.
Oops. Sorry for confusion then.
Petr Vandrovec
_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors