public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jindrich Makovicka <makovick@kmlinux.fjfi.cvut.cz>
To: linux-kernel@vger.kernel.org
Subject: [patch] sensors/w83781d.c creates useless sysfs entries
Date: Sat, 11 Oct 2003 15:29:11 +0200	[thread overview]
Message-ID: <3F8805A7.6080306@kmlinux.fjfi.cvut.cz> (raw)

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

Hello,

here is a trivial fix for Winbond sensor driver, which currently creates 
useless entries in sys/bus/i2c due to missing braces after if statements 
- author probably forgot about the macro expansion.

Regards,
-- 
Jindrich Makovicka

[-- Attachment #2: w83781d.c.patch --]
[-- Type: text/plain, Size: 1333 bytes --]

--- w83781d.c.orig	2003-10-02 08:17:20.000000000 +0200
+++ w83781d.c	2003-10-11 14:45:59.000000000 +0200
@@ -1347,8 +1347,10 @@
 	}
 
 	device_create_file_in(new_client, 0);
-	if (kind != w83783s && kind != w83697hf)
+	if (kind != w83783s && kind != w83697hf) {
 		device_create_file_in(new_client, 1);
+	}
+	
 	device_create_file_in(new_client, 2);
 	device_create_file_in(new_client, 3);
 	device_create_file_in(new_client, 4);
@@ -1361,25 +1363,30 @@
 
 	device_create_file_fan(new_client, 1);
 	device_create_file_fan(new_client, 2);
-	if (kind != w83697hf)
+	if (kind != w83697hf) {
 		device_create_file_fan(new_client, 3);
+	}
 
 	device_create_file_temp(new_client, 1);
 	device_create_file_temp(new_client, 2);
-	if (kind != w83783s && kind != w83697hf)
+	if (kind != w83783s && kind != w83697hf) {
 		device_create_file_temp(new_client, 3);
-
-	if (kind != w83697hf)
+	}
+	
+	if (kind != w83697hf) {
 		device_create_file_vid(new_client);
-
-	if (kind != w83697hf)
+	}
+	
+	if (kind != w83697hf) {
 		device_create_file_vrm(new_client);
-
+	}
+	
 	device_create_file_fan_div(new_client, 1);
 	device_create_file_fan_div(new_client, 2);
-	if (kind != w83697hf)
+	if (kind != w83697hf) {
 		device_create_file_fan_div(new_client, 3);
-
+	}
+	
 	device_create_file_alarms(new_client);
 
 	device_create_file_beep(new_client);

             reply	other threads:[~2003-10-11 13:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-11 13:29 Jindrich Makovicka [this message]
2003-10-11 16:32 ` [patch] sensors/w83781d.c creates useless sysfs entries Kronos
2003-10-13 19:31   ` Greg KH

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=3F8805A7.6080306@kmlinux.fjfi.cvut.cz \
    --to=makovick@kmlinux.fjfi.cvut.cz \
    --cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox