From: Joe Perches <joe@perches.com>
To: Javier Martinez Canillas <martinez.javier@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@suse.de>,
Henk de Groot <pe1dnn@amsat.org>,
linux-kernel@vger.kernel.org, devel@driverdev.osuosl.org,
kernel-janitors <kernel-janitors@vger.kernel.org>
Subject: Re: [PATCH] staging/wlags49_hs: Fix build error when CONFIG_SYSFS
Date: Fri, 11 Jun 2010 06:41:42 +0000 [thread overview]
Message-ID: <1276238502.1556.512.camel@Joe-Laptop.home> (raw)
In-Reply-To: <1276238148.22216.30.camel@lenovo>
On Fri, 2010-06-11 at 02:35 -0400, Javier Martinez Canillas wrote:
> With current linux-next I got a build error with wlags49_h2 driver when CONFIG_SYSFS is not set.
> diff --git a/drivers/staging/wlags49_h2/wl_sysfs.h b/drivers/staging/wlags49_h2/wl_sysfs.h
> index 6d96d03..7d5895d 100644
> --- a/drivers/staging/wlags49_h2/wl_sysfs.h
> +++ b/drivers/staging/wlags49_h2/wl_sysfs.h
> @@ -2,6 +2,6 @@
> extern void register_wlags_sysfs(struct net_device *);
> extern void unregister_wlags_sysfs(struct net_device *);
> #else
> -static void register_wlags_sysfs(struct net_device *) { return; };
> -static void unregister_wlags_sysfs(struct net_device *) { return; };
> +#define register_wlags_sysfs(net_device) { }
> +#define unregister_wlags_sysfs(net_device) { }
> #endif
Yes, that works, but a better fix would be to remove the
semicolons after the function close braces.
---
diff --git a/drivers/staging/wlags49_h2/wl_sysfs.h
b/drivers/staging/wlags49_h2/wl_sysfs.h
index 6d96d03..7d5895d 100644
--- a/drivers/staging/wlags49_h2/wl_sysfs.h
+++ b/drivers/staging/wlags49_h2/wl_sysfs.h
@@ -2,6 +2,6 @@
extern void register_wlags_sysfs(struct net_device *);
extern void unregister_wlags_sysfs(struct net_device *);
#else
-static void register_wlags_sysfs(struct net_device *) { return; };
-static void unregister_wlags_sysfs(struct net_device *) { return; };
+static void register_wlags_sysfs(struct net_device *) { return; }
+static void unregister_wlags_sysfs(struct net_device *) { return; }
#endif
next prev parent reply other threads:[~2010-06-11 6:41 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-11 6:35 [PATCH] staging/wlags49_hs: Fix build error when CONFIG_SYSFS is Javier Martinez Canillas
2010-06-11 6:41 ` Joe Perches [this message]
2010-06-11 12:46 ` Javier Martinez Canillas
2010-06-11 16:52 ` [PATCH] staging/wlags49_hs: Fix build error when CONFIG_SYSFS Joe Perches
2010-06-11 22:12 ` [PATCH] staging/wlags49_hs: Fix build error when CONFIG_SYSFS is Javier Martinez Canillas
2010-06-11 22:18 ` Javier Martinez Canillas
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=1276238502.1556.512.camel@Joe-Laptop.home \
--to=joe@perches.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@suse.de \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=martinez.javier@gmail.com \
--cc=pe1dnn@amsat.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