public inbox for b.a.t.m.a.n@lists.open-mesh.org
 help / color / mirror / Atom feed
* [B.A.T.M.A.N.] [PATCH 1/2] batman-adv: Don't use EXTRA_CFLAGS to add source version
@ 2011-09-30 11:32 Sven Eckelmann
  2011-09-30 11:32 ` [B.A.T.M.A.N.] [PATCH 2/2] batman-adv: Replace obsolete strict_strto<foo> with kstrto<foo> Sven Eckelmann
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Sven Eckelmann @ 2011-09-30 11:32 UTC (permalink / raw)
  To: b.a.t.m.a.n

EXTRA_CFLAGS is deprecated since v2.6.23-2309-gf77bf01 and should not be used
anymore to add additional flags for the c compiler.

Signed-off-by: Sven Eckelmann <sven@narfation.org>
---
 Makefile.kbuild |    4 ++--
 README          |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/Makefile.kbuild b/Makefile.kbuild
index 6377c17..bd7e93c 100644
--- a/Makefile.kbuild
+++ b/Makefile.kbuild
@@ -25,10 +25,10 @@ ifeq ($(MAKING_MODULES),1)
 -include $(TOPDIR)/Rules.make
 endif
 
-# EXTRA_CFLAGS += -DCONFIG_BATMAN_ADV_DEBUG
+# ccflags-y += -DCONFIG_BATMAN_ADV_DEBUG
 
 ifneq ($(REVISION),)
-EXTRA_CFLAGS += -DSOURCE_VERSION=\"$(REVISION)\"
+ccflags-y += -DSOURCE_VERSION=\"$(REVISION)\"
 endif
 
 obj-m += batman-adv.o
diff --git a/README b/README
index 1e000ee..5ba56b5 100644
--- a/README
+++ b/README
@@ -1,4 +1,4 @@
-[state: 21-08-2011]
+[state: 30-09-2011]
 
 BATMAN-ADV
 ----------
@@ -206,7 +206,7 @@ option "B.A.T.M.A.N. debugging". When compiling  outside  of  the
 kernel  tree it is necessary to edit the file Makefile.kbuild and
 uncomment the line
 
-#EXTRA_CFLAGS += -DCONFIG_BATMAN_ADV_DEBUG
+#ccflags-y += -DCONFIG_BATMAN_ADV_DEBUG
 
 Those additional  debug messages can be accessed  using a special
 file in debugfs
-- 
1.7.6.3


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [B.A.T.M.A.N.] [PATCH 2/2] batman-adv: Replace obsolete strict_strto<foo> with kstrto<foo>
  2011-09-30 11:32 [B.A.T.M.A.N.] [PATCH 1/2] batman-adv: Don't use EXTRA_CFLAGS to add source version Sven Eckelmann
@ 2011-09-30 11:32 ` Sven Eckelmann
  2011-10-02 15:21   ` Marek Lindner
  2011-09-30 22:35 ` [B.A.T.M.A.N.] [PATCH 1/2] batman-adv: Don't use EXTRA_CFLAGS to add source version Simon Wunderlich
  2011-10-02 15:19 ` Marek Lindner
  2 siblings, 1 reply; 5+ messages in thread
From: Sven Eckelmann @ 2011-09-30 11:32 UTC (permalink / raw)
  To: b.a.t.m.a.n

strict_strto<foo> is obsolete since v3.1-rc8-8466-g14acc55 and should be
replaced with kstrto<foo>.

Signed-off-by: Sven Eckelmann <sven@narfation.org>
---
Can somebody please make a test for some kernels? I don't have the stuff
(and time) right now.

 bat_sysfs.c      |    4 ++--
 compat.h         |    7 +++++++
 gateway_common.c |    4 ++--
 3 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/bat_sysfs.c b/bat_sysfs.c
index b8a7414..c25492f 100644
--- a/bat_sysfs.c
+++ b/bat_sysfs.c
@@ -174,7 +174,7 @@ static int store_uint_attr(const char *buff, size_t count,
 	unsigned long uint_val;
 	int ret;
 
-	ret = strict_strtoul(buff, 10, &uint_val);
+	ret = kstrtoul(buff, 10, &uint_val);
 	if (ret) {
 		bat_info(net_dev,
 			 "%s: Invalid parameter received: %s\n",
@@ -239,7 +239,7 @@ static ssize_t store_vis_mode(struct kobject *kobj, struct attribute *attr,
 	unsigned long val;
 	int ret, vis_mode_tmp = -1;
 
-	ret = strict_strtoul(buff, 10, &val);
+	ret = kstrtoul(buff, 10, &val);
 
 	if (((count == 2) && (!ret) && (val == VIS_TYPE_CLIENT_UPDATE)) ||
 	    (strncmp(buff, "client", 6) == 0) ||
diff --git a/compat.h b/compat.h
index 43654e8..64fbac7 100644
--- a/compat.h
+++ b/compat.h
@@ -55,6 +55,13 @@
 
 #endif /* < KERNEL_VERSION(2, 6, 36) */
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 39)
+
+#define kstrtoul strict_strtoul
+#define kstrtol  strict_strtol
+
+#endif /* < KERNEL_VERSION(2, 6, 39) */
+
 #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 0, 0)
 
 #define kfree_rcu(ptr, rcu_head) call_rcu(&ptr->rcu_head, free_rcu_##ptr)
diff --git a/gateway_common.c b/gateway_common.c
index 18661af..c4ac7b0 100644
--- a/gateway_common.c
+++ b/gateway_common.c
@@ -97,7 +97,7 @@ static bool parse_gw_bandwidth(struct net_device *net_dev, char *buff,
 			*tmp_ptr = '\0';
 	}
 
-	ret = strict_strtol(buff, 10, &ldown);
+	ret = kstrtol(buff, 10, &ldown);
 	if (ret) {
 		bat_err(net_dev,
 			"Download speed of gateway mode invalid: %s\n",
@@ -122,7 +122,7 @@ static bool parse_gw_bandwidth(struct net_device *net_dev, char *buff,
 				*tmp_ptr = '\0';
 		}
 
-		ret = strict_strtol(slash_ptr + 1, 10, &lup);
+		ret = kstrtol(slash_ptr + 1, 10, &lup);
 		if (ret) {
 			bat_err(net_dev,
 				"Upload speed of gateway mode invalid: "
-- 
1.7.6.3


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [B.A.T.M.A.N.] [PATCH 1/2] batman-adv: Don't use EXTRA_CFLAGS to add source version
  2011-09-30 11:32 [B.A.T.M.A.N.] [PATCH 1/2] batman-adv: Don't use EXTRA_CFLAGS to add source version Sven Eckelmann
  2011-09-30 11:32 ` [B.A.T.M.A.N.] [PATCH 2/2] batman-adv: Replace obsolete strict_strto<foo> with kstrto<foo> Sven Eckelmann
