Linux PARISC architecture development
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@SteelEye.com>
To: dmp@davidmpye.dyndns.org
Cc: PARISC list <parisc-linux@lists.parisc-linux.org>
Subject: Re: [parisc-linux] J5000 LED LCD patch (take 2)
Date: Thu, 24 Mar 2005 14:05:14 -0600	[thread overview]
Message-ID: <1111694714.5519.28.camel@mulgrave> (raw)
In-Reply-To: <200503241848.57598.dmp@davidmpye.dyndns.org>

On Thu, 2005-03-24 at 18:48 +0000, David Pye wrote:
> +                       set_current_state(TASK_UNINTERRUPTIBLE);                
> +                       schedule_timeout(wait_jiffies); 

The two uses of this should become msleep().  schedule_timeout() is
deprecated in the kernel now.

> +       /* Requeue ourself to run in 5 jiffies */       
> +       queue_delayed_work(led_wq, &led_task, 5);

This is wrong too.  The value of HZ (the rate at which jiffies tick) has
been tampered with several times over the course of the years.  All
timing related quantites need to be expressed in terms of HZ to ensure
they remain constant.

We actually have a class of machines for whom HZ=100 so you'll be
waiting ten times longer than you expect on these...


> +               if (cancel_delayed_work(&led_task) == 0) 
> +                       flush_workqueue(led_wq);

This should really be done using 

cancel_rearming_delayed_workqueue()

Unfortunately, someone needs to get that symbol exported.

This added strlcpy is redundant:


> +       /* copy display string to buffer for procfs */
> +       strlcpy(lcd_text, str, sizeof(lcd_text));
>  
>         /* copy display string to buffer for procfs */
>         strlcpy(lcd_text, str, sizeof(lcd_text));
> 

James



_______________________________________________
parisc-linux mailing list
parisc-linux@lists.parisc-linux.org
http://lists.parisc-linux.org/mailman/listinfo/parisc-linux

  parent reply	other threads:[~2005-03-24 20:05 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-24 18:48 [parisc-linux] J5000 LED LCD patch (take 2) David Pye
2005-03-24 20:01 ` [parisc-linux] A second LCD patch David Pye
2005-03-24 20:05 ` James Bottomley [this message]
2005-03-24 21:00   ` [parisc-linux] J5000 LED LCD patch (take 2) David Pye
2005-03-25  6:25     ` Grant Grundler
2005-03-25 17:05       ` David Pye
2005-03-25 21:50         ` David Pye
2005-03-26  7:13           ` Grant Grundler
2005-03-26 15:14             ` David Pye
2005-03-26 15:33               ` James Bottomley
     [not found]                 ` <200503261545.05372.dmp@davidmpye.dyndns.org>
2005-03-26 15:51                   ` David Pye
2005-03-27  8:53               ` Grant Grundler
2005-03-27  9:38                 ` David Pye
2005-03-27 17:55                   ` David Pye
2005-03-28  1:51                     ` Grant Grundler
2005-03-28  2:13                   ` Grant Grundler

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=1111694714.5519.28.camel@mulgrave \
    --to=james.bottomley@steeleye.com \
    --cc=dmp@davidmpye.dyndns.org \
    --cc=parisc-linux@lists.parisc-linux.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox