All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Petr Vandrovec" <VANDROVE@vc.cvut.cz>
To: kernel-janitors@vger.kernel.org
Subject: [Kernel-janitors] Re: [PATCH] radio/radio-sf16fmi: replace
Date: Tue, 27 Jul 2004 11:38:05 +0000	[thread overview]
Message-ID: <D4E77F3350F@vcnet.vc.cvut.cz> (raw)
In-Reply-To: <41058881.1080406@zabbo.net>

[-- Attachment #1: Type: text/plain, Size: 1781 bytes --]

On 26 Jul 04 at 15:41, Nishanth Aravamudan wrote:
> I would appreciate any comments from the janitors list.
> 
> Description: Replaced schedule_timeout() with msleep() 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
                                            
 
> Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
> 
> 
> --- linux-vanilla/drivers/media/radio/radio-sf16fmi.c   2004-06-16 05:20:03.000000000 +0000
> +++ linux-dev/drivers/media/radio/radio-sf16fmi.c   2004-07-02 20:46:57.000000000 +0000
> @@ -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;
> @@ -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);


[-- Attachment #2: Type: text/plain, Size: 167 bytes --]

_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors

  parent reply	other threads:[~2004-07-27 11:38 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-26 22:41 [Kernel-janitors] Re: [PATCH] radio/radio-maestro: replace Zach Brown
2004-07-26 22:57 ` Nishanth Aravamudan
2004-07-26 23:01 ` Zach Brown
2004-07-27 11:38 ` Petr Vandrovec [this message]
2004-07-27 12:21 ` [Kernel-janitors] Re: [PATCH] radio/radio-sf16fmi: replace Christoph Hellwig
2004-07-27 14:13 ` [Kernel-janitors] Re: [PATCH] radio/radio-sf16fmi: repl Petr Vandrovec

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=D4E77F3350F@vcnet.vc.cvut.cz \
    --to=vandrove@vc.cvut.cz \
    --cc=kernel-janitors@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.