From: Kronos <kronos@kronoz.cjb.net>
To: linux-kernel@vger.kernel.org
Cc: frodol@dds.nl, Jindrich Makovicka <makovick@kmlinux.fjfi.cvut.cz>
Subject: Re: [patch] sensors/w83781d.c creates useless sysfs entries
Date: Sat, 11 Oct 2003 18:32:44 +0200 [thread overview]
Message-ID: <20031011163244.GA2570@dreamland.darkstar.lan> (raw)
In-Reply-To: <3F8805A7.6080306@kmlinux.fjfi.cvut.cz>
Jindrich Makovicka <makovick@kmlinux.fjfi.cvut.cz> ha scritto:
> 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.
IMHO it's better to fix the macro:
--- a/drivers/i2c/chips/w83781d.c Sun Sep 28 17:47:38 2003
+++ b/drivers/i2c/chips/w83781d.c Sat Oct 11 18:31:04 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) \
Luca
--
Reply-To: kronos@kronoz.cjb.net
Home: http://kronoz.cjb.net
Windows NT: Designed for the Internet. The Internet: Designed for Unix.
next prev parent reply other threads:[~2003-10-11 16:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-10-11 13:29 [patch] sensors/w83781d.c creates useless sysfs entries Jindrich Makovicka
2003-10-11 16:32 ` Kronos [this message]
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=20031011163244.GA2570@dreamland.darkstar.lan \
--to=kronos@kronoz.cjb.net \
--cc=frodol@dds.nl \
--cc=linux-kernel@vger.kernel.org \
--cc=makovick@kmlinux.fjfi.cvut.cz \
/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