@ 2011-09-30 22:35 ` Simon Wunderlich
  2011-10-02 15:19 ` Marek Lindner
  2 siblings, 0 replies; 5+ messages in thread
From: Simon Wunderlich @ 2011-09-30 22:35 UTC (permalink / raw)
  To: The list for a Better Approach To Mobile Ad-hoc Networking

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

Hey there, 

I've applied it and tested on kernel releases 2.6.29 - 3.1-rc2, and
it compiled just fine. EXTRA_CFLAGS is still applied when set. 

I can Ack this. ;)

Cheers,
	Simon


On Fri, Sep 30, 2011 at 01:32:00PM +0200, Sven Eckelmann wrote:
> EXTRA_CFLAGS is deprecated since v2.6.23-2309-gf77bf01 and should not be used
> anymore to add additional flags for the c compiler.
> 
> Signed-off-by: Sven Eckelmann <sven@narfation.org>
> ---
>  Makefile.kbuild |    4 ++--
>  README          |    4 ++--
>  2 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/Makefile.kbuild b/Makefile.kbuild
> index 6377c17..bd7e93c 100644
> --- a/Makefile.kbuild
> +++ b/Makefile.kbuild
> @@ -25,10 +25,10 @@ ifeq ($(MAKING_MODULES),1)
>  -include $(TOPDIR)/Rules.make
>  endif
>  
> -# EXTRA_CFLAGS += -DCONFIG_BATMAN_ADV_DEBUG
> +# ccflags-y += -DCONFIG_BATMAN_ADV_DEBUG
>  
>  ifneq ($(REVISION),)
> -EXTRA_CFLAGS += -DSOURCE_VERSION=\"$(REVISION)\"
> +ccflags-y += -DSOURCE_VERSION=\"$(REVISION)\"
>  endif
>  
>  obj-m += batman-adv.o
> diff --git a/README b/README
> index 1e000ee..5ba56b5 100644
> --- a/README
> +++ b/README
> @@ -1,4 +1,4 @@
> -[state: 21-08-2011]
> +[state: 30-09-2011]
>  
>  BATMAN-ADV
>  ----------
> @@ -206,7 +206,7 @@ option "B.A.T.M.A.N. debugging". When compiling  outside  of  the
>  kernel  tree it is necessary to edit the file Makefile.kbuild and
>  uncomment the line
>  
> -#EXTRA_CFLAGS += -DCONFIG_BATMAN_ADV_DEBUG
> +#ccflags-y += -DCONFIG_BATMAN_ADV_DEBUG
>  
>  Those additional  debug messages can be accessed  using a special
>  file in debugfs
> -- 
> 1.7.6.3
> 
> 

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [B.A.T.M.A.N.] [PATCH 1/2] batman-adv: Don't use EXTRA_CFLAGS to add source version
  2011-09-30 11:32 [B.A.T.M.A.N.] [PATCH 1/2] batman-adv: Don't use EXTRA_CFLAGS to add source version Sven Eckelmann
  2011-09-30 11:32 ` [B.A.T.M.A.N.] [PATCH 2/2] batman-adv: Replace obsolete strict_strto<foo> with kstrto<foo> Sven Eckelmann
  2011-09-30 22:35 ` [B.A.T.M.A.N.] [PATCH 1/2] batman-adv: Don't use EXTRA_CFLAGS to add source version Simon Wunderlich
@ 2011-10-02 15:19 ` Marek Lindner
  2 siblings, 0 replies; 5+ messages in thread
From: Marek Lindner @ 2011-10-02 15:19 UTC (permalink / raw)
  To: The list for a Better Approach To Mobile Ad-hoc Networking

On Friday, September 30, 2011 13:32:00 Sven Eckelmann wrote:
> EXTRA_CFLAGS is deprecated since v2.6.23-2309-gf77bf01 and should not be
> used anymore to add additional flags for the c compiler.

Applied in revision c5cb3c5.

Thanks,
Marek

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [B.A.T.M.A.N.] [PATCH 2/2] batman-adv: Replace obsolete strict_strto<foo> with kstrto<foo>
  2011-09-30 11:32 ` [B.A.T.M.A.N.] [PATCH 2/2] batman-adv: Replace obsolete strict_strto<foo> with kstrto<foo> Sven Eckelmann
@ 2011-10-02 15:21   ` Marek Lindner
  0 siblings, 0 replies; 5+ messages in thread
From: Marek Lindner @ 2011-10-02 15:21 UTC (permalink / raw)
  To: The list for a Better Approach To Mobile Ad-hoc Networking

On Friday, September 30, 2011 13:32:01 Sven Eckelmann wrote:
> strict_strto<foo> is obsolete since v3.1-rc8-8466-g14acc55 and should be
> replaced with kstrto<foo>.

Applied in revision 8c111d3.

Thanks,
Marek

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-10-02 15:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-30 11:32 [B.A.T.M.A.N.] [PATCH 1/2] batman-adv: Don't use EXTRA_CFLAGS to add source version Sven Eckelmann
2011-09-30 11:32 ` [B.A.T.M.A.N.] [PATCH 2/2] batman-adv: Replace obsolete strict_strto<foo> with kstrto<foo> Sven Eckelmann
2011-10-02 15:21   ` Marek Lindner
2011-09-30 22:35 ` [B.A.T.M.A.N.] [PATCH 1/2] batman-adv: Don't use EXTRA_CFLAGS to add source version Simon Wunderlich
2011-10-02 15:19 ` Marek Lindner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox