Re: [lm-sensors] hwmon/f75375s.c: buggy if()

2007-10-28 Thread Mark M. Hoffman
Hi: * Riku Voipio <[EMAIL PROTECTED]> [2007-10-26 14:14:23 +0300]: > On Fri, Oct 26, 2007 at 10:36:47AM +0200, Jean Delvare wrote: > > Patch looks correct, however it doesn't apply on top of Mark's tree. I > > was able to get it to apply by reverting "(f75375s) fix pwm mode > > setting" first, but

Re: [lm-sensors] hwmon/f75375s.c: buggy if()

2007-10-26 Thread Jean Delvare
On Fri, 26 Oct 2007 14:14:23 +0300, Riku Voipio wrote: > On Fri, Oct 26, 2007 at 10:36:47AM +0200, Jean Delvare wrote: > > Patch looks correct, however it doesn't apply on top of Mark's tree. I > > was able to get it to apply by reverting "(f75375s) fix pwm mode > > setting" first, but then the bui

Re: [lm-sensors] hwmon/f75375s.c: buggy if()

2007-10-26 Thread Riku Voipio
On Fri, Oct 26, 2007 at 10:36:47AM +0200, Jean Delvare wrote: > Patch looks correct, however it doesn't apply on top of Mark's tree. I > was able to get it to apply by reverting "(f75375s) fix pwm mode > setting" first, but then the build fails. Presumably the other f75375s > patches interact badly

Re: [lm-sensors] hwmon/f75375s.c: buggy if()

2007-10-26 Thread Jean Delvare
Hi Riku, On Thu, 25 Oct 2007 14:48:14 +0300, Riku Voipio wrote: > On Wed, Oct 24, 2007 at 10:25:29PM -0400, Mark M. Hoffman wrote: > > * Riku Voipio <[EMAIL PROTECTED]> [2007-10-24 14:50:34 +0300]: > > > On Fri, Oct 19, 2007 at 02:37:54PM +0200, Jean Delvare wrote: > > > > Riku, can you please sub

Re: [lm-sensors] hwmon/f75375s.c: buggy if()

2007-10-25 Thread Riku Voipio
ve backups >From 90a98836377541819012dfea8bd1bf748cd39723 Mon Sep 17 00:00:00 2001 From: Riku Voipio <[EMAIL PROTECTED]> Date: Mon, 22 Oct 2007 17:42:35 +0300 Subject: [PATCH] Fix hwmon/f75375s.c: buggy if() Fix value check in set_pwm_mode(). Instead of checking for chip variant there,

Re: [lm-sensors] hwmon/f75375s.c: buggy if()

2007-10-25 Thread Jean Delvare
Hi Riku, On Wed, 24 Oct 2007 14:50:34 +0300, Riku Voipio wrote: > On Fri, Oct 19, 2007 at 02:37:54PM +0200, Jean Delvare wrote: > > Take a look at the w83781d > > driver for an example. > > Btw, I think your example code has a indentation bug: > > if (kind != w83781d) >

Re: [lm-sensors] hwmon/f75375s.c: buggy if()

2007-10-24 Thread Mark M. Hoffman
Hi Riku: * Riku Voipio <[EMAIL PROTECTED]> [2007-10-24 14:50:34 +0300]: > On Fri, Oct 19, 2007 at 02:37:54PM +0200, Jean Delvare wrote: > > Riku, can you please submit a patch fixing this? The attribute should > > be declared read-only, and then you can use sysfs_chmod_file() to > > change it to r

Re: [lm-sensors] hwmon/f75375s.c: buggy if()

2007-10-24 Thread Riku Voipio
On Fri, Oct 19, 2007 at 02:37:54PM +0200, Jean Delvare wrote: > Riku, can you please submit a patch fixing this? The attribute should > be declared read-only, and then you can use sysfs_chmod_file() to > change it to read-write where supported. Thanks, this was good suggestion. Patch attached. >

Re: [lm-sensors] hwmon/f75375s.c: buggy if()

2007-10-19 Thread Jean Delvare
Hi Mark, hi Riku, On Thu, 18 Oct 2007 09:37:44 -0400, Mark M. Hoffman wrote: > That patch doesn't apply here, so I applied this: > > commit 805763cd743f2aed41dc61a55569fa43cf1f240c > Author: Riku Voipio <[EMAIL PROTECTED]> > Date: Thu Oct 18 09:29:53 2007 -0400 > > hwmon: (f75375s) fix pwm

Re: hwmon/f75375s.c: buggy if()

2007-10-18 Thread Mark M. Hoffman
Hi: * Riku Voipio <[EMAIL PROTECTED]> [2007-10-17 23:45:08 +0300]: > > <-- snip --> > > > > ... > > static ssize_t set_pwm_mode(struct device *dev, struct device_attribute > > *attr, > > const char *buf, size_t count) > > { > > ... > > if (val != 0 || val != 1 || data->

Re: hwmon/f75375s.c: buggy if()

2007-10-17 Thread Riku Voipio
> <-- snip --> > > ... > static ssize_t set_pwm_mode(struct device *dev, struct device_attribute *attr, > const char *buf, size_t count) > { > ... > if (val != 0 || val != 1 || data->kind == f75373) > return -EINVAL; > ... > > <-- snip --> > I'm not su

hwmon/f75375s.c: buggy if()

2007-10-17 Thread Adrian Bunk
drivers/hwmon/f75375s.c contains the following code: <-- snip --> ... static ssize_t set_pwm_mode(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { ... if (val != 0 || val != 1 || data->kind == f75373) return -EINVAL; ...