From: ymu@Winbond.com.tw (Yuan Mu)
To: lm-sensors@vger.kernel.org
Subject: [lm-sensors] [PATCH] Fix the set pwm value will change fan mode
Date: Tue, 30 May 2006 07:34:15 +0000 [thread overview]
Message-ID: <447BF577.3020001@winbond.com.tw> (raw)
In-Reply-To: <444610F0.1070809@winbond.com.tw>
Hi Jean,
[snipped]
>> + data->pwm[nr] = (data->pwm[nr] & 0x7f) | 0x80;
>
> Equivalent to:
> data->pwm[nr] |= 0x80;
>
Oh, thank you , i will beat my head :(
>> + } else {
>> + return -EINVAL;
>
> You return with the update lock held! It's easier to test the input
> value for validity before taking the lock, this avoids that kind of
> trap and is also more efficient.
>
Beat my head once more ;)
And do we need to add lock in other store functions in w83792d ?
Best Regards
Yuan Mu
=============================================The privileged confidential information contained in this email is intended for use only by the addressees as indicated by the original sender of this email. If you are not the addressee indicated in this email or are not responsible for delivery of the email to such a person, please kindly reply to the sender indicating this fact and delete all copies of it from your computer and network server immediately. Your cooperation is highly appreciated. It is advised that any unauthorized use of confidential information of Winbond is strictly prohibited; and any information in this email irrelevant to the official business of Winbond shall be deemed as neither given nor endorsed by Winbond.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ymu.vcf
Type: text/x-vcard
Size: 56 bytes
Desc: not available
Url : http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20060530/a715b008/ymu-0001.vcf
next prev parent reply other threads:[~2006-05-30 7:34 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-19 10:29 [lm-sensors] [PATCH] Fix the set pwm value will change fan mode bug Yuan Mu
2006-05-27 19:28 ` [lm-sensors] [PATCH] Fix the set pwm value will change fan mode Rudolf Marek
2006-05-28 15:03 ` Jean Delvare
2006-05-28 15:55 ` Rudolf Marek
2006-05-30 2:12 ` Yuan Mu
2006-05-30 7:25 ` Jean Delvare
2006-05-30 7:34 ` Yuan Mu [this message]
2006-05-30 12:34 ` Jean Delvare
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=447BF577.3020001@winbond.com.tw \
--to=ymu@winbond.com.tw \
--cc=lm-sensors@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.