diff mbox series

[11/11] hwmon: (max6650) Fix minor formatting issues

Message ID 1556026391-15360-11-git-send-email-linux@roeck-us.net (mailing list archive)
State Changes Requested
Headers show
Series [01/11] hwmon: (max6650) Use devm_add_action to unregister thermal device | expand

Commit Message

Guenter Roeck April 23, 2019, 1:33 p.m. UTC
CHECK: struct mutex definition without comment
CHECK: Alignment should match open parenthesis

Cc: Jean-Francois Dagenais <jeff.dagenais@gmail.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
---
 drivers/hwmon/max6650.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

Comments

Jean-François Dagenais April 23, 2019, 2:38 p.m. UTC | #1
Wow, you sure had fun over the weekend! ;)

max6650 looked like it needed some love, nice work.

I am keen to try it out. We are in the integration stage of our board so it's a
good time to adopt such changes. The value of our testing would be limited
though, since we don't use the tach line at all.

I am not properly setup in my workflow to easily work with patches in emails. I
could manage, but it might be easier for me if you had this work in a branch on
github/gitlab somewhere... Any chance?

(BTW, are you guys fussed over 80 columns emails here?)

Thanks
Guenter Roeck April 23, 2019, 3:18 p.m. UTC | #2
On Tue, Apr 23, 2019 at 10:38:58AM -0400, Jean-Francois Dagenais wrote:
> Wow, you sure had fun over the weekend! ;)
> 
> max6650 looked like it needed some love, nice work.
> 
> I am keen to try it out. We are in the integration stage of our board so it's a
> good time to adopt such changes. The value of our testing would be limited
> though, since we don't use the tach line at all.
> 
> I am not properly setup in my workflow to easily work with patches in emails. I
> could manage, but it might be easier for me if you had this work in a branch on
> github/gitlab somewhere... Any chance?
> 
I pushed the series to
git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git,
branch hwmon-playground. Let me know if it works for you.

Just in case you are interested, I tested the changes with
github.com:groeck/module-tests.git. The test script is in
scripts/max6650.sh.

> (BTW, are you guys fussed over 80 columns emails here?)
> 

Yes ... I usually don't say anything unless it gets too annoying, though.

Guenter
diff mbox series

Patch

diff --git a/drivers/hwmon/max6650.c b/drivers/hwmon/max6650.c
index 83824e0c9a8e..635ef662f600 100644
--- a/drivers/hwmon/max6650.c
+++ b/drivers/hwmon/max6650.c
@@ -101,7 +101,7 @@  module_param(clock, int, 0444);
 struct max6650_data {
 	struct i2c_client *client;
 	struct thermal_cooling_device *cooling_dev;
-	struct mutex update_lock;
+	struct mutex update_lock; /* protect alarm register updates */
 	int nr_fans;
 	bool valid; /* false until following fields are valid */
 	unsigned long last_updated; /* in jiffies */
@@ -319,7 +319,7 @@  static SENSOR_DEVICE_ATTR_RO(gpio1_alarm, alarm, MAX6650_ALRM_GPIO1);
 static SENSOR_DEVICE_ATTR_RO(gpio2_alarm, alarm, MAX6650_ALRM_GPIO2);
 
 static umode_t max6650_attrs_visible(struct kobject *kobj, struct attribute *a,
-				    int n)
+				     int n)
 {
 	struct device *dev = container_of(kobj, struct device, kobj);
 	struct max6650_data *data = dev_get_drvdata(dev);
@@ -500,11 +500,10 @@  static int max6650_set_cur_state(struct thermal_cooling_device *cdev,
 
 	data->dac = pwm_to_dac(state, data->config & MAX6650_CFG_V12);
 	err = i2c_smbus_write_byte_data(client, MAX6650_REG_DAC, data->dac);
-
 	if (!err) {
 		max6650_set_operating_mode(data, state ?
-						   MAX6650_CFG_MODE_OPEN_LOOP :
-						   MAX6650_CFG_MODE_OFF);
+					   MAX6650_CFG_MODE_OPEN_LOOP :
+					   MAX6650_CFG_MODE_OFF);
 		data->cooling_dev_state = state;
 	}