mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: linux-kernel@vger.kernel.org, sensors@stimpy.netroedge.com
Subject: Re: [PATCH] More i2c driver fixes for 2.6.0-test7
Date: Wed, 15 Oct 2003 11:05:47 -0700	[thread overview]
Message-ID: <10662411472283@kroah.com> (raw)
In-Reply-To: <10662411473410@kroah.com>

ChangeSet 1.1347.1.2, 2003/10/13 12:31:27-07:00, kronos@kronoz.cjb.net

[PATCH] I2C: sensors/w83781d.c creates useless sysfs entries

Jindrich Makovicka <makovick@kmlinux.fjfi.cvut.cz> ha scritto:
> 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.

IMHO it's better to fix the macro:


 drivers/i2c/chips/w83781d.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletion(-)


diff -Nru a/drivers/i2c/chips/w83781d.c b/drivers/i2c/chips/w83781d.c
--- a/drivers/i2c/chips/w83781d.c	Wed Oct 15 10:57:59 2003
+++ b/drivers/i2c/chips/w83781d.c	Wed Oct 15 10:57:59 2003
@@ -422,9 +422,11 @@
 sysfs_in_offsets(8);
 
 #define device_create_file_in(client, offset) \
+do { \
 device_create_file(&client->dev, &dev_attr_in_input##offset); \
 device_create_file(&client->dev, &dev_attr_in_min##offset); \
-device_create_file(&client->dev, &dev_attr_in_max##offset);
+device_create_file(&client->dev, &dev_attr_in_max##offset); \
+} while (0);
 
 #define show_fan_reg(reg) \
 static ssize_t show_##reg (struct device *dev, char *buf, int nr) \


  reply	other threads:[~2003-10-15 18:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-15 18:04 [BK PATCH] " Greg KH
2003-10-15 18:05 ` [PATCH] " Greg KH
2003-10-15 18:05   ` Greg KH [this message]
2003-10-15 18:05     ` Greg KH
2003-10-15 19:14       ` Sam Ravnborg
2003-10-15 19:13     ` Sam Ravnborg

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=10662411472283@kroah.com \
    --to=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sensors@stimpy.netroedge.com \
    /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

all inboxes | Powered by JetHome